diff --git a/mm/2s2h/BenGui/HudEditor.cpp b/mm/2s2h/BenGui/HudEditor.cpp index 75b5ad58a..95202bbbf 100644 --- a/mm/2s2h/BenGui/HudEditor.cpp +++ b/mm/2s2h/BenGui/HudEditor.cpp @@ -17,6 +17,7 @@ HudEditorElement hudEditorElements[HUD_EDITOR_ELEMENT_MAX] = { HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_D_PAD, "D-Pad", "DPad", 271, 55, 255, 255, 255, 255), HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_MINIMAP, "Minimap", "Minimap", 295, 220, 0, 255, 255, 160), HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_START, "Start Button", "Start", 136, 17, 255, 130, 60, 255), + HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_CARROT, "Horse Carrots", "Carrots", 160, 64, 236, 92, 41, 255), HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_CLOCK, "Three Day Clock", "Clock", 160, 206, 255, 255, 255, 255), HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_HEARTS, "Hearts", "Hearts", 30, 26, 255, 70, 50, 255), HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_MAGIC_METER, "Magic", "Magic", 18, 34, 0, 200, 0, 255), @@ -206,6 +207,8 @@ void HudEditorWindow::DrawElement() { HUD_EDITOR_ELEMENT_MODE_MOVABLE_RIGHT); CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_START].modeCvar, HUD_EDITOR_ELEMENT_MODE_MOVABLE_RIGHT); + CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_CARROT].modeCvar, + HUD_EDITOR_ELEMENT_MODE_MOVABLE_43); CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_CLOCK].modeCvar, HUD_EDITOR_ELEMENT_MODE_MOVABLE_43); CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_HEARTS].modeCvar, diff --git a/mm/2s2h/BenGui/HudEditor.h b/mm/2s2h/BenGui/HudEditor.h index a022c95ff..0078a6ede 100644 --- a/mm/2s2h/BenGui/HudEditor.h +++ b/mm/2s2h/BenGui/HudEditor.h @@ -32,6 +32,7 @@ typedef enum { HUD_EDITOR_ELEMENT_D_PAD, HUD_EDITOR_ELEMENT_MINIMAP, HUD_EDITOR_ELEMENT_START, + HUD_EDITOR_ELEMENT_CARROT, HUD_EDITOR_ELEMENT_CLOCK, HUD_EDITOR_ELEMENT_HEARTS, HUD_EDITOR_ELEMENT_MAGIC_METER, diff --git a/mm/src/code/z_parameter.c b/mm/src/code/z_parameter.c index 42487add4..6a6297196 100644 --- a/mm/src/code/z_parameter.c +++ b/mm/src/code/z_parameter.c @@ -8025,9 +8025,34 @@ void Interface_DrawMinigameIcons(PlayState* play) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); } - gSPTextureRectangle(OVERLAY_DISP++, rectX << 2, rectY << 2, (rectX + 16) << 2, (rectY + 16) << 2, - G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + // #region 2S2H [Cosmetic] Hud Editor Carrots + HudEditor_SetActiveElement(HUD_EDITOR_ELEMENT_CARROT); + if (HudEditor_ShouldOverrideDraw()) { + // Derived from the original call to gSPTextureRectangle below + // Y pos set to 56 in override mode to ignore minigame state differences + s16 newX = rectX; + s16 newY = 56; + s16 newWidth = 16; + s16 newHeight = 16; + s16 dsdx = 512; + s16 dtdy = 512; + + if (HudEditor_IsActiveElementHidden()) { + break; + } + + HudEditor_ModifyDrawValues(&newX, &newY, &newWidth, &newHeight, &dsdx, &dtdy); + + gSPWideTextureRectangle(OVERLAY_DISP++, newX << 2, newY << 2, (newX + newWidth) << 2, + (newY + newHeight) << 2, G_TX_RENDERTILE, 0, 0, dsdx << 1, dtdy << 1); + } else { + // #endregion + gSPTextureRectangle(OVERLAY_DISP++, rectX << 2, rectY << 2, (rectX + 16) << 2, (rectY + 16) << 2, + G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + } } + + hudEditorActiveElement = HUD_EDITOR_ELEMENT_NONE; } if (gSaveContext.minigameStatus == MINIGAME_STATUS_ACTIVE) {