From 31f6593ae0bd3c32dfca1325fe0327c79a7a6304 Mon Sep 17 00:00:00 2001 From: Nicholas Dyer Date: Mon, 6 Jan 2025 16:41:10 -0500 Subject: [PATCH] renamed dvd references to steam references --- dvd_bounce/surfaces/__init__.py | 1 - {dvd_bounce => steam_saver}/__init__.py | 0 {dvd_bounce => steam_saver}/__main__.py | 4 ++-- {dvd_bounce => steam_saver}/main.py | 8 ++++---- steam_saver/surfaces/__init__.py | 1 + .../surfaces/resources/dvd.png | Bin .../surfaces/steam_screen.py | 16 ++++++++-------- 7 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 dvd_bounce/surfaces/__init__.py rename {dvd_bounce => steam_saver}/__init__.py (100%) rename {dvd_bounce => steam_saver}/__main__.py (81%) rename {dvd_bounce => steam_saver}/main.py (83%) create mode 100644 steam_saver/surfaces/__init__.py rename {dvd_bounce => steam_saver}/surfaces/resources/dvd.png (100%) rename dvd_bounce/surfaces/dvd_screen.py => steam_saver/surfaces/steam_screen.py (91%) diff --git a/dvd_bounce/surfaces/__init__.py b/dvd_bounce/surfaces/__init__.py deleted file mode 100644 index 30a5284..0000000 --- a/dvd_bounce/surfaces/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import dvd_screen \ No newline at end of file diff --git a/dvd_bounce/__init__.py b/steam_saver/__init__.py similarity index 100% rename from dvd_bounce/__init__.py rename to steam_saver/__init__.py diff --git a/dvd_bounce/__main__.py b/steam_saver/__main__.py similarity index 81% rename from dvd_bounce/__main__.py rename to steam_saver/__main__.py index 5ba4fd5..ae5e066 100644 --- a/dvd_bounce/__main__.py +++ b/steam_saver/__main__.py @@ -1,4 +1,4 @@ -import dvd_bounce +import steam_saver import sys import os @@ -11,4 +11,4 @@ if __name__ == '__main__': if arg == '--window': windowed_mode = True - dvd_bounce.main.main(windowed_mode) \ No newline at end of file + steam_saver.main.main(windowed_mode) \ No newline at end of file diff --git a/dvd_bounce/main.py b/steam_saver/main.py similarity index 83% rename from dvd_bounce/main.py rename to steam_saver/main.py index 9a1778c..75e94d8 100644 --- a/dvd_bounce/main.py +++ b/steam_saver/main.py @@ -1,11 +1,11 @@ import pygame -import dvd_bounce.surfaces as surfaces +import steam_saver.surfaces as surfaces # Global variables SCREEN_SIZE = (1920, 1080) FPS = 60 VALID_SURFACES = [ - 'dvd_screen' + 'steam_screen' ] @@ -21,8 +21,8 @@ def main(windowed_mode=False): else: window = pygame.display.set_mode(SCREEN_SIZE, pygame.FULLSCREEN) - # Starts the program with the surface 'dial' as the default - surface = getattr(globals()['surfaces'], 'dvd_screen').Surface(SCREEN_SIZE) + # Starts the program with the surface 'steam_screen' as the default + surface = getattr(globals()['surfaces'], 'steam_screen').Surface(SCREEN_SIZE) running = True while running: clock.tick(FPS) diff --git a/steam_saver/surfaces/__init__.py b/steam_saver/surfaces/__init__.py new file mode 100644 index 0000000..c673097 --- /dev/null +++ b/steam_saver/surfaces/__init__.py @@ -0,0 +1 @@ +from . import steam_screen \ No newline at end of file diff --git a/dvd_bounce/surfaces/resources/dvd.png b/steam_saver/surfaces/resources/dvd.png similarity index 100% rename from dvd_bounce/surfaces/resources/dvd.png rename to steam_saver/surfaces/resources/dvd.png diff --git a/dvd_bounce/surfaces/dvd_screen.py b/steam_saver/surfaces/steam_screen.py similarity index 91% rename from dvd_bounce/surfaces/dvd_screen.py rename to steam_saver/surfaces/steam_screen.py index 4c7f400..c325764 100644 --- a/dvd_bounce/surfaces/dvd_screen.py +++ b/steam_saver/surfaces/steam_screen.py @@ -6,12 +6,12 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) LOGO_SCALING = 0.1 -class DVDLogo(pygame.sprite.Sprite): +class SteamLogo(pygame.sprite.Sprite): """ - A Pygame sprite representing a DVD logo that moves around the screen. + A Pygame sprite representing a Steam logo that moves around the screen. Attributes: - base_image (pygame.Surface): The original image of the DVD logo. + base_image (pygame.Surface): The original image of the Steam logo. x_speed (int): Current speed in the X axis. y_speed (int): Current speed in the Y axis. max_x (int): Maximum X position on the screen. @@ -20,7 +20,7 @@ class DVDLogo(pygame.sprite.Sprite): def __init__(self, window_size: tuple): """ - Initialize DVDLogo sprite with given window size. + Initialize SteamLogo sprite with given window size. Args: window_size (tuple): Size of the game window (width, height). @@ -68,7 +68,7 @@ class DVDLogo(pygame.sprite.Sprite): def update(self): """ - Update DVDLogo sprite's position and speed based on its current state. + Update SteamLogo sprite's position and speed based on its current state. This method is called each frame during game execution to move the logo around the screen and to handle collision/color changes. @@ -121,9 +121,9 @@ class Surface(pygame.Surface): pygame.mouse.set_visible(False) - # Create a DVDLogo sprite instance and add it to the sprite group. - dvd_logo = DVDLogo(window_size) - self.all_sprites = pygame.sprite.Group(dvd_logo) + # Create a SteamLogo sprite instance and add it to the sprite group. + steam_logo = SteamLogo(window_size) + self.all_sprites = pygame.sprite.Group(steam_logo) def update(self): """