Skip to content

Commit cafc7c5

Browse files
authored
Merge pull request #36 from PaulBayfield/fix-size
fix: fullscreen size
2 parents da8306b + 39d3ecd commit cafc7c5

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

assets/images/menu.jpg

851 KB
Loading

game/components/player.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@ def _load_all_sprites(self) -> Dict[Direction, List[pygame.Surface]]:
5858
"""
5959
return {
6060
direction: [
61-
pygame.image.load(
62-
f"assets/sprites/hen/{direction.name.lower()}_{i}.png"
61+
pygame.transform.scale(
62+
pygame.image.load(
63+
f"assets/sprites/hen/{direction.name.lower()}_{i}.png"
64+
),
65+
(
66+
self.game.settings.TILE_SIZE,
67+
self.game.settings.TILE_SIZE,
68+
),
6369
).convert_alpha()
6470
for i in range(1, self.SPRITE_FRAMES + 1)
6571
]

game/game.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def __init__(self) -> None:
2323
pygame.init()
2424

2525
self.settings = Settings
26+
self.settings.ITEM_SIZE = self.settings.TILE_SIZE * 1.8
27+
2628
self.mixer = pygame.mixer
2729
self.footsteps = self.mixer.Sound("assets/songs/sfx/chicken_run.mp3")
2830
self.current_song = 0

settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Settings:
1111
# =========================================================================
1212
WINDOW_WIDTH = 1000
1313
WINDOW_HEIGHT = 900
14-
IS_FULLSCREEN = False
14+
IS_FULLSCREEN = True
1515
FPS = 30
1616

1717
# =========================================================================

0 commit comments

Comments
 (0)