Fix missing Deck size/max text after showing Joker description in the Shop
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
This commit is contained in:
@@ -96,6 +96,7 @@ int get_deck_top(void);
|
|||||||
int get_num_discards_remaining(void);
|
int get_num_discards_remaining(void);
|
||||||
int get_num_hands_remaining(void);
|
int get_num_hands_remaining(void);
|
||||||
|
|
||||||
|
void display_deck_size_max(void);
|
||||||
u32 get_chips(void);
|
u32 get_chips(void);
|
||||||
void set_chips(u32 new_chips);
|
void set_chips(u32 new_chips);
|
||||||
void display_chips(void);
|
void display_chips(void);
|
||||||
|
|||||||
+16
-11
@@ -773,6 +773,21 @@ void display_mult(void)
|
|||||||
check_flaming_score();
|
check_flaming_score();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void display_deck_size_max(void)
|
||||||
|
{
|
||||||
|
// TODO: the text will overflow if deck max size exceeds 99,
|
||||||
|
// we will need a fix at some point for this
|
||||||
|
tte_erase_rect_wrapper(DECK_SIZE_RECT);
|
||||||
|
tte_printf(
|
||||||
|
"#{P:%d,%d; cx:0x%X000}%d/%d",
|
||||||
|
DECK_SIZE_RECT.left,
|
||||||
|
DECK_SIZE_RECT.top,
|
||||||
|
TTE_WHITE_PB,
|
||||||
|
deck_get_size(),
|
||||||
|
deck_get_max_size()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Returns true if the card is *considered* a face card
|
// Returns true if the card is *considered* a face card
|
||||||
bool card_is_face(Card* card)
|
bool card_is_face(Card* card)
|
||||||
{
|
{
|
||||||
@@ -2471,17 +2486,7 @@ static inline void game_playing_ui_text_update(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deck size/max size
|
// Deck size/max size
|
||||||
// TODO: the text will overflow if deck max size exceeds 99,
|
display_deck_size_max();
|
||||||
// we will need a fix at some point for this
|
|
||||||
tte_erase_rect_wrapper(DECK_SIZE_RECT);
|
|
||||||
tte_printf(
|
|
||||||
"#{P:%d,%d; cx:0x%X000}%d/%d",
|
|
||||||
DECK_SIZE_RECT.left,
|
|
||||||
DECK_SIZE_RECT.top,
|
|
||||||
TTE_WHITE_PB,
|
|
||||||
deck_get_size(),
|
|
||||||
deck_get_max_size()
|
|
||||||
);
|
|
||||||
|
|
||||||
last_hand_size = hand_nb_held_cards();
|
last_hand_size = hand_nb_held_cards();
|
||||||
last_deck_size = deck_get_size();
|
last_deck_size = deck_get_size();
|
||||||
|
|||||||
@@ -887,6 +887,9 @@ static void game_shop_hide_card_desc(void)
|
|||||||
TTE_WHITE_PB,
|
TTE_WHITE_PB,
|
||||||
reroll_cost
|
reroll_cost
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Print Deck size that was erased
|
||||||
|
display_deck_size_max();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cleanup and change state
|
// Cleanup and change state
|
||||||
|
|||||||
Reference in New Issue
Block a user