copied code from old codebase to see if anything happens

This commit is contained in:
Nicholas Dyer 2023-05-13 09:56:55 -04:00
parent 6debf73267
commit afd228d81a

View File

@ -35,30 +35,39 @@ def game(windowed=False):
""" """
Starts the game. Starts the game.
""" """
pygame.init()
# The game is normally rendered at 80 pixels and upscaled from there. If changing displays, change the pygame.init()
# screen_size to reflect what the resolution of the new display is.
# Hide the cursor for the Pi display. # Hide the cursor for the Pi display.
pygame.mouse.set_visible(False) pygame.mouse.set_visible(False)
# The game is normally rendered at 80 pixels and upscaled from there. If changing displays, change the
# screen_size to reflect what the resolution of the new display is.
screen_size = 240 screen_size = 240
window = pygame.display.set_mode((screen_size, screen_size)) window = pygame.display.set_mode((screen_size, screen_size))
#surface = surface_modules.get(starting_surface).Surface((game_res, game_res), resources_dir, game_fps)
surface = pygame.Surface((game_res, game_res)) surface = pygame.Surface((game_res, game_res))
surface.fill((255, 0, 0))
# Only really useful for PCs. Does nothing on the Raspberry Pi.
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
# Add an icon to the pygame window. # Add an icon to the pygame window.
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
icon = pygame.image.load(resources_dir + '/icon/icon.png').convert_alpha() icon = pygame.image.load(resources_dir + '/icon/icon.png').convert_alpha()
pygame.display.set_icon(icon) pygame.display.set_icon(icon)
clock = pygame.time.Clock()
running = True
#surface = surface_modules.get(starting_surface).Surface((game_res, game_res), resources_dir, game_fps)
surface.fill((255, 0, 0))
# Default game state when the game first starts. # Default game state when the game first starts.
running = True running = True
while running: while running:
#surface.update() #surface.update()
surface.fill((255, 0, 0))
frame = pygame.transform.scale(surface, (screen_size, screen_size)) frame = pygame.transform.scale(surface, (screen_size, screen_size))
window.blit(frame, frame.get_rect()) window.blit(frame, frame.get_rect())