Skip to content

Commit

Permalink
FIX: Missing custom colors on ENTER NAME (HarbourMasters#1623)
Browse files Browse the repository at this point in the history
  • Loading branch information
PurpleHato authored Sep 27, 2022
1 parent 694c6c9 commit 1b141fd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit 1b141fd

Please sign in to comment.