From 1b141fd68ce8339ce73ee698f40f186e5ee4a400 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Wed, 28 Sep 2022 01:33:01 +0200 Subject: [PATCH] FIX: Missing custom colors on ENTER NAME (#1623) --- .../ovl_file_choose/z_file_nameset_PAL.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c index 5a9550827..358ab35f6 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c @@ -114,6 +114,7 @@ void FileChoose_SetNameEntryVtx(GameState* thisx) { u8 temp; s16 phi_v0; char* filename = Save_GetSaveMetaInfo(this->buttonIndex)->playerName; + Color_RGB8 Background_Color = { this->windowColor[0], this->windowColor[1], this->windowColor[2] }; OPEN_DISPS(this->state.gfxCtx); @@ -133,8 +134,9 @@ void FileChoose_SetNameEntryVtx(GameState* thisx) { for (phi_t1 = 0; phi_t1 < 2; phi_t1++, phi_s0 += 4) { if (CVar_GetS32("gHudColors", 1) == 2) { - gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetS32("gCCFileChoosePrimR", 100), CVar_GetS32("gCCFileChoosePrimG", 150), - CVar_GetS32("gCCFileChoosePrimB", 255), 255); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, + CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, + CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, 255); } else { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2], 255); @@ -202,8 +204,9 @@ void FileChoose_SetNameEntryVtx(GameState* thisx) { ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); if (CVar_GetS32("gHudColors", 1) == 2) { - gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetS32("gCCFileChoosePrimR", 100), - CVar_GetS32("gCCFileChoosePrimG", 150), CVar_GetS32("gCCFileChoosePrimB", 255), + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, + CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, + CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->nameEntryBoxAlpha); } else { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2], @@ -279,6 +282,7 @@ void FileChoose_DrawNameEntry(GameState* thisx) { u16 dayTime; s16 validName; char* filename = Save_GetSaveMetaInfo(this->buttonIndex)->playerName; + Color_RGB8 Background_Color = { this->windowColor[0], this->windowColor[1], this->windowColor[2] }; OPEN_DISPS(this->state.gfxCtx); @@ -332,8 +336,9 @@ void FileChoose_DrawNameEntry(GameState* thisx) { PRIMITIVE, 0); if (CVar_GetS32("gHudColors", 1) == 2) { - gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetS32("gCCFileChoosePrimR", 100), - CVar_GetS32("gCCFileChoosePrimG", 150), CVar_GetS32("gCCFileChoosePrimB", 255), + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, + CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, + CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->highlightColor[3]); } else { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->highlightColor[0], this->highlightColor[1],