Moved the price of shop items below the item so it is not obstructed when the card is raised on highlight

This commit is contained in:
MeirGavish
2025-08-03 16:08:41 +03:00
parent da8b3bbc00
commit a8f429eca3
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -4,6 +4,8 @@
#include <tonc.h>
#include <maxmod.h>
#define CARD_SPRITE_SIZE 32
typedef struct
{
OBJ_ATTR *obj;
+1 -1
View File
@@ -1821,7 +1821,7 @@ static void game_shop_create_items(JokerObject *shop_jokers[], bool first_time)
shop_jokers[i]->sprite_object->ty = int2fx(71);
int x = fx2int(shop_jokers[i]->sprite_object->tx) + TILE_SIZE - (get_digits_even(shop_jokers[i]->joker->value) - 1) * TILE_SIZE;
int y = fx2int(shop_jokers[i]->sprite_object->ty);
int y = fx2int(shop_jokers[i]->sprite_object->ty) + CARD_SPRITE_SIZE + TILE_SIZE;
tte_printf("#{P:%d,%d; cx:0xC000}$%d", x, y, shop_jokers[i]->joker->value);
if (first_time == false)
+2 -2
View File
@@ -1,5 +1,6 @@
#include "sprite.h"
#include "util.h"
#include "audio_utils.h"
#include <tonc.h>
#include <stdlib.h>
@@ -206,8 +207,7 @@ void sprite_object_shake(SpriteObject* sprite_object, mm_word sound_id)
if (sound_id == UNDEFINED) return; // If no sound ID is provided, do nothing
mm_sound_effect sfx_select = { {sound_id}, 1024, 0, 255, 128, };
mmEffectEx(&sfx_select);
play_sfx(sound_id, MM_BASE_PITCH_RATE);
}
void sprite_object_set_selected(SpriteObject* sprite_object, bool selected)