disabled loading other surfaces as a test
This commit is contained in:
parent
e9df84897a
commit
1fef87e1c3
@ -47,8 +47,9 @@ def game(windowed=False):
|
|||||||
else:
|
else:
|
||||||
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 = 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.
|
# Add an icon to the pygame window.
|
||||||
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)
|
||||||
@ -57,17 +58,17 @@ def game(windowed=False):
|
|||||||
running = True
|
running = True
|
||||||
|
|
||||||
while running:
|
while running:
|
||||||
surface.update()
|
#surface.update()
|
||||||
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())
|
||||||
|
|
||||||
if not surface.running:
|
#if not surface.running:
|
||||||
next_surface = surface.next_surface
|
# next_surface = surface.next_surface
|
||||||
additional_args = surface.additional_args
|
# additional_args = surface.additional_args
|
||||||
if next_surface not in valid_surfaces:
|
# if next_surface not in valid_surfaces:
|
||||||
next_surface = 'error_screen'
|
# next_surface = 'error_screen'
|
||||||
surface = surface_modules.get(next_surface).Surface((game_res, game_res), resources_dir,
|
# surface = surface_modules.get(next_surface).Surface((game_res, game_res), resources_dir,
|
||||||
game_fps, **additional_args)
|
# game_fps, **additional_args)
|
||||||
pygame.display.flip()
|
pygame.display.flip()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user