diff options
| author | PurpleHato <linkvssangoku.jr@gmail.com> | 2024-04-22 01:43:09 +0200 |
|---|---|---|
| committer | Garrett Cox <garrettjcox@gmail.com> | 2024-05-22 09:05:01 -0500 |
| commit | aac00dd71abb35cb075547b784f2d9057acc7b86 (patch) | |
| tree | d41a098028ef93818e2fe42f0c9512dbe21708ac /mm/src/code | |
| parent | f2a61a22b53f9380b8a164e10121cc43f07c9dbb (diff) | |
ADD: 24 Hours Clock + .gitignore on the 2s2h.h (#229)
* ADD: 24 Hours Clock
* TWEAK: gitignore
Diffstat (limited to 'mm/src/code')
| -rw-r--r-- | mm/src/code/z_parameter.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/mm/src/code/z_parameter.c b/mm/src/code/z_parameter.c index 4ebca32ae..0120e2d7d 100644 --- a/mm/src/code/z_parameter.c +++ b/mm/src/code/z_parameter.c @@ -16,6 +16,7 @@ #include "BenPort.h" #include <string.h> #include "BenGui/HudEditor.h" +#include "2s2h_assets.h" #include "Enhancements/GameInteractor/GameInteractor.h" // #region 2S2H [Port] Asset tables we can pull from instead of from ROM @@ -4851,6 +4852,17 @@ void Interface_DrawClock(PlayState* play) { gThreeDayClockHour8Tex, gThreeDayClockHour9Tex, gThreeDayClockHour10Tex, gThreeDayClockHour11Tex, gEmptyTexture, gEmptyTexture, // 2S2H [Port] To account for the vanilla bug detailed later on in this function }; + // 2S2H Region [Enhancements] 24 Hours Clock + static TexturePtr sThreeDayClockHourTwentyHourHoursTextures[] = { + gThreeDayClockHour24Tex, gThreeDayClockHour1Tex, gThreeDayClockHour2Tex, gThreeDayClockHour3Tex, + gThreeDayClockHour4Tex, gThreeDayClockHour5Tex, gThreeDayClockHour6Tex, gThreeDayClockHour7Tex, + gThreeDayClockHour8Tex, gThreeDayClockHour9Tex, gThreeDayClockHour10Tex, gThreeDayClockHour11Tex, + gThreeDayClockHour12Tex, gThreeDayClockHour13Tex, gThreeDayClockHour14Tex, gThreeDayClockHour15Tex, + gThreeDayClockHour16Tex, gThreeDayClockHour17Tex, gThreeDayClockHour18Tex, gThreeDayClockHour19Tex, + gThreeDayClockHour20Tex, gThreeDayClockHour21Tex, gThreeDayClockHour22Tex, gThreeDayClockHour23Tex, + gEmptyTexture, gEmptyTexture, // 2S2H [Port] To account for the vanilla bug detailed later on in this function + // #endregison + }; static s16 sClockInvDiamondPrimRed = 0; static s16 sClockInvDiamondPrimGreen = 155; static s16 sClockInvDiamondPrimBlue = 255; @@ -5212,7 +5224,9 @@ void Interface_DrawClock(PlayState* play) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, sThreeDayClockAlpha); gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[24], 8, 0); - OVERLAY_DISP = Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTextures[sp1C6], 4, 16, 11, 0); + OVERLAY_DISP = CVarGetInteger("gEnhancements.General.24HoursClock", 0) ? + Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTwentyHourHoursTextures[sp1C6], 4, 16, 11, 0) : + Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTextures[sp1C6], 4, 16, 11, 0); // Colours the Three-Day Clocks's Hour Digit Above the Sun gDPPipeSync(OVERLAY_DISP++); @@ -5236,7 +5250,10 @@ void Interface_DrawClock(PlayState* play) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, sThreeDayClockAlpha); gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[32], 8, 0); - OVERLAY_DISP = Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTextures[sp1C6], 4, 16, 11, 0); + OVERLAY_DISP = CVarGetInteger("gEnhancements.General.24HoursClock", 0) ? + Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTwentyHourHoursTextures[sp1C6], 4, 16, 11, 0) : + Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTextures[sp1C6], 4, 16, 11, 0); + // Colours the Three-Day Clocks's Hour Digit Above the Moon gDPPipeSync(OVERLAY_DISP++); |
