mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Reset hud color if it was altered
This commit is contained in:
parent
97d48d3278
commit
d57646ab5f
3 changed files with 11 additions and 0 deletions
|
@ -95,6 +95,7 @@ static void djui_reset_hud_params(void) {
|
|||
djui_hud_set_resolution(RESOLUTION_DJUI);
|
||||
djui_hud_set_font(FONT_NORMAL);
|
||||
djui_hud_set_rotation(0, 0, 0);
|
||||
djui_hud_reset_color();
|
||||
}
|
||||
|
||||
void djui_render(void) {
|
||||
|
|
|
@ -97,6 +97,7 @@ struct InterpHud {
|
|||
};
|
||||
static struct InterpHud sInterpHuds[MAX_INTERP_HUD] = { 0 };
|
||||
static u16 sInterpHudCount = 0;
|
||||
static u8 sColorAltered = FALSE;
|
||||
|
||||
void patch_djui_hud_before(void) {
|
||||
sInterpHudCount = 0;
|
||||
|
@ -151,6 +152,14 @@ void djui_hud_set_font(enum DjuiFontType fontType) {
|
|||
|
||||
void djui_hud_set_color(u8 r, u8 g, u8 b, u8 a) {
|
||||
gDPSetEnvColor(gDisplayListHead++, r, g, b, a);
|
||||
sColorAltered = TRUE;
|
||||
}
|
||||
|
||||
void djui_hud_reset_color(void) {
|
||||
if (sColorAltered) {
|
||||
sColorAltered = FALSE;
|
||||
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255);
|
||||
}
|
||||
}
|
||||
|
||||
void djui_hud_set_rotation(s16 rotation, f32 pivotX, f32 pivotY) {
|
||||
|
|
|
@ -39,6 +39,7 @@ extern u8 gDjuiHudLockMouse;
|
|||
void djui_hud_set_resolution(enum HudUtilsResolution resolutionType);
|
||||
void djui_hud_set_font(enum DjuiFontType fontType);
|
||||
void djui_hud_set_color(u8 r, u8 g, u8 b, u8 a);
|
||||
void djui_hud_reset_color(void);
|
||||
void djui_hud_set_rotation(s16 rotation, f32 pivotX, f32 pivotY);
|
||||
|
||||
u32 djui_hud_get_screen_width(void);
|
||||
|
|
Loading…
Reference in a new issue