Jokers appear in the shop but don't do anything yet
This commit is contained in:
+12
-1
@@ -151,4 +151,15 @@ void card_object_set_sprite(CardObject *card_object, int layer)
|
||||
{
|
||||
sprite_destroy(&card_object->sprite); // Destroy the old sprite if it exists
|
||||
card_object->sprite = sprite_new(ATTR0_SQUARE | ATTR0_4BPP | ATTR0_AFF, ATTR1_SIZE_32, card_sprite_lut[card_object->card->suit][card_object->card->rank], 0, layer);
|
||||
}
|
||||
}
|
||||
|
||||
void card_object_score(CardObject *card_object, mm_word sound_id)
|
||||
{
|
||||
card_object->vscale = float2fx(0.3f); // Scale down the card when it's scored
|
||||
card_object->vrotation = float2fx(8.0f); // Rotate the card when it's scored
|
||||
|
||||
if (sound_id == -1) return; // If no sound ID is provided, do nothing
|
||||
|
||||
mm_sound_effect sfx_select = {{sound_id}, 1024, 0, 255, 128,};
|
||||
mmEffectEx(&sfx_select);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user