N64 Colors V3 (Added Gamecube Color Button Toggle)

This commit is contained in:
takstation 2022-04-20 21:25:56 +04:30
parent 0ec9fc2ecf
commit 5ffa400737
9 changed files with 307 additions and 97 deletions

View File

@ -64,6 +64,9 @@ namespace Game {
Settings.enhancements.mm_bunny_hood = stob(Conf[EnhancementSection]["mm_bunny_hood"]);
CVar_SetS32("gMMBunnyHood", Settings.enhancements.mm_bunny_hood);
Settings.enhancements.gc_colors = stob(Conf[EnhancementSection]["gc_colors"]);
CVar_SetS32("gGameCubeColors", Settings.enhancements.gc_colors);
// Audio
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
CVar_SetFloat("gGameMasterVolume", Settings.audio.master);
@ -156,6 +159,7 @@ namespace Game {
Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu);
Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui);
Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood);
Conf[EnhancementSection]["gc_colors"] = std::to_string(Settings.enhancements.gc_colors);
// Controllers
Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity);

View File

@ -25,6 +25,7 @@ struct SoHConfigType {
bool animated_pause_menu = false;
bool minimal_ui = false;
bool mm_bunny_hood = false;
bool gc_colors = false;
} enhancements;
// Controller

View File

@ -425,6 +425,11 @@ namespace SohImGui {
needs_save = true;
}
if (ImGui::Checkbox("GameCube Colors", &Game::Settings.enhancements.gc_colors)) {
CVar_SetS32("gGameCubeColors", Game::Settings.enhancements.gc_colors);
needs_save = true;
}
ImGui::EndMenu();
}

View File

@ -155,16 +155,16 @@ void func_801109B0(GlobalContext* globalCtx) {
interfaceCtx->unk_23C = interfaceCtx->unk_242 = 0;
R_ITEM_BTN_X(0) = B_BUTTON_X;
R_B_BTN_COLOR(0) = 255;
R_B_BTN_COLOR(1) = 30;
R_B_BTN_COLOR(2) = 30;
R_B_BTN_COLOR(0) = 0;
R_B_BTN_COLOR(1) = 150;
R_B_BTN_COLOR(2) = 0;
R_ITEM_ICON_X(0) = B_BUTTON_X;
R_ITEM_AMMO_X(0) = B_BUTTON_X + 2;
R_A_BTN_X = A_BUTTON_X;
R_A_ICON_X = A_BUTTON_X;
R_A_BTN_COLOR(0) = 0;
R_A_BTN_COLOR(1) = 200;
R_A_BTN_COLOR(2) = 50;
R_A_BTN_COLOR(0) = 90;
R_A_BTN_COLOR(1) = 90;
R_A_BTN_COLOR(2) = 255;
}
void Message_Init(GlobalContext* globalCtx) {

View File

@ -128,18 +128,18 @@ void Message_ResetOcarinaNoteState(void) {
sOcarinaNotesAlphaValues[0] = sOcarinaNotesAlphaValues[1] = sOcarinaNotesAlphaValues[2] =
sOcarinaNotesAlphaValues[3] = sOcarinaNotesAlphaValues[4] = sOcarinaNotesAlphaValues[5] =
sOcarinaNotesAlphaValues[6] = sOcarinaNotesAlphaValues[7] = sOcarinaNotesAlphaValues[8] = 0;
sOcarinaNoteAPrimR = 80;
sOcarinaNoteAPrimG = 255;
sOcarinaNoteAPrimB = 150;
sOcarinaNoteAEnvR = 10;
sOcarinaNoteAEnvG = 10;
sOcarinaNoteAEnvB = 10;
sOcarinaNoteCPrimR = 255;
sOcarinaNoteCPrimG = 255;
sOcarinaNoteCPrimB = 50;
sOcarinaNoteCEnvR = 10;
sOcarinaNoteCEnvG = 10;
sOcarinaNoteCEnvB = 10;
sOcarinaNoteAPrimR = 80;
sOcarinaNoteAPrimG = 150;
sOcarinaNoteAPrimB = 255;
sOcarinaNoteAEnvR = 10;
sOcarinaNoteAEnvG = 10;
sOcarinaNoteAEnvB = 10;
sOcarinaNoteCPrimR = 255;
sOcarinaNoteCPrimG = 255;
sOcarinaNoteCPrimB = 50;
sOcarinaNoteCEnvR = 10;
sOcarinaNoteCEnvG = 10;
sOcarinaNoteCEnvB = 10;
}
void Message_UpdateOcarinaGame(GlobalContext* globalCtx) {
@ -492,16 +492,48 @@ void Message_SetTextColor(MessageContext* msgCtx, u16 colorParameter) {
void Message_DrawTextboxIcon(GlobalContext* globalCtx, Gfx** p, s16 x, s16 y) {
static s16 sIconPrimColors[][3] = {
{ 0, 200, 80 },
{ 50, 255, 130 },
{ 4, 84, 204 },
{ 45, 125, 250 },
};
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
sIconPrimColors[0][0] = 0;
sIconPrimColors[0][1] = 200;
sIconPrimColors[0][2] = 80;
sIconPrimColors[1][0] = 50;
sIconPrimColors[1][0] = 255;
sIconPrimColors[1][0] = 130;
} else {
sIconPrimColors[0][0] = 4;
sIconPrimColors[0][1] = 84;
sIconPrimColors[0][2] = 204;
sIconPrimColors[1][0] = 45;
sIconPrimColors[1][1] = 125;
sIconPrimColors[1][2] = 255;
};
static s16 sIconEnvColors[][3] = {
{ 0, 0, 0 },
{ 0, 70, 255 },
{ 0, 0, 0 },
{ 0, 255, 130 },
};
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
sIconEnvColors[0][0] = 0;
sIconEnvColors[0][1] = 0;
sIconEnvColors[0][2] = 0;
sIconEnvColors[1][0] = 0;
sIconEnvColors[1][1] = 255;
sIconEnvColors[1][2] = 130;
} else {
sIconEnvColors[0][0] = 0;
sIconEnvColors[0][1] = 0;
sIconEnvColors[0][2] = 0;
sIconEnvColors[1][0] = 0;
sIconEnvColors[1][1] = 70;
sIconEnvColors[1][2] = 255;
};
static s16 sIconPrimR = 0;
static s16 sIconPrimG = 200;
static s16 sIconPrimB = 80;
static s16 sIconPrimG = 70;
static s16 sIconPrimB = 255;
static s16 sIconFlashTimer = 12;
static s16 sIconFlashColorIdx = 0;
static s16 sIconEnvR = 0;
@ -544,27 +576,27 @@ void Message_DrawTextboxIcon(GlobalContext* globalCtx, Gfx** p, s16 x, s16 y) {
sIconPrimB += primB;
}
envR = (ABS(sIconEnvR - sIconEnvColors[sIconFlashColorIdx][0])) / sIconFlashTimer;
envG = (ABS(sIconEnvG - sIconEnvColors[sIconFlashColorIdx][1])) / sIconFlashTimer;
envB = (ABS(sIconEnvB - sIconEnvColors[sIconFlashColorIdx][2])) / sIconFlashTimer;
envR = (ABS(sIconEnvR - sIconEnvColors[sIconFlashColorIdx][0])) / sIconFlashTimer;
envG = (ABS(sIconEnvG - sIconEnvColors[sIconFlashColorIdx][1])) / sIconFlashTimer;
envB = (ABS(sIconEnvB - sIconEnvColors[sIconFlashColorIdx][2])) / sIconFlashTimer;
if (sIconEnvR >= sIconEnvColors[sIconFlashColorIdx][0]) {
sIconEnvR -= envR;
} else {
sIconEnvR += envR;
}
if (sIconEnvR >= sIconEnvColors[sIconFlashColorIdx][0]) {
sIconEnvR -= envR;
} else {
sIconEnvR += envR;
}
if (sIconEnvG >= sIconEnvColors[sIconFlashColorIdx][1]) {
sIconEnvG -= envG;
} else {
sIconEnvG += envG;
}
if (sIconEnvG >= sIconEnvColors[sIconFlashColorIdx][1]) {
sIconEnvG -= envG;
} else {
sIconEnvG += envG;
}
if (sIconEnvB >= sIconEnvColors[sIconFlashColorIdx][2]) {
sIconEnvB -= envB;
} else {
sIconEnvB += envB;
}
if (sIconEnvB >= sIconEnvColors[sIconFlashColorIdx][2]) {
sIconEnvB -= envB;
} else {
sIconEnvB += envB;
}
sIconFlashTimer--;
@ -584,8 +616,12 @@ void Message_DrawTextboxIcon(GlobalContext* globalCtx, Gfx** p, s16 x, s16 y) {
gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor(gfx++, 0, 0, sIconPrimR, sIconPrimG, sIconPrimB, 255);
gDPSetEnvColor(gfx++, sIconEnvR, sIconEnvG, sIconEnvB, 255);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(gfx++, 0, 0, 0, 200, 80, 255);
} else {
gDPSetPrimColor(gfx++, 0, 0, sIconPrimR, sIconPrimG, sIconPrimB, 255);
}
gDPSetEnvColor(gfx++, sIconEnvR, sIconEnvG, sIconEnvB, 255);
gDPLoadTextureBlock_4b(gfx++, iconTexture, G_IM_FMT_I, FONT_CHAR_TEX_WIDTH, FONT_CHAR_TEX_HEIGHT, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
@ -1972,12 +2008,12 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
gOcarinaATex, gOcarinaCDownTex, gOcarinaCRightTex, gOcarinaCLeftTex, gOcarinaCUpTex,
};
static s16 sOcarinaNoteAPrimColors[][3] = {
{ 80, 255, 150 },
{ 100, 255, 200 },
{ 80, 150, 255 },
{ 100, 200, 255 },
};
static s16 sOcarinaNoteAEnvColors[][3] = {
{ 10, 10, 10 },
{ 50, 255, 50 },
{ 50, 50, 255 },
};
static s16 sOcarinaNoteCPrimColors[][3] = {
{ 255, 255, 50 },
@ -1987,6 +2023,33 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
sOcarinaNoteAPrimColors[0][0] = 80;
sOcarinaNoteAPrimColors[0][1] = 255;
sOcarinaNoteAPrimColors[0][2] = 150;
sOcarinaNoteAPrimColors[1][0] = 100;
sOcarinaNoteAPrimColors[1][1] = 255;
sOcarinaNoteAPrimColors[1][2] = 200;
sOcarinaNoteAEnvColors[0][0] = 10;
sOcarinaNoteAEnvColors[0][1] = 10;
sOcarinaNoteAEnvColors[0][2] = 10;
sOcarinaNoteAEnvColors[1][0] = 50;
sOcarinaNoteAEnvColors[1][1] = 150;
sOcarinaNoteAEnvColors[1][2] = 50;
} else {
sOcarinaNoteAPrimColors[0][0] = 80;
sOcarinaNoteAPrimColors[0][1] = 150;
sOcarinaNoteAPrimColors[0][2] = 255;
sOcarinaNoteAPrimColors[1][0] = 100;
sOcarinaNoteAPrimColors[1][1] = 200;
sOcarinaNoteAPrimColors[1][2] = 255;
sOcarinaNoteAEnvColors[0][0] = 10;
sOcarinaNoteAEnvColors[0][1] = 10;
sOcarinaNoteAEnvColors[0][2] = 10;
sOcarinaNoteAEnvColors[1][0] = 50;
sOcarinaNoteAEnvColors[1][1] = 50;
sOcarinaNoteAEnvColors[1][2] = 150;
};
static s16 sOcarinaNoteFlashTimer = 12;
static s16 sOcarinaNoteFlashColorIdx = 1;
static s16 sOcarinaSongFanfares[] = {
@ -2902,8 +2965,14 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
gDPPipeSync(gfx++);
if (sOcarinaNoteBuf[i] == OCARINA_NOTE_A) {
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteAPrimR, sOcarinaNoteAPrimG, sOcarinaNoteAPrimB,
sOcarinaNotesAlphaValues[i]);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(gfx++, 0, 0, 80, 255, 150,
sOcarinaNotesAlphaValues[i]);
} else {
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteAPrimR, sOcarinaNoteAPrimG, sOcarinaNoteAPrimB,
sOcarinaNotesAlphaValues[i]);
}
gDPSetEnvColor(gfx++, sOcarinaNoteAEnvR, sOcarinaNoteAEnvG, sOcarinaNoteAEnvB, 0);
} else {
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteCPrimR, sOcarinaNoteCPrimG, sOcarinaNoteCPrimB,

View File

@ -2759,7 +2759,14 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
// Also loads the Item Button Texture reused by other buttons afterwards
gDPPipeSync(OVERLAY_DISP++);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2), interfaceCtx->bAlpha);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 30, 30,
interfaceCtx->bAlpha);
} else {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2),
interfaceCtx->bAlpha);
}
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
OVERLAY_DISP =
@ -2795,7 +2802,11 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
if ((globalCtx->pauseCtx.state != 0) || (globalCtx->pauseCtx.debugState != 0)) {
// Start Button Texture, Color & Label
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha);
} else {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 0, 0, interfaceCtx->startAlpha);
}
gSPWideTextureRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromRightEdge(startButtonLeftPos[gSaveContext.language]) << 2, 68,
(OTRGetRectDimensionFromRightEdge(startButtonLeftPos[gSaveContext.language]) + 22) << 2, 156,
G_TX_RENDERTILE, 0, 0, 1462, 1462);
@ -3381,8 +3392,14 @@ void Interface_Draw(GlobalContext* globalCtx) {
//func_8008A8B8(globalCtx, R_A_BTN_Y, R_A_BTN_Y + 45, rABtnX, rABtnX + 45);
gSPClearGeometryMode(OVERLAY_DISP++, G_CULL_BOTH);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2),
interfaceCtx->aAlpha);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 200, 50,
interfaceCtx->aAlpha);
} else {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2),
interfaceCtx->aAlpha);
}
if (fullUi) {
Interface_DrawActionButton(globalCtx, rABtnX, R_A_BTN_Y);
}

View File

@ -1887,11 +1887,19 @@ void EnOssan_UpdateCursorAnim(EnOssan* this) {
this->cursorAnimState = 0;
}
}
this->cursorColorR = ColChanMix(0, 0.0f, t);
this->cursorColorG = ColChanMix(255, 80.0f, t);
this->cursorColorB = ColChanMix(80, 0.0f, t);
this->cursorColorA = ColChanMix(255, 0.0f, t);
this->cursorAnimTween = t;
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
this->cursorColorR = ColChanMix(0, 0.0f, t);
this->cursorColorG = ColChanMix(255, 80.0f, t);
this->cursorColorB = ColChanMix(80, 0.0f, t);
this->cursorColorA = ColChanMix(255, 0.0f, t);
this->cursorAnimTween = t;
} else {
this->cursorColorR = ColChanMix(0, 0.0f, t);
this->cursorColorG = ColChanMix(80, 80.0f, t);
this->cursorColorB = ColChanMix(255, 0.0f, t);
this->cursorColorA = ColChanMix(255, 0.0f, t);
this->cursorAnimTween = t;
}
}
void EnOssan_UpdateStickDirectionPromptAnim(EnOssan* this) {

View File

@ -494,7 +494,11 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
gDPPipeSync(POLY_KAL_DISP++);
if (D_8082A124[sp218] == 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 255, 150, D_8082A150[sp218]);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 255, 150, D_8082A150[sp218]);
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 150, 255, D_8082A150[sp218]);
}
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 50, D_8082A150[sp218]);
}
@ -524,7 +528,11 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
if (pauseCtx->unk_1E4 == 8) {
if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 255, 150, 200);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 255, 150, 200);
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 150, 255, 200);
}
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 50, 200);
}
@ -579,7 +587,11 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
gDPPipeSync(POLY_KAL_DISP++);
if (D_8082A124[phi_s3] == 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 255, 150, D_8082A150[phi_s3]);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 255, 150, D_8082A150[phi_s3]);
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 150, 255, D_8082A150[phi_s3]);
}
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 50, D_8082A150[phi_s3]);
}

View File

@ -757,7 +757,7 @@ static void* sCursorTexs[] = {
static s16 sCursorColors[][3] = {
{ 255, 255, 255 },
{ 255, 255, 0 },
{ 0, 255, 50 },
{ 0, 50, 255 },
};
static void* sSavePromptTexs[] = {
@ -966,6 +966,16 @@ void KaleidoScope_DrawCursor(GlobalContext* globalCtx, u16 pageIndex) {
temp = pauseCtx->unk_1E4;
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
sCursorColors[2][0] = 0;
sCursorColors[2][1] = 255;
sCursorColors[2][2] = 50;
} else {
sCursorColors[2][0] = 0;
sCursorColors[2][1] = 50;
sCursorColors[2][2] = 255;
}
if ((((pauseCtx->unk_1E4 == 0) || (temp == 8)) && (pauseCtx->state == 6)) ||
((pauseCtx->pageIndex == PAUSE_QUEST) && ((temp < 3) || (temp == 5) || (temp == 8)))) {
@ -1033,6 +1043,10 @@ Gfx* KaleidoScope_DrawPageSections(Gfx* gfx, Vtx* vertices, void** textures) {
void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
static s16 D_8082ACF4[][3] = {
{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 255, 255, 0 }, { 0, 0, 0 },
{ 0, 0, 0 }, { 255, 255, 0 }, { 0, 50, 255 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 50, 255 },
};
static s16 D_8082ACF5[][3] = {
{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 255, 255, 0 }, { 0, 0, 0 },
{ 0, 0, 0 }, { 255, 255, 0 }, { 0, 255, 50 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 255, 50 },
};
@ -1051,37 +1065,73 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
if ((pauseCtx->state < 8) || (pauseCtx->state > 0x11)) {
if (pauseCtx->state != 7) {
stepR = ABS(D_8082AB8C - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0]) / D_8082AD3C;
stepG = ABS(D_8082AB90 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1]) / D_8082AD3C;
stepB = ABS(D_8082AB94 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2]) / D_8082AD3C;
if (D_8082AB8C >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0]) {
D_8082AB8C -= stepR;
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
stepR = ABS(D_8082AB8C - D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][0]) / D_8082AD3C;
stepG = ABS(D_8082AB90 - D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][1]) / D_8082AD3C;
stepB = ABS(D_8082AB94 - D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][2]) / D_8082AD3C;
if (D_8082AB8C >= D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][0]) {
D_8082AB8C -= stepR;
} else {
D_8082AB8C += stepR;
}
if (D_8082AB90 >= D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][1]) {
D_8082AB90 -= stepG;
} else {
D_8082AB90 += stepG;
}
if (D_8082AB94 >= D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][2]) {
D_8082AB94 -= stepB;
} else {
D_8082AB94 += stepB;
}
} else {
D_8082AB8C += stepR;
}
if (D_8082AB90 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1]) {
D_8082AB90 -= stepG;
} else {
D_8082AB90 += stepG;
}
if (D_8082AB94 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2]) {
D_8082AB94 -= stepB;
} else {
D_8082AB94 += stepB;
}
D_8082AD3C--;
if (D_8082AD3C == 0) {
D_8082AB8C = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0];
D_8082AB90 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1];
D_8082AB94 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2];
D_8082AD3C = ZREG(28 + D_8082AD40);
D_8082AD40++;
if (D_8082AD40 >= 4) {
D_8082AD40 = 0;
stepR = ABS(D_8082AB8C - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0]) / D_8082AD3C;
stepG = ABS(D_8082AB90 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1]) / D_8082AD3C;
stepB = ABS(D_8082AB94 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2]) / D_8082AD3C;
if (D_8082AB8C >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0]) {
D_8082AB8C -= stepR;
} else {
D_8082AB8C += stepR;
}
if (D_8082AB90 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1]) {
D_8082AB90 -= stepG;
} else {
D_8082AB90 += stepG;
}
if (D_8082AB94 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2]) {
D_8082AB94 -= stepB;
} else {
D_8082AB94 += stepB;
}
}
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
D_8082AD3C--;
if (D_8082AD3C == 0) {
D_8082AB8C = D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][0];
D_8082AB90 = D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][1];
D_8082AB94 = D_8082ACF5[pauseCtx->cursorColorSet + D_8082AD40][2];
D_8082AD3C = ZREG(28 + D_8082AD40);
D_8082AD40++;
if (D_8082AD40 >= 4) {
D_8082AD40 = 0;
}
}
} else {
D_8082AD3C--;
if (D_8082AD3C == 0) {
D_8082AB8C = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0];
D_8082AB90 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1];
D_8082AB94 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2];
D_8082AD3C = ZREG(28 + D_8082AD40);
D_8082AD40++;
if (D_8082AD40 >= 4) {
D_8082AD40 = 0;
}
}
}
if (pauseCtx->stickRelX < -30) {
if (D_8082AD4C == -1) {
if (--D_8082AD44 < 0) {
@ -1363,7 +1413,11 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
gDPSetCombineLERP(POLY_KAL_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0,
0, PRIMITIVE, 0);
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 100, 255, VREG(61));
}
if (pauseCtx->promptChoice == 0) {
gSPDisplayList(POLY_KAL_DISP++, gPromptCursorLeftDL);
@ -1387,8 +1441,11 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
gDPSetCombineLERP(POLY_KAL_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0,
TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 100, 255, VREG(61));
}
if (pauseCtx->promptChoice == 0) {
gSPDisplayList(POLY_KAL_DISP++, gPromptCursorLeftDL);
} else {
@ -1421,6 +1478,12 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
}
void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) {
static s16 gABtnTexColour[][4] = {
// A button colors
{ 0, 100, 255, 255 }, // Original N64
{ 0, 255, 100, 255 }, // Gamecube
};
static void* D_8082AD54[3] = {
gPauseToEquipENGTex,
gPauseToEquipGERTex,
@ -1737,9 +1800,18 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) {
pauseCtx->infoPanelVtx[21].v.tc[0] = pauseCtx->infoPanelVtx[23].v.tc[0] = D_8082ADE0[gSaveContext.language]
<< 5;
gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[1][0], gABtnTexColour[1][1], gABtnTexColour[1][2],
gABtnTexColour[0][3]); // Set colour to gABtnSymbolTex - Gamecube
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[0][0], gABtnTexColour[0][1], gABtnTexColour[0][2],
gABtnTexColour[0][3]); // Set colour to gABtnSymbolTex - N64
}
gDPPipeSync(POLY_KAL_DISP++);
POLY_KAL_DISP = KaleidoScope_QuadTextureIA8(POLY_KAL_DISP, gABtnSymbolTex, 24, 16, 0);
//gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
//gDPPipeSync(POLY_KAL_DISP++);
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 255, 255);
POLY_KAL_DISP = KaleidoScope_QuadTextureIA8(POLY_KAL_DISP, D_8082AD60[gSaveContext.language],
@ -1817,9 +1889,19 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) {
pauseCtx->infoPanelVtx[21].v.tc[0] = pauseCtx->infoPanelVtx[23].v.tc[0] =
D_8082ADE8[gSaveContext.language] << 5;
gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[1][0], gABtnTexColour[1][1],
gABtnTexColour[1][2],
gABtnTexColour[0][3]); // Set colour to gABtnSymbolTex - Gamecube
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[0][0], gABtnTexColour[0][1],
gABtnTexColour[0][2],
gABtnTexColour[0][3]); // Set colour to gABtnSymbolTex - N64
}
POLY_KAL_DISP = KaleidoScope_QuadTextureIA8(POLY_KAL_DISP, gABtnSymbolTex, 24, 16, 0);
//gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
gDPPipeSync(POLY_KAL_DISP++);
//gDPPipeSync(POLY_KAL_DISP++);
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 255, 255);
POLY_KAL_DISP = KaleidoScope_QuadTextureIA8(POLY_KAL_DISP, D_8082AD6C[gSaveContext.language],
@ -1843,13 +1925,25 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) {
pauseCtx->infoPanelVtx[21].v.tc[0] = pauseCtx->infoPanelVtx[23].v.tc[0] =
D_8082ADD8[gSaveContext.language] << 5;
gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
if (CVar_GetS32("gGameCubeColors", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[1][0], gABtnTexColour[1][1],
gABtnTexColour[1][2],
gABtnTexColour[0][3]); // Set colour to gABtnSymbolTex - Gamecube
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[0][0], gABtnTexColour[0][1],
gABtnTexColour[0][2],
gABtnTexColour[0][3]); // Set colour to gABtnSymbolTex - N64
}
POLY_KAL_DISP = KaleidoScope_QuadTextureIA8(POLY_KAL_DISP, gABtnSymbolTex, 24, 16, 0);
//gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
gDPPipeSync(POLY_KAL_DISP++);
//gDPPipeSync(POLY_KAL_DISP++);
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 255, 255);
POLY_KAL_DISP = KaleidoScope_QuadTextureIA8(POLY_KAL_DISP, D_8082AD54[gSaveContext.language],
D_8082ADD8[gSaveContext.language], 16, 4);
}
}
}
@ -4039,4 +4133,4 @@ void KaleidoScope_Update(GlobalContext* globalCtx)
osSyncPrintf(VT_RST);
break;
}
}
}