reordered stuff in a desperate attempt

This commit is contained in:
Nicholas Dyer 2023-05-12 23:55:06 -04:00
parent c547f76b35
commit 07be003a54

View File

@ -41,29 +41,22 @@ def game(windowed=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.
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
if windowed:
screen_size = 480
window = pygame.display.set_mode((screen_size, screen_size))
else:
screen_size = 240
pygame.mouse.set_visible(False)
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)
# Add an icon to the pygame window.
icon = pygame.image.load(resources_dir + '/icon/icon.png').convert_alpha()
pygame.display.set_icon(icon)
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
# Default game state when the game first starts.
running = True
# A group of all the sprites on screen. Used to update all sprites at onc
all_sprites = pygame.sprite.Group()
# Time since last input. Used to help regulate double presses of buttons.
last_input_tick = 0
while running:
surface.update()
frame = pygame.transform.scale(surface, (screen_size, screen_size))