Add basic common_ui background gfx functions (#415)

* Add basic common_ui background gfx functions

* clang format

* document common_ui.h

* Remove unused tonc header

* Fix header guard name convention

* more header cleanup

* claaaaanggggg format
This commit is contained in:
Rickey
2026-03-31 21:04:47 -07:00
committed by GitHub
parent 91bc9b949e
commit f46395b9d0
5 changed files with 62 additions and 15 deletions
+2 -2
View File
@@ -11,6 +11,7 @@
#include "blind.h"
#include "button.h"
#include "card.h"
#include "game/common_ui.h"
#include "graphic_utils.h"
#include "hand_analysis.h"
#include "joker.h"
@@ -235,7 +236,6 @@ static void game_round_end_display_cashout(void);
static void game_round_end_dismiss_round_end_panel(void);
static void sort_cards(void);
static void change_background(enum BackgroundId id);
static void display_temp_score(u32 value);
static void display_score(u32 value);
static void check_flaming_score(void);
@@ -1424,7 +1424,7 @@ static inline void reset_top_left_panel_bottom_row()
main_bg_se_copy_rect(TOP_LEFT_PANEL_BOTTOM_ROW_RESET_RECT, top_left_panel_bottom_row_pos);
}
static void change_background(enum BackgroundId id)
void change_background_legacy(enum BackgroundId id)
{
if (background == id)
{
+22
View File
@@ -0,0 +1,22 @@
#include "game/common_ui.h"
#include "game.h"
typedef void (*BackgroundRenderCallback)(void);
// Map to fill in for refactor
BackgroundRenderCallback bgCallbacks[] =
{
[BG_NONE] = NULL,
[BG_CARD_SELECTING] = NULL,
[BG_CARD_PLAYING] = NULL,
[BG_ROUND_END] = NULL,
[BG_SHOP] = NULL,
[BG_BLIND_SELECT] = NULL,
[BG_MAIN_MENU] = NULL,
};
void change_background(enum BackgroundId id)
{
change_background_legacy(id);
}