mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 22:03:36 -07:00
refactor
This commit is contained in:
parent
015cd80205
commit
10019052a0
1 changed files with 14 additions and 33 deletions
|
@ -3125,9 +3125,15 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
};
|
||||
static s16 rupeeDigitsFirst[] = { 1, 0, 0 };
|
||||
static s16 rupeeDigitsCount[] = { 2, 3, 3 };
|
||||
static s16 rupeeIconGreen[] = { 200, 255, 100 };
|
||||
static s16 rupeeIconBlue[] = { 130, 130, 255 };
|
||||
static s16 rupeeIconRed[] = { 255, 100, 100 };
|
||||
|
||||
// courtesy of https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/ASM/c/hud_colors.c
|
||||
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 f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
|
||||
static s16 D_80125B5C[] = { 91, 91 }; // unused
|
||||
|
@ -3165,40 +3171,15 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
|
||||
func_80094520(globalCtx->state.gfxCtx);
|
||||
|
||||
// Rupee Icon
|
||||
s16 rupeeR;
|
||||
s16 rupeeG;
|
||||
s16 rupeeB;
|
||||
s16 *rColor;
|
||||
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0)) {
|
||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||
case 0:
|
||||
rupeeR = rupeeIconGreen[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;
|
||||
}
|
||||
rColor = &rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)];
|
||||
} else {
|
||||
rColor = &rupeeWalletColors[0];
|
||||
}
|
||||
|
||||
else {
|
||||
rupeeR = rupeeIconGreen[0];
|
||||
rupeeG = rupeeIconGreen[1];
|
||||
rupeeB = rupeeIconGreen[2];
|
||||
}
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rupeeR, rupeeG, rupeeB, interfaceCtx->magicAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor[0], rColor[1], rColor[2], interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255);
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26),
|
||||
206, 16, 16, 1 << 10, 1 << 10);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue