re-enabled the game lol

This commit is contained in:
Nicholas Dyer 2023-05-13 10:17:30 -04:00
parent f6e9869282
commit 38a5812839

View File

@ -46,7 +46,7 @@ def game(windowed=False):
screen_size = 240
window = pygame.display.set_mode((screen_size, screen_size))
surface = pygame.Surface((game_res, game_res))
surface = surface_modules.get(starting_surface).Surface((game_res, game_res), resources_dir, game_fps)
# Only really useful for PCs. Does nothing on the Raspberry Pi.
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
@ -59,25 +59,18 @@ def game(windowed=False):
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.
running = True
while running:
#surface.update()
surface.fill((255, 0, 0))
surface.update()
frame = pygame.transform.scale(surface, (screen_size, screen_size))
window.blit(frame, frame.get_rect())
#if not surface.running:
# next_surface = surface.next_surface
# additional_args = surface.additional_args
# if next_surface not in valid_surfaces:
# next_surface = 'error_screen'
# surface = surface_modules.get(next_surface).Surface((game_res, game_res), resources_dir,
# game_fps, **additional_args)
if not surface.running:
next_surface = surface.next_surface
additional_args = surface.additional_args
if next_surface not in valid_surfaces:
next_surface = 'error_screen'
surface = surface_modules.get(next_surface).Surface((game_res, game_res), resources_dir,
game_fps, **additional_args)
pygame.display.flip()