reordered stuff in a desperate attempt
This commit is contained in:
parent
c547f76b35
commit
07be003a54
@ -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
|
# 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 to reflect what the resolution of the new display is.
|
||||||
|
|
||||||
|
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
|
||||||
|
|
||||||
if windowed:
|
if windowed:
|
||||||
screen_size = 480
|
screen_size = 480
|
||||||
window = pygame.display.set_mode((screen_size, screen_size))
|
|
||||||
else:
|
else:
|
||||||
screen_size = 240
|
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)
|
surface = surface_modules.get(starting_surface).Surface((game_res, game_res), resources_dir, game_fps)
|
||||||
|
|
||||||
# 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)
|
||||||
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
|
|
||||||
|
|
||||||
# Default game state when the game first starts.
|
# Default game state when the game first starts.
|
||||||
running = True
|
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:
|
while running:
|
||||||
surface.update()
|
surface.update()
|
||||||
frame = pygame.transform.scale(surface, (screen_size, screen_size))
|
frame = pygame.transform.scale(surface, (screen_size, screen_size))
|
||||||
|
Loading…
Reference in New Issue
Block a user