copied code from old codebase to see if anything happens
This commit is contained in:
parent
6debf73267
commit
afd228d81a
@ -35,30 +35,39 @@ def game(windowed=False):
|
||||
"""
|
||||
Starts the game.
|
||||
"""
|
||||
pygame.init()
|
||||
|
||||
# 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.init()
|
||||
|
||||
# Hide the cursor for the Pi display.
|
||||
pygame.mouse.set_visible(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.
|
||||
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 = pygame.Surface((game_res, game_res))
|
||||
surface.fill((255, 0, 0))
|
||||
|
||||
# Only really useful for PCs. Does nothing on the Raspberry Pi.
|
||||
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
|
||||
|
||||
# Add an icon to the pygame window.
|
||||
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
|
||||
icon = pygame.image.load(resources_dir + '/icon/icon.png').convert_alpha()
|
||||
pygame.display.set_icon(icon)
|
||||
|
||||
clock = pygame.time.Clock()
|
||||
|
||||
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))
|
||||
frame = pygame.transform.scale(surface, (screen_size, screen_size))
|
||||
window.blit(frame, frame.get_rect())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user