This commit is contained in:
Thomas Achatz 2022-03-31 14:47:27 -05:00
commit 10019052a0

View file

@ -3125,9 +3125,15 @@ void Interface_Draw(GlobalContext* globalCtx) {
}; };
static s16 rupeeDigitsFirst[] = { 1, 0, 0 }; static s16 rupeeDigitsFirst[] = { 1, 0, 0 };
static s16 rupeeDigitsCount[] = { 2, 3, 3 }; static s16 rupeeDigitsCount[] = { 2, 3, 3 };
static s16 rupeeIconGreen[] = { 200, 255, 100 };
static s16 rupeeIconBlue[] = { 130, 130, 255 }; // courtesy of https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/ASM/c/hud_colors.c
static s16 rupeeIconRed[] = { 255, 100, 100 }; static s16 rupeeWalletColors[4][3] = {
{ 0xC8, 0xFF, 0x64 }, // Base Wallet (Green)
{ 0x82, 0x82, 0xFF }, // Adult's Wallet (Blue)
{ 0xFF, 0x64, 0x64 }, // Giant's Wallet (Red)
{ 0xFF, 0x5A, 0xFF }, // Tycoon's Wallet (Purple)
};
static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 }; static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 };
static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
static s16 D_80125B5C[] = { 91, 91 }; // unused static s16 D_80125B5C[] = { 91, 91 }; // unused
@ -3165,40 +3171,15 @@ void Interface_Draw(GlobalContext* globalCtx) {
func_80094520(globalCtx->state.gfxCtx); func_80094520(globalCtx->state.gfxCtx);
// Rupee Icon s16 *rColor;
s16 rupeeR;
s16 rupeeG;
s16 rupeeB;
if (CVar_GetS32("gDynamicWalletIcon", 0)) { if (CVar_GetS32("gDynamicWalletIcon", 0)) {
switch (CUR_UPG_VALUE(UPG_WALLET)) { rColor = &rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)];
case 0: } else {
rupeeR = rupeeIconGreen[0]; rColor = &rupeeWalletColors[0];
rupeeG = rupeeIconGreen[1];
rupeeB = rupeeIconGreen[2];
break;
case 1:
rupeeR = rupeeIconBlue[0];
rupeeG = rupeeIconBlue[1];
rupeeB = rupeeIconBlue[2];
break;
case 2:
rupeeR = rupeeIconRed[0];
rupeeG = rupeeIconRed[1];
rupeeB = rupeeIconRed[2];
break;
default:
break;
}
} }
else { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor[0], rColor[1], rColor[2], interfaceCtx->magicAlpha);
rupeeR = rupeeIconGreen[0];
rupeeG = rupeeIconGreen[1];
rupeeB = rupeeIconGreen[2];
}
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rupeeR, rupeeG, rupeeB, interfaceCtx->magicAlpha);
gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255); gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255);
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26), OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26),
206, 16, 16, 1 << 10, 1 << 10); 206, 16, 16, 1 << 10, 1 << 10);