From bbefff2eb955c9476c8866c9571bfafd0ac41069 Mon Sep 17 00:00:00 2001 From: MeirGavish Date: Sun, 3 Aug 2025 16:51:16 +0300 Subject: [PATCH 1/2] Fixed bug where shop price would continue displaying after the item was purchased --- source/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/game.c b/source/game.c index dae247b..af14d73 100644 --- a/source/game.c +++ b/source/game.c @@ -2325,7 +2325,7 @@ void game_shop() Rect joker_price_rect; joker_price_rect.left = fx2int(shop_jokers[i]->sprite_object->tx); - joker_price_rect.top = fx2int(shop_jokers[i]->sprite_object->ty) + TILE_SIZE; + joker_price_rect.top = fx2int(shop_jokers[i]->sprite_object->ty) + CARD_SPRITE_SIZE + 2*TILE_SIZE; joker_price_rect.right = joker_price_rect.left + TILE_SIZE * 3; joker_price_rect.bottom = joker_price_rect.top + TILE_SIZE; From ec2aaf245dc6e717a54b8b4519e21aa9031f49a9 Mon Sep 17 00:00:00 2001 From: MeirGavish Date: Sun, 3 Aug 2025 18:15:28 +0300 Subject: [PATCH 2/2] Added clarification comment --- source/game.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/game.c b/source/game.c index af14d73..1f4fd5c 100644 --- a/source/game.c +++ b/source/game.c @@ -2325,6 +2325,7 @@ void game_shop() Rect joker_price_rect; joker_price_rect.left = fx2int(shop_jokers[i]->sprite_object->tx); + // 2*TILE_SIZE because the item is highlighted and raised by 1 additional tile joker_price_rect.top = fx2int(shop_jokers[i]->sprite_object->ty) + CARD_SPRITE_SIZE + 2*TILE_SIZE; joker_price_rect.right = joker_price_rect.left + TILE_SIZE * 3; joker_price_rect.bottom = joker_price_rect.top + TILE_SIZE;