mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-13 01:57:18 -07:00
Cosmetic Editor v3 (#1898)
* Cosmetic Editor v3 * Workaround for cvar_clear not working correctly * Nest RGBA values under Value key * Implement arrow cosmetics * Implement keese cosmetics * Tweaks to life meter * Implement file choose color * Remove old title fire colors * A few more silly things * Fix from upstream pulls * Fix hilts and sword during ganon cutscene * Add slingshot * Add metal trap and red ice * Add iron knuckles cosmetics * Add navi cosmetics * Attempt to fix linux error * adjust some comments and alignment * Implement trails cosmetics * Implement charged sword spins * Comment out options that haven't been implemented * Fix exploded rupee color in shooting gallery * Add two silly options * Add comments and minor changes from feedback * Adjust comment about boomerang gem * Gracefully handle chest textures missing
This commit is contained in:
parent
8c8c761726
commit
274c12f3cb
52 changed files with 2722 additions and 2942 deletions
|
@ -3338,22 +3338,22 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
Color_RGB8 MagicBorder_2 = { 255, 255, 150 };
|
||||
Color_RGB8 MagicBorder_3 = { 255, 255, 50 };
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) { //This will make custom color based on users selected colors.
|
||||
sMagicBorderColors[0][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_0).r;
|
||||
sMagicBorderColors[0][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_0).g;
|
||||
sMagicBorderColors[0][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_0).b;
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorderActive.Changed", 0)) { //This will make custom color based on users selected colors.
|
||||
sMagicBorderColors[0][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_0).r;
|
||||
sMagicBorderColors[0][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_0).g;
|
||||
sMagicBorderColors[0][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_0).b;
|
||||
|
||||
sMagicBorderColors[1][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_1).r/2;
|
||||
sMagicBorderColors[1][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_1).g/2;
|
||||
sMagicBorderColors[1][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_1).b/2;
|
||||
sMagicBorderColors[1][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_1).r/2;
|
||||
sMagicBorderColors[1][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_1).g/2;
|
||||
sMagicBorderColors[1][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_1).b/2;
|
||||
|
||||
sMagicBorderColors[2][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_2).r/2.5;
|
||||
sMagicBorderColors[2][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_2).g/2.5;
|
||||
sMagicBorderColors[2][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_2).b/2.5;
|
||||
sMagicBorderColors[2][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_2).r/2.5;
|
||||
sMagicBorderColors[2][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_2).g/2.5;
|
||||
sMagicBorderColors[2][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_2).b/2.5;
|
||||
|
||||
sMagicBorderColors[3][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_3).r/3;
|
||||
sMagicBorderColors[3][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_3).g/3;
|
||||
sMagicBorderColors[3][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_3).b/3;
|
||||
sMagicBorderColors[3][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_3).r/3;
|
||||
sMagicBorderColors[3][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_3).g/3;
|
||||
sMagicBorderColors[3][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_3).b/3;
|
||||
}
|
||||
|
||||
static s16 sMagicBorderIndexes[] = { 0, 1, 1, 0 };
|
||||
|
@ -3413,15 +3413,15 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
if (gSaveContext.magic <= 0) {
|
||||
gSaveContext.magic = 0;
|
||||
gSaveContext.magicState = 3;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
} else if (gSaveContext.magic == gSaveContext.magicTarget) {
|
||||
gSaveContext.magicState = 3;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
|
@ -3466,8 +3466,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
break;
|
||||
|
||||
case 5:
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
|
@ -3492,8 +3492,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
gSaveContext.magicState = 0;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
|
@ -3588,6 +3588,13 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
Color_RGB8 magicbar_yellow = {250,250,0}; //Magic bar being used
|
||||
Color_RGB8 magicbar_green = {R_MAGIC_FILL_COLOR(0),R_MAGIC_FILL_COLOR(1),R_MAGIC_FILL_COLOR(2)}; //Magic bar fill
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicActive.Changed", 0)) {
|
||||
magicbar_yellow = CVar_GetRGB("gCosmetics.Consumable_MagicActive.Value", magicbar_yellow);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Magic.Changed", 0)) {
|
||||
magicbar_green = CVar_GetRGB("gCosmetics.Consumable_Magic.Value", magicbar_green);
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (gSaveContext.magicLevel != 0) {
|
||||
|
@ -3661,12 +3668,8 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
|
||||
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {//Original game add color there so to prevent miss match we make it all white :)
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255);
|
||||
} else {
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 100, 50, 50, 255);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, sMagicBorder.r, sMagicBorder.g, sMagicBorder.b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 100, 50, 50, 255);
|
||||
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gMagicMeterEndTex, 8, 16, PosX_Start, magicBarY, 8, 16, 1 << 10, 1 << 10);
|
||||
|
||||
|
@ -3686,11 +3689,7 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
|
||||
if (gSaveContext.magicState == 4) {
|
||||
// Yellow part of the bar indicating the amount of magic to be subtracted
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).r, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).g, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).b, interfaceCtx->magicAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_yellow.r, magicbar_yellow.g, magicbar_yellow.b, interfaceCtx->magicAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_yellow.r, magicbar_yellow.g, magicbar_yellow.b, interfaceCtx->magicAlpha);
|
||||
|
||||
gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
|
@ -3702,22 +3701,14 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
|
||||
// Fill the rest of the bar with the normal magic color
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicPrim", magicbar_green).r, CVar_GetRGB("gCCMagicPrim", magicbar_green).g, CVar_GetRGB("gCCMagicPrim", magicbar_green).b, interfaceCtx->magicAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, rMagicFillX << 2, (magicBarY + 3) << 2,
|
||||
(rMagicFillX + gSaveContext.magicTarget) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE,
|
||||
0, 0, 1 << 10, 1 << 10);
|
||||
} else {
|
||||
// Fill the whole bar with the normal magic color
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicPrim", magicbar_green).r, CVar_GetRGB("gCCMagicPrim", magicbar_green).g, CVar_GetRGB("gCCMagicPrim", magicbar_green).b, interfaceCtx->magicAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
|
||||
gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
|
@ -3790,18 +3781,41 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
s16 dxdy;
|
||||
s16 width;
|
||||
s16 height;
|
||||
Color_RGB8 A_button_ori = {R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2)};
|
||||
Color_RGB8 A_button = CVar_GetRGB("gCCABtnPrim", A_button_ori);
|
||||
Color_RGB8 B_button_ori = {R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2)};
|
||||
Color_RGB8 B_button = CVar_GetRGB("gCCBBtnPrim", B_button_ori);
|
||||
Color_RGB8 Start_button_ori = {120, 120, 120};
|
||||
Color_RGB8 Start_button = CVar_GetRGB("gCCStartBtnPrim", Start_button_ori);
|
||||
Color_RGB8 C_button_ori = {R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2)};
|
||||
Color_RGB8 C_button_uni = CVar_GetRGB("gCCCBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_U = CVar_GetRGB("gCCCUBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_D = CVar_GetRGB("gCCCDBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_L = CVar_GetRGB("gCCCLBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_R = CVar_GetRGB("gCCCRBtnPrim", C_button_ori);
|
||||
|
||||
Color_RGB8 bButtonColor = { 0, 150, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_BButton.Changed", 0)) {
|
||||
bButtonColor = CVar_GetRGB("gCosmetics.Hud_BButton.Value", bButtonColor);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
bButtonColor = (Color_RGB8){ 255, 30, 30 };
|
||||
}
|
||||
|
||||
Color_RGB8 cButtonsColor = { 255, 160, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
cButtonsColor = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", cButtonsColor);
|
||||
}
|
||||
Color_RGB8 cUpButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
cUpButtonColor = CVar_GetRGB("gCosmetics.Hud_CUpButton.Value", cUpButtonColor);
|
||||
}
|
||||
Color_RGB8 cDownButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
cDownButtonColor = CVar_GetRGB("gCosmetics.Hud_CDownButton.Value", cDownButtonColor);
|
||||
}
|
||||
Color_RGB8 cLeftButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
cLeftButtonColor = CVar_GetRGB("gCosmetics.Hud_CLeftButton.Value", cLeftButtonColor);
|
||||
}
|
||||
Color_RGB8 cRightButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
cRightButtonColor = CVar_GetRGB("gCosmetics.Hud_CRightButton.Value", cRightButtonColor);
|
||||
}
|
||||
|
||||
Color_RGB8 startButtonColor = { 200, 0, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_StartButton.Changed", 0)) {
|
||||
startButtonColor = CVar_GetRGB("gCosmetics.Hud_StartButton.Value", startButtonColor);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
startButtonColor = (Color_RGB8){ 120, 120, 120 };
|
||||
}
|
||||
|
||||
//B Button
|
||||
s16 X_Margins_BtnB;
|
||||
|
@ -4044,58 +4058,28 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
// 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);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 150, 0, interfaceCtx->bAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, B_button_ori.r,B_button_ori.g,B_button_ori.b, interfaceCtx->bAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, B_button.r,B_button.g,B_button.b, interfaceCtx->bAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, bButtonColor.r,bButtonColor.g,bButtonColor.b, interfaceCtx->bAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
|
||||
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gButtonBackgroundTex, BBtn_Size, BBtn_Size, PosX_BtnB, PosY_BtnB, BBtnScaled, BBtnScaled, BBtn_factor, BBtn_factor);
|
||||
|
||||
// C-Left Button Color & Texture
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, interfaceCtx->cLeftAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, interfaceCtx->cLeftAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Left_BTN_Pos[0] << 2, C_Left_BTN_Pos[1] << 2,
|
||||
(C_Left_BTN_Pos[0] + R_ITEM_BTN_WIDTH(1)) << 2,
|
||||
(C_Left_BTN_Pos[1] + R_ITEM_BTN_WIDTH(1)) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(1) << 1, R_ITEM_BTN_DD(1) << 1);
|
||||
|
||||
// C-Down Button Color & Texture
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, interfaceCtx->cDownAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, interfaceCtx->cDownAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Down_BTN_Pos[0] << 2, C_Down_BTN_Pos[1] << 2,
|
||||
(C_Down_BTN_Pos[0] + R_ITEM_BTN_WIDTH(2)) << 2,
|
||||
(C_Down_BTN_Pos[1] + R_ITEM_BTN_WIDTH(2)) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(2) << 1, R_ITEM_BTN_DD(2) << 1);
|
||||
|
||||
// C-Right Button Color & Texture
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cRightAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cRightAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cRightAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, interfaceCtx->cRightAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, interfaceCtx->cRightAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Right_BTN_Pos[0] << 2, C_Right_BTN_Pos[1] << 2,
|
||||
(C_Right_BTN_Pos[0] + R_ITEM_BTN_WIDTH(3)) << 2,
|
||||
(C_Right_BTN_Pos[1] + R_ITEM_BTN_WIDTH(3)) << 2,
|
||||
|
@ -4106,13 +4090,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
// Start Button Texture, Color & Label
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 0, 0, interfaceCtx->startAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, Start_button_ori.r, Start_button_ori.g, Start_button_ori.b, interfaceCtx->startAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, Start_button.r, Start_button.g, Start_button.b, interfaceCtx->startAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, startButtonColor.r, startButtonColor.g, startButtonColor.b, interfaceCtx->startAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, PosX_StartBtn << 2, PosY_StartBtn << 2,
|
||||
(PosX_StartBtn + StartBTN_W_Scaled) << 2, (PosY_StartBtn + StartBTN_H_Scaled) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, StartBTN_W_factor, StartBTN_H_factor);
|
||||
|
@ -4177,15 +4155,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
temp = interfaceCtx->healthAlpha;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, temp);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, temp);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, temp);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_U.r, C_button_U.g, C_button_U.b, temp);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cUpButtonColor.r, cUpButtonColor.g, cUpButtonColor.b, temp);
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Up_BTN_Pos[0] << 2, C_Up_BTN_Pos[1] << 2, (C_Up_BTN_Pos[0] + 16) << 2,
|
||||
(C_Up_BTN_Pos[1] + 16) << 2, G_TX_RENDERTILE, 0, 0, 2 << 10, 2 << 10);
|
||||
|
@ -4310,23 +4280,13 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
}
|
||||
|
||||
if (temp == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cLeftAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (temp == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cDownAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, interfaceCtx->cDownAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cRightAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, interfaceCtx->cRightAlpha);
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cRightAlpha);
|
||||
} else if (temp == 1 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (temp == 2 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, interfaceCtx->cRightAlpha);
|
||||
}
|
||||
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, ((u8*)gButtonBackgroundTex), 32, 32,
|
||||
ItemIconPos[temp-1][0], ItemIconPos[temp-1][1], ItemIconWidthFactor[temp-1][0],
|
||||
ItemIconWidthFactor[temp-1][0], ItemIconWidthFactor[temp-1][1], ItemIconWidthFactor[temp-1][1]);
|
||||
|
@ -4948,18 +4908,31 @@ void Interface_Draw(PlayState* play) {
|
|||
static s16 rupeeDigitsCount[] = { 2, 3, 3, 3 };
|
||||
|
||||
// courtesy of https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/ASM/c/hud_colors.c
|
||||
static s16 rupeeWalletColors[4][3] = {
|
||||
static Color_RGB8 rupeeWalletColors[4] = {
|
||||
{ 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). Only used in rando shopsanity.
|
||||
};
|
||||
Color_RGB8 rColor_ori = { 200, 255, 100 };
|
||||
Color_RGB8 rColor;
|
||||
Color_RGB8 keyColor_ori = { 200, 230, 255 };
|
||||
Color_RGB8 keyColor;
|
||||
Color_RGB8 DPad_colors_ori = {255, 255, 255};
|
||||
Color_RGB8 DPad_colors = CVar_GetRGB("gCCDpadPrim", DPad_colors_ori);
|
||||
|
||||
Color_RGB8 keyCountColor = { 200, 230, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_KeyCount.Changed", 0)) {
|
||||
keyCountColor = CVar_GetRGB("gCosmetics.Hud_KeyCount.Value", keyCountColor);
|
||||
}
|
||||
|
||||
Color_RGB8 dPadColor = { 255, 255, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_Dpad.Changed", 0)) {
|
||||
dPadColor = CVar_GetRGB("gCosmetics.Hud_Dpad.Value", dPadColor);
|
||||
}
|
||||
|
||||
Color_RGB8 aButtonColor = { 90, 90, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
aButtonColor = CVar_GetRGB("gCosmetics.Hud_AButton.Value", aButtonColor);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
aButtonColor = (Color_RGB8){ 0, 200, 50 };
|
||||
}
|
||||
|
||||
static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 };
|
||||
static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
|
||||
static s16 D_80125B5C[] = { 91, 91 }; // unused
|
||||
|
@ -5006,33 +4979,45 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
if (fullUi) {
|
||||
// Rupee Icon
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
//Custom Color is on but check if Dynamic Wallet is on.
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0) != 0) {
|
||||
//if on let's use Dynamic Colors
|
||||
rColor.r = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][0];
|
||||
rColor.g = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][1];
|
||||
rColor.b = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][2];
|
||||
} else {
|
||||
//else use our custom color
|
||||
rColor = CVar_GetRGB("gCCRupeePrim", rColor_ori);
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0)) {
|
||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||
case 0:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_GreenRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_BlueRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_BlueRupee.Value", rupeeWalletColors[1]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[1];
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_RedRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_RedRupee.Value", rupeeWalletColors[2]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[2];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_PurpleRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_PurpleRupee.Value", rupeeWalletColors[3]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[3];
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//Custom colors is off so check if Dynamic Wallet is on.
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0) != 0) {
|
||||
rColor.r = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][0];
|
||||
rColor.g = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][1];
|
||||
rColor.b = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][2];
|
||||
if (CVar_GetS32("gCosmetics.Consumable_GreenRupee.Changed", rupeeWalletColors)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor.r = rupeeWalletColors[0][0];
|
||||
rColor.g = rupeeWalletColors[0][1];
|
||||
rColor.b = rupeeWalletColors[0][2];
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
}
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gDynamicWalletIcon", 0) != 1) {
|
||||
//We reset this here so it match user color only if both HUD is on and Dynamic is off.
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
|
||||
}
|
||||
|
||||
//Rupee icon & counter
|
||||
s16 X_Margins_RC;
|
||||
s16 Y_Margins_RC;
|
||||
|
@ -5116,13 +5101,8 @@ void Interface_Draw(PlayState* play) {
|
|||
// Small Key Icon
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCKeysPrim", keyColor_ori).r,CVar_GetRGB("gCCKeysPrim", keyColor_ori).g,CVar_GetRGB("gCCKeysPrim", keyColor_ori).b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); //We reset this here so it match user color :)
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, keyColor_ori.r, keyColor_ori.g, keyColor_ori.b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 20, 255);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, keyCountColor.r,keyCountColor.g,keyCountColor.b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 20, 255); //We reset this here so it match user color :)
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gSmallKeyCounterIconTex, 16, 16, PosX_SKC, PosY_SKC, 16, 16,
|
||||
1 << 10, 1 << 10);
|
||||
|
||||
|
@ -5378,11 +5358,7 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, DPad_colors.r,DPad_colors.g,DPad_colors.b, dpadAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, DPad_colors_ori.r,DPad_colors_ori.g,DPad_colors_ori.b, dpadAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, dPadColor.r, dPadColor.g, dPadColor.b, dpadAlpha);
|
||||
if (fullUi) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, ResourceMgr_LoadFileRaw("assets/textures/parameter_static/gDPad"),
|
||||
G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
|
@ -5439,7 +5415,6 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
// A Button
|
||||
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
|
||||
const Color_RGB8 A_Button_Colors = {R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2)};
|
||||
s16 X_Margins_BtnA;
|
||||
s16 Y_Margins_BtnA;
|
||||
if (CVar_GetS32("gABtnUseMargins", 0) != 0) {
|
||||
|
@ -5483,13 +5458,7 @@ void Interface_Draw(PlayState* play) {
|
|||
}
|
||||
gSPClearGeometryMode(OVERLAY_DISP++, G_CULL_BOTH);
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 90, 90, 255, interfaceCtx->aAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, A_Button_Colors.r, A_Button_Colors.g, A_Button_Colors.b, interfaceCtx->aAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCABtnPrim", A_Button_Colors).r,CVar_GetRGB("gCCABtnPrim", A_Button_Colors).g,CVar_GetRGB("gCCABtnPrim", A_Button_Colors).b, interfaceCtx->aAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, interfaceCtx->aAlpha);
|
||||
if (fullUi) {
|
||||
Interface_DrawActionButton(play, PosX_BtnA, PosY_BtnA);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue