Added sound effects for chips, mult, and xmult (#229)
This commit is contained in:
@@ -152,4 +152,6 @@ Music arrangement is made by @cellos51 based on original Balatro soundtrack by [
|
|||||||
Sprites and backgrounds are based on original Balatro imagery created by LocalThunk.
|
Sprites and backgrounds are based on original Balatro imagery created by LocalThunk.
|
||||||
See [Joker Art Discussion](https://github.com/cellos51/balatro-gba/discussions/69) for full credits for each joker sprite.
|
See [Joker Art Discussion](https://github.com/cellos51/balatro-gba/discussions/69) for full credits for each joker sprite.
|
||||||
## **Sounds**
|
## **Sounds**
|
||||||
All sound effects were created by LocalThunk and are used under Creative Commons - CC0 license.
|
For the mult and xmult sound effects: [Toy records#06-E3-02.wav by poissonmort](https://freesound.org/s/253249/) used under License: Attribution 4.0
|
||||||
|
|
||||||
|
All other sound effects were created by LocalThunk and are used under Creative Commons - CC0 license.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -2280,7 +2280,7 @@ static bool play_scoring_cards_update()
|
|||||||
snprintf(score_buffer, sizeof(score_buffer), "+%hhu", card_value);
|
snprintf(score_buffer, sizeof(score_buffer), "+%hhu", card_value);
|
||||||
tte_write(score_buffer);
|
tte_write(score_buffer);
|
||||||
|
|
||||||
card_object_shake(scored_card_object, SFX_CARD_SELECT);
|
card_object_shake(scored_card_object, SFX_CHIPS_CARD);
|
||||||
|
|
||||||
// Relocated card scoring logic here
|
// Relocated card scoring logic here
|
||||||
chips = u32_protected_add(chips, card_value);
|
chips = u32_protected_add(chips, card_value);
|
||||||
|
|||||||
+7
-1
@@ -306,29 +306,35 @@ bool joker_object_score(JokerObject *joker_object, CardObject* card_object, enum
|
|||||||
cursorPosY = JOKER_SCORE_TEXT_Y;
|
cursorPosY = JOKER_SCORE_TEXT_Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mm_word sfx_id;
|
||||||
|
|
||||||
if (joker_effect.chips > 0)
|
if (joker_effect.chips > 0)
|
||||||
{
|
{
|
||||||
char score_buffer[INT_MAX_DIGITS + 2]; // For '+' and null terminator
|
char score_buffer[INT_MAX_DIGITS + 2]; // For '+' and null terminator
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "+%lu", joker_effect.chips);
|
snprintf(score_buffer, sizeof(score_buffer), "+%lu", joker_effect.chips);
|
||||||
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_BLUE_PB);
|
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_BLUE_PB);
|
||||||
|
sfx_id = SFX_CHIPS_GENERIC; // The joker chips effect is "generic"
|
||||||
}
|
}
|
||||||
if (joker_effect.mult > 0)
|
if (joker_effect.mult > 0)
|
||||||
{
|
{
|
||||||
char score_buffer[INT_MAX_DIGITS + 2];
|
char score_buffer[INT_MAX_DIGITS + 2];
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "+%lu", joker_effect.mult);
|
snprintf(score_buffer, sizeof(score_buffer), "+%lu", joker_effect.mult);
|
||||||
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_RED_PB);
|
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_RED_PB);
|
||||||
|
sfx_id = SFX_MULT;
|
||||||
}
|
}
|
||||||
if (joker_effect.xmult > 0)
|
if (joker_effect.xmult > 0)
|
||||||
{
|
{
|
||||||
char score_buffer[INT_MAX_DIGITS + 2];
|
char score_buffer[INT_MAX_DIGITS + 2];
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "X%lu", joker_effect.xmult);
|
snprintf(score_buffer, sizeof(score_buffer), "X%lu", joker_effect.xmult);
|
||||||
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_RED_PB);
|
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_RED_PB);
|
||||||
|
sfx_id = SFX_XMULT;
|
||||||
}
|
}
|
||||||
if (joker_effect.money > 0)
|
if (joker_effect.money > 0)
|
||||||
{
|
{
|
||||||
char score_buffer[INT_MAX_DIGITS + 2];
|
char score_buffer[INT_MAX_DIGITS + 2];
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "%d$", joker_effect.money);
|
snprintf(score_buffer, sizeof(score_buffer), "%d$", joker_effect.money);
|
||||||
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_YELLOW_PB);
|
set_and_shift_text(score_buffer, &cursorPosX, &cursorPosY, TTE_YELLOW_PB);
|
||||||
|
// TODO: Money sound effect
|
||||||
}
|
}
|
||||||
// custom message for Jokers (including retriggers where Jokers will say "Again!")
|
// custom message for Jokers (including retriggers where Jokers will say "Again!")
|
||||||
if (joker_effect.message != NULL && joker_effect.message[0] != '\0') // Message is not empty
|
if (joker_effect.message != NULL && joker_effect.message[0] != '\0') // Message is not empty
|
||||||
@@ -340,7 +346,7 @@ bool joker_object_score(JokerObject *joker_object, CardObject* card_object, enum
|
|||||||
// TODO make Jokers expire
|
// TODO make Jokers expire
|
||||||
}
|
}
|
||||||
|
|
||||||
joker_object_shake(joker_object, SFX_CARD_SELECT); // TODO: Add a sound effect for scoring the joker
|
joker_object_shake(joker_object, sfx_id);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user