From db760beb00f7b8ef0647d61ac8287152445edf75 Mon Sep 17 00:00:00 2001 From: markojozsef Date: Sat, 17 Oct 2026 11:11:05 +0200 Subject: [PATCH] Csata szobor grafika --- res/sprite/podium.png | Bin 0 -> 182 bytes src/assets.py | 1 + src/gamestates/overworld.py | 6 +++--- src/objects.py | 33 +++++++++++++++++++++------------ 4 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 res/sprite/podium.png diff --git a/res/sprite/podium.png b/res/sprite/podium.png new file mode 100644 index 0000000000000000000000000000000000000000..210284a6c555fe8eb641eea6b76407df68f402f1 GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^2Y^_CgBeH`yR~lzQak}ZA+A6g2;AM>PoF+r^sKcR z$YCi7@(X78|NsAHU55@JKh)F3F(jh(?YWJD3<^9A2VVSh-tF{ahwv-?87o(T!2aE< z_r#gI{GAgTw_bV?khM3jqw21}*IkOQN}aE~Zd-AkHxNzYf&4Wtu8mgf&%Op(@9FC2 Jvd$@?2>=&EMZN$4 literal 0 HcmV?d00001 diff --git a/src/assets.py b/src/assets.py index fee17e7..77f48eb 100644 --- a/src/assets.py +++ b/src/assets.py @@ -8,6 +8,7 @@ sprites = { "cursor" : arcade.load_texture("res/sprite/handcursor.png"), "font" : arcade.load_spritesheet("res/sprite/font.png"), "panel" : arcade.load_spritesheet("res/sprite/panel.png"), + "podium" : arcade.load_spritesheet("res/sprite/podium.png"), "balthasar": arcade.load_spritesheet("res/sprite/balthasar.png"), "overworld": arcade.load_spritesheet("res/sprite/overworld_sheet.png"), } diff --git a/src/gamestates/overworld.py b/src/gamestates/overworld.py index 1fb31d5..7e138fc 100644 --- a/src/gamestates/overworld.py +++ b/src/gamestates/overworld.py @@ -12,9 +12,9 @@ balthasar = BalthasarRenderer() overworld = OverworldMap() objects = [ BattlePodium(0 , 0, 0), - BattlePodium(48, 0, 1), - BattlePodium(0 ,48, 2), - BattlePodium(48,48, 3), + BattlePodium(96, 0, 1), + BattlePodium(0 ,96, 2), + BattlePodium(96,96, 3), balthasar ] diff --git a/src/objects.py b/src/objects.py index dbd7afd..892d276 100644 --- a/src/objects.py +++ b/src/objects.py @@ -56,13 +56,17 @@ OVERWORLD_LB_X = 0 OVERWORLD_LB_Y = 0 OVERWORLD_TILE_WIDTH = 16 OVERWORLD_TILE_HEIGHT = 16 -OVERWORLD_WIDTH = 4 -OVERWORLD_HEIGHT = 4 +OVERWORLD_WIDTH = 8 +OVERWORLD_HEIGHT = 8 OVERWORLD_MAP = [ - [5,3,3,6], - [1,0,0,2], - [1,0,0,2], - [7,4,4,8], + [5,3,3,3,3,3,3,6], + [1,0,0,0,0,0,0,2], + [1,0,0,0,0,0,0,2], + [1,0,0,0,0,0,0,2], + [1,0,0,0,0,0,0,2], + [1,0,0,0,0,0,0,2], + [1,0,0,0,0,0,0,2], + [7,4,4,4,4,4,4,8], ] class OverworldMap: @@ -153,22 +157,27 @@ class OverworldMap: ) # Csata Szobor +PODIUM_WIDTH = 48 +PODIUM_HEIGHT = 32 + class BattlePodium: def __init__(self, x, y, battle_id): self.x = x self.y = y - self.w = 16 - self.h = 16 + self.w = PODIUM_WIDTH + self.h = PODIUM_HEIGHT self.interactive = True self.battle = battle_id - + self.texture = assets.sprites["podium"].get_texture(arcade.LBWH(battle_id * PODIUM_WIDTH, 0, PODIUM_WIDTH, PODIUM_HEIGHT)) + def get_aabb(self): return self.x, self.y, self.x + self.w, self.y + self.h def render(self, game, translation): - arcade.draw_rect_filled( - arcade.LBWH(self.x, self.y, 16, 16).move(*translation), - arcade.color.PURPLE, + arcade.draw_texture_rect( + self.texture, + arcade.LBWH(self.x, self.y, self.w, self.h).move(*translation), + pixelated=True ) def on_interact(self, start_battle_func):