disabled loading other surfaces as a test

This commit is contained in:
Nicholas Dyer 2023-05-13 00:04:34 -04:00
parent e9df84897a
commit 1fef87e1c3

View File

@ -47,8 +47,9 @@ def game(windowed=False):
else:
screen_size = 240
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 = surface_modules.get(starting_surface).Surface((game_res, game_res), resources_dir, game_fps)
surface = pygame.Surface((game_res, game_res))
surface.fill((255, 0, 0))
# Add an icon to the pygame window.
icon = pygame.image.load(resources_dir + '/icon/icon.png').convert_alpha()
pygame.display.set_icon(icon)
@ -57,17 +58,17 @@ def game(windowed=False):
running = True
while running:
surface.update()
#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()