diff --git a/include/functions.h b/include/functions.h index 406bdc410..9e9c85838 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1837,7 +1837,7 @@ void Inventory_UpdateItem(PlayState* play, s16 slot, s16 item); void Interface_SetAButtonDoAction(PlayState* play, u16 aButtonDoAction); void Interface_SetBButtonDoAction(PlayState* play, s16 bButtonDoAction); void Interface_SetTatlCall(PlayState* play, u16 tatlCallState); -void func_80115844(PlayState* play, s16 arg1); +void Interface_LoadBButtonDoActionLabel(PlayState* play, s16 bButtonDoAction); s32 Health_ChangeBy(PlayState* play, s16 healthChange); void Health_GiveHearts(s16 hearts); void Rupees_ChangeBy(s16 rupeeChange); diff --git a/include/regs.h b/include/regs.h index 592d2089a..097ece8ce 100644 --- a/include/regs.h +++ b/include/regs.h @@ -43,8 +43,9 @@ #define bREG(r) BASE_REG(28, r) /* TODO: Actually confirm these, in case of miss-match it's at least a simple list to `sed` */ -#define R_ENABLE_ARENA_DBG SREG(0) // Same as OoT +#define R_TIME_SPEED REG(15) #define R_RUN_SPEED_LIMIT REG(45) +#define R_ENABLE_ARENA_DBG SREG(0) // Same as OoT #define R_UPDATE_RATE SREG(30) #define R_PAUSE_MENU_MODE SREG(94) #define R_C_UP_ICON_X YREG(88) @@ -65,11 +66,13 @@ #define R_ITEM_ICON_X(i) ZREG(82 + i) #define R_ITEM_ICON_Y(i) ZREG(86 + i) #define R_ITEM_ICON_DD(i) ZREG(90 + i) +#define R_MAGIC_DBG_SET_UPGRADE XREG(4) #define R_A_BTN_Y XREG(16) #define R_A_BTN_X XREG(17) #define R_A_ICON_Y XREG(19) #define R_A_ICON_X XREG(20) #define R_A_BTN_COLOR(i) XREG(22 + i) +#define R_A_BTN_Y_OFFSET XREG(31) #define R_MAGIC_CONSUME_TIMER_GIANTS_MASK XREG(41) #define R_MOON_CRASH_TIMER_Y XREG(80) #define R_MOON_CRASH_TIMER_X XREG(81) diff --git a/include/variables.h b/include/variables.h index 70508d72b..c723e92c0 100644 --- a/include/variables.h +++ b/include/variables.h @@ -1099,11 +1099,11 @@ extern UNK_PTR D_801BF5C0; // extern UNK_TYPE1 D_801BFB14; // extern UNK_TYPE1 D_801BFB1C; // extern UNK_TYPE1 D_801BFB24; -// extern UNK_TYPE2 D_801BFB2C; +// extern UNK_TYPE2 sThreeDayClockAlpha; // extern UNK_TYPE2 D_801BFB30; // extern UNK_TYPE2 D_801BFB34; -// extern UNK_TYPE1 D_801BFB38; -// extern UNK_TYPE1 D_801BFB6C; +// extern UNK_TYPE1 sThreeDayClockHours; +// extern UNK_TYPE1 sThreeDayClockHourTextures; // extern UNK_TYPE2 D_801BFBCC; // extern UNK_TYPE2 D_801BFBD0; // extern UNK_TYPE2 D_801BFBD4; @@ -1122,7 +1122,7 @@ extern UNK_PTR D_801BF5C0; // extern UNK_TYPE1 D_801BFC08; // extern UNK_TYPE1 D_801BFC0C; // extern UNK_TYPE1 D_801BFC10; -// extern UNK_TYPE1 D_801BFC14; +// extern UNK_TYPE1 sFinalHoursDigitTextures; // extern UNK_TYPE1 D_801BFC40; // extern UNK_TYPE2 D_801BFC50; // extern UNK_TYPE2 sMinigamePerfectType1PrimColorTargets; @@ -1155,8 +1155,8 @@ extern UNK_PTR D_801BF5C0; // extern UNK_TYPE2 sMinigameCountdownPrimColors; // extern UNK_TYPE1 gStoryTextures; // extern UNK_TYPE1 gStoryTLUTs; -// extern UNK_TYPE1 D_801BFD94; -// extern UNK_TYPE2 D_801BFD98; +// extern UNK_TYPE1 sIsSunsPlayedAtDay; +// extern UNK_TYPE2 sPrevTimeSpeed; // extern UNK_TYPE1 D_801BFDD0; // extern UNK_TYPE1 D_801BFE00; diff --git a/include/z64.h b/include/z64.h index 61323e9ae..a34e0b3ab 100644 --- a/include/z64.h +++ b/include/z64.h @@ -495,7 +495,7 @@ typedef enum { typedef struct { /* 0x00 */ u16 unk_0; - /* 0x02 */ u16 timeIncrement; + /* 0x02 */ u16 sceneTimeSpeed; // time speed value from the scene file /* 0x04 */ f32 unk_4; /* 0x08 */ f32 unk_8; /* 0x0C */ f32 unk_C; diff --git a/include/z64interface.h b/include/z64interface.h index 28ba7d4a5..3c3396ed1 100644 --- a/include/z64interface.h +++ b/include/z64interface.h @@ -4,6 +4,14 @@ #include "ultra64.h" #include "z64view.h" +typedef enum { + /* 0 */ A_BTN_STATE_0, + /* 1 */ A_BTN_STATE_1, + /* 2 */ A_BTN_STATE_2, + /* 3 */ A_BTN_STATE_3, + /* 4 */ A_BTN_STATE_4 +} AButtonState; + typedef enum { /* 0x00 */ DO_ACTION_ATTACK, /* 0x01 */ DO_ACTION_CHECK, @@ -118,10 +126,10 @@ typedef struct { /* 0x1E4 */ OSMesgQueue loadQueue; /* 0x1FC */ OSMesg loadMsg; /* 0x200 */ Viewport viewport; - /* 0x210 */ s16 unk_210; - /* 0x212 */ u16 unk_212; - /* 0x214 */ u16 unk_214; - /* 0x218 */ f32 unk_218; + /* 0x210 */ s16 aButtonState; + /* 0x212 */ u16 aButtonHorseDoAction; // TODO: Confirm. Only seems to be used for Epona and "DO_ACTION_FASTER" + /* 0x214 */ u16 aButtonDoAction; + /* 0x218 */ f32 aButtonRoll; /* 0x21C */ s16 bButtonDoActionActive; /* 0x21E */ s16 bButtonDoAction; /* 0x220 */ s16 tatlCalling; @@ -138,7 +146,7 @@ typedef struct { /* 0x246 */ s16 heartsEnvG[2]; /* 0x24A */ s16 heartsEnvB[2]; /* 0x24E */ s16 health; - /* 0x250 */ s16 unkTimer; + /* 0x250 */ s16 healthTimer; /* 0x252 */ s16 lifeSizeChange; /* 0x254 */ s16 lifeSizeChangeDirection; // 1 means shrinking, 0 growing /* 0x256 */ s16 unk_256; diff --git a/include/z64save.h b/include/z64save.h index c73a5cb94..2fb7831cd 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -56,6 +56,11 @@ typedef enum { #define MAGIC_NORMAL_METER 0x30 #define MAGIC_DOUBLE_METER (2 * MAGIC_NORMAL_METER) +// See `R_MAGIC_DBG_SET_UPGRADE` +#define MAGIC_DBG_SET_UPGRADE_NO_ACTION 0 +#define MAGIC_DBG_SET_UPGRADE_NORMAL_METER -1 +#define MAGIC_DBG_SET_UPGRADE_DOUBLE_METER 1 + #define SECONDS_TO_TIMER(seconds) ((seconds) * 100) #define OSTIME_TO_TIMER(osTime) ((osTime) * 64 / 3000 / 10000) diff --git a/include/z64scene.h b/include/z64scene.h index 9658c4f4d..7550d69e2 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -119,7 +119,7 @@ typedef struct { /* 0x2 */ UNK_TYPE1 pad2[2]; /* 0x4 */ u8 hour; /* 0x5 */ u8 min; - /* 0x6 */ u8 unk6; + /* 0x6 */ u8 timeSpeed; } SCmdTimeSettings; // size = 0x7 typedef struct { diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 79d6d05ff..e1df23c77 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -251,9 +251,9 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c break; case 0x12: if (!gSaveContext.save.isNight) { - gSaveContext.save.time = ((void)0, gSaveContext.save.time) - (u16)REG(15); + gSaveContext.save.time = ((void)0, gSaveContext.save.time) - (u16)R_TIME_SPEED; } else { - gSaveContext.save.time = ((void)0, gSaveContext.save.time) - (u16)(2 * REG(15)); + gSaveContext.save.time = ((void)0, gSaveContext.save.time) - (u16)(2 * R_TIME_SPEED); } break; case 0x13: @@ -325,8 +325,8 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c if (csCtx->frames != D_801BB15C) { D_801BB15C = csCtx->frames; - if (REG(15) != 0) { - gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)REG(15); + if (R_TIME_SPEED != 0) { + gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)R_TIME_SPEED; gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)((void)0, gSaveContext.save.daySpeed); } diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index d2a3a254c..a6989f23e 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -36,7 +36,7 @@ TexturePtr HeartDDTextures[] = { void LifeMeter_Init(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; - interfaceCtx->unkTimer = 320; + interfaceCtx->healthTimer = 320; interfaceCtx->health = gSaveContext.save.playerData.health; @@ -167,39 +167,44 @@ void LifeMeter_UpdateColors(PlayState* play) { sBeatingHeartsDDEnv[2] = (u8)(bFactor + 0) & 0xFF; } +// Unused s32 LifeMeter_SaveInterfaceHealth(PlayState* play) { - gSaveContext.save.playerData.health = play->interfaceCtx.health; + InterfaceContext* interfaceCtx = &play->interfaceCtx; + + gSaveContext.save.playerData.health = interfaceCtx->health; return 1; } +// Unused s32 LifeMeter_IncreaseInterfaceHealth(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; - interfaceCtx->unkTimer = 320; + interfaceCtx->healthTimer = 320; interfaceCtx->health += 0x10; if (play->interfaceCtx.health >= gSaveContext.save.playerData.health) { play->interfaceCtx.health = gSaveContext.save.playerData.health; - return 1; + return true; } - return 0; + return false; } +// Unused s32 LifeMeter_DecreaseInterfaceHealth(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; - if (interfaceCtx->unkTimer != 0) { - interfaceCtx->unkTimer--; + if (interfaceCtx->healthTimer != 0) { + interfaceCtx->healthTimer--; } else { - interfaceCtx->unkTimer = 320; + interfaceCtx->healthTimer = 320; interfaceCtx->health -= 0x10; if (interfaceCtx->health <= 0) { interfaceCtx->health = 0; play->damagePlayer(play, -(((void)0, gSaveContext.save.playerData.health) + 1)); - return 1; + return true; } } - return 0; + return false; } void LifeMeter_Draw(PlayState* play) { diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 5bcd47e15..322e1882e 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -239,8 +239,7 @@ s16 D_801BF9D4[] = { 0xA7, 0xE3 }; s16 D_801BF9D8[] = { 0xF9, 0x10F }; s16 D_801BF9DC[] = { 0x11, 0x12 }; s16 D_801BF9E0[] = { 0x22, 0x12 }; -s16 D_801BF9E4[] = { 0x23F, 0x26C }; -s16 D_801BF9E8[] = { 0x26C, 0x26C }; +s16 D_801BF9E4[] = { 0x23F, 0x26C, 0x26C, 0x26C }; s16 sFinalHoursClockDigitsRed = 0; s16 sFinalHoursClockFrameEnvRed = 0; @@ -459,7 +458,7 @@ s16 sMinigamePerfectVtxPosY[] = { /** * interfaceCtx->actionVtx[0] -> A Button - * interfaceCtx->actionVtx[4] -> A Button Background + * interfaceCtx->actionVtx[4] -> A Button Shadow * interfaceCtx->actionVtx[8] -> A Button Do-Action * interfaceCtx->actionVtx[12] -> Three-Day Clock's Star (for the Minute Tracker) * interfaceCtx->actionVtx[16] -> Three-Day Clock's Sun (for the Day-Time Hours Tracker) @@ -1589,6 +1588,7 @@ void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) { /** * A continuation of the if-else chain from Interface_UpdateButtonsPart1 + * Also used directly when opening the pause menu i.e. skips part 1 */ void Interface_UpdateButtonsPart2(PlayState* play) { MessageContext* msgCtx = &play->msgCtx; @@ -2228,14 +2228,12 @@ void Interface_UpdateButtonsPart1(PlayState* play) { if (!(play->actorCtx.flags & ACTORCTX_FLAG_PICTOGRAPH_ON)) { func_801663C4((play->unk_18E5C != NULL) ? play->unk_18E5C : D_801FBB90, (u8*)((void)0, gSaveContext.pictoPhoto), 0x4600); - interfaceCtx->unk_224 = 0; - interfaceCtx->unk_222 = interfaceCtx->unk_224; + interfaceCtx->unk_222 = interfaceCtx->unk_224 = 0; restoreHudVisibility = true; sPictographState = PICTOGRAPH_STATE_OFF; } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_B)) { play->actorCtx.flags &= ~ACTORCTX_FLAG_PICTOGRAPH_ON; - interfaceCtx->unk_224 = 0; - interfaceCtx->unk_222 = interfaceCtx->unk_224; + interfaceCtx->unk_222 = interfaceCtx->unk_224 = 0; restoreHudVisibility = true; sPictographState = PICTOGRAPH_STATE_OFF; } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) || (func_801A5100() == 1)) { @@ -2255,7 +2253,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) { func_801477B4(play); if (play->msgCtx.choiceIndex != 0) { func_8019F230(); - func_80115844(play, 0x12); + Interface_LoadBButtonDoActionLabel(play, DO_ACTION_STOP); Interface_SetHudVisibility(HUD_VISIBILITY_A_B); sPictographState = PICTOGRAPH_STATE_LENS; REMOVE_QUEST_ITEM(QUEST_PICTOGRAPH); @@ -2293,7 +2291,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) { } else if (play->actorCtx.flags & ACTORCTX_FLAG_PICTOGRAPH_ON) { // Related to pictograph if (!CHECK_QUEST_ITEM(QUEST_PICTOGRAPH)) { - func_80115844(play, 0x12); + Interface_LoadBButtonDoActionLabel(play, DO_ACTION_STOP); Interface_SetHudVisibility(HUD_VISIBILITY_A_B); sPictographState = PICTOGRAPH_STATE_LENS; } else { @@ -3140,15 +3138,15 @@ void Inventory_UpdateItem(PlayState* play, s16 slot, s16 item) { } } -void func_801153C8(s32* buf, s32 size) { +void Interface_MemSetZeroed(u32* buf, s32 count) { s32 i; - for (i = 0; i != size; i++) { + for (i = 0; i != count; i++) { buf[i] = 0; } } -void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 loadOffset) { +void Interface_LoadAButtonDoActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 loadOffset) { static TexturePtr sDoActionTextures[] = { gDoActionAttackENGTex, gDoActionCheckENGTex, @@ -3165,24 +3163,23 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l (u32)SEGMENT_ROM_START(do_action_static) + (action * DO_ACTION_TEX_SIZE), DO_ACTION_TEX_SIZE, 0, &interfaceCtx->loadQueue, 0); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); - return; + } else { + gSegments[0x09] = PHYSICAL_TO_VIRTUAL(interfaceCtx->doActionSegment); + Interface_MemSetZeroed(Lib_SegmentedToVirtual(sDoActionTextures[loadOffset]), 0x60); } - - gSegments[0x09] = PHYSICAL_TO_VIRTUAL(interfaceCtx->doActionSegment); - func_801153C8(Lib_SegmentedToVirtual(sDoActionTextures[loadOffset]), 0x60); } void Interface_SetAButtonDoAction(PlayState* play, u16 aButtonDoAction) { InterfaceContext* interfaceCtx = &play->interfaceCtx; PauseContext* pauseCtx = &play->pauseCtx; - if (interfaceCtx->unk_214 != aButtonDoAction) { - interfaceCtx->unk_214 = aButtonDoAction; - interfaceCtx->unk_210 = 1; - interfaceCtx->unk_218 = 0.0f; - Interface_LoadActionLabel(interfaceCtx, aButtonDoAction, 1); + if (interfaceCtx->aButtonDoAction != aButtonDoAction) { + interfaceCtx->aButtonDoAction = aButtonDoAction; + interfaceCtx->aButtonState = A_BTN_STATE_1; + interfaceCtx->aButtonRoll = 0.0f; + Interface_LoadAButtonDoActionLabel(interfaceCtx, aButtonDoAction, 1); if (pauseCtx->state != 0) { - interfaceCtx->unk_210 = 3; + interfaceCtx->aButtonState = A_BTN_STATE_3; } } } @@ -3235,16 +3232,15 @@ void Interface_SetTatlCall(PlayState* play, u16 tatlCallState) { } } -// Interface_LoadActionLabelB? -void func_80115844(PlayState* play, s16 arg1) { +void Interface_LoadBButtonDoActionLabel(PlayState* play, s16 bButtonDoAction) { InterfaceContext* interfaceCtx = &play->interfaceCtx; - interfaceCtx->unk_224 = arg1; + interfaceCtx->unk_224 = bButtonDoAction; osCreateMesgQueue(&play->interfaceCtx.loadQueue, &play->interfaceCtx.loadMsg, 1); DmaMgr_SendRequestImpl(&interfaceCtx->dmaRequest_184, interfaceCtx->doActionSegment + 0x480, - (arg1 * 0x180) + SEGMENT_ROM_START(do_action_static), 0x180, 0, &interfaceCtx->loadQueue, - NULL); + (bButtonDoAction * 0x180) + SEGMENT_ROM_START(do_action_static), 0x180, 0, + &interfaceCtx->loadQueue, NULL); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); interfaceCtx->unk_222 = 1; @@ -3813,7 +3809,7 @@ void Magic_DrawMeter(PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } -void Interface_SetView1(PlayState* play, s32 topY, s32 bottomY, s32 leftX, s32 rightX) { +void Interface_SetPerspectiveView(PlayState* play, s32 topY, s32 bottomY, s32 leftX, s32 rightX) { InterfaceContext* interfaceCtx = &play->interfaceCtx; Vec3f eye; Vec3f lookAt; @@ -3837,7 +3833,7 @@ void Interface_SetView1(PlayState* play, s32 topY, s32 bottomY, s32 leftX, s32 r View_ApplyPerspectiveToOverlay(&interfaceCtx->view); } -void Interface_SetView2(InterfaceContext* interfaceCtx) { +void Interface_SetOrthoView(InterfaceContext* interfaceCtx) { SET_FULLSCREEN_VIEWPORT(&interfaceCtx->view); View_ApplyOrthoToOverlay(&interfaceCtx->view); } @@ -3867,22 +3863,20 @@ void Interface_DrawItemButtons(PlayState* play) { // B Button Color & Texture OVERLAY_DISP = Gfx_DrawTexRectIA8_DropShadow(OVERLAY_DISP, gButtonBackgroundTex, 0x20, 0x20, D_801BF9D4[0], D_801BF9DC[0], D_801BFAF4[0], D_801BFAF4[0], D_801BF9E4[0] * 2, - D_801BF9E4[0] * 2, 0x64, 0xFF, 0x78, interfaceCtx->bAlpha); + D_801BF9E4[0] * 2, 100, 255, 120, interfaceCtx->bAlpha); if (1) {} gDPPipeSync(OVERLAY_DISP++); // C-Left Button Color & Texture - OVERLAY_DISP = - Gfx_DrawRect_DropShadow(OVERLAY_DISP, D_801BF9D4[1], D_801BF9DC[1], D_801BFAF4[1], D_801BFAF4[1], - D_801BF9E4[1] * 2, D_801BF9E4[1] * 2, 0xFF, 0xF0, 0, interfaceCtx->cLeftAlpha); + OVERLAY_DISP = Gfx_DrawRect_DropShadow(OVERLAY_DISP, D_801BF9D4[1], D_801BF9DC[1], D_801BFAF4[1], D_801BFAF4[1], + D_801BF9E4[1] * 2, D_801BF9E4[1] * 2, 255, 240, 0, interfaceCtx->cLeftAlpha); // C-Down Button Color & Texture - OVERLAY_DISP = - Gfx_DrawRect_DropShadow(OVERLAY_DISP, D_801BF9D8[0], D_801BF9E0[0], D_801BFAF8[0], D_801BFAF8[0], - D_801BF9E8[0] * 2, D_801BF9E8[0] * 2, 0xFF, 0xF0, 0, interfaceCtx->cDownAlpha); + OVERLAY_DISP = Gfx_DrawRect_DropShadow(OVERLAY_DISP, D_801BF9D8[0], D_801BF9E0[0], D_801BFAF8[0], D_801BFAF8[0], + D_801BF9E4[2] * 2, D_801BF9E4[2] * 2, 255, 240, 0, interfaceCtx->cDownAlpha); // C-Right Button Color & Texture OVERLAY_DISP = Gfx_DrawRect_DropShadow(OVERLAY_DISP, D_801BF9D8[1], D_801BF9E0[1], D_801BFAF8[1], D_801BFAF8[1], - D_801BF9E8[1] * 2, D_801BF9E8[1] * 2, 0xFF, 0xF0, 0, interfaceCtx->cRightAlpha); + D_801BF9E4[3] * 2, D_801BF9E4[3] * 2, 255, 240, 0, interfaceCtx->cRightAlpha); if ((pauseCtx->state < 8) || (pauseCtx->state >= 19)) { if ((play->pauseCtx.state != 0) || (play->pauseCtx.debugEditor != DEBUG_EDITOR_NONE)) { @@ -4043,7 +4037,7 @@ void Interface_DrawAmmoCount(PlayState* play, s16 button, s16 alpha) { CLOSE_DISPS(play->state.gfxCtx); } -void func_80118084(PlayState* play) { +void Interface_DrawBButtonIcons(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; Player* player = GET_PLAYER(play); @@ -4124,7 +4118,10 @@ void func_80118084(PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } -void func_80118890(PlayState* play) { +/** + * Draws the icons and ammo for each of the C buttons + */ +void Interface_DrawCButtonIcons(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; OPEN_DISPS(play->state.gfxCtx); @@ -4171,7 +4168,7 @@ void func_80118890(PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } -void func_80118BA4(PlayState* play) { +void Interface_DrawAButton(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; s16 aAlpha; @@ -4185,7 +4182,7 @@ void func_80118BA4(PlayState* play) { func_8012C8D4(play->state.gfxCtx); - Interface_SetView1(play, XREG(31) + 0x19, XREG(31) + 0x46, 192, 237); + Interface_SetPerspectiveView(play, 25 + R_A_BTN_Y_OFFSET, 70 + R_A_BTN_Y_OFFSET, 192, 237); gSPClearGeometryMode(OVERLAY_DISP++, G_CULL_BOTH); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); @@ -4193,8 +4190,9 @@ void func_80118BA4(PlayState* play) { Matrix_Translate(0.0f, 0.0f, -38.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); - Matrix_RotateXFApply(interfaceCtx->unk_218 / 10000.0f); + Matrix_RotateXFApply(interfaceCtx->aButtonRoll / 10000.0f); + // Draw A button Shadow gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPPipeSync(OVERLAY_DISP++); gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[4], 4, 0); @@ -4202,14 +4200,16 @@ void func_80118BA4(PlayState* play) { OVERLAY_DISP = Gfx_DrawTexQuadIA8(OVERLAY_DISP, gButtonBackgroundTex, 32, 32, 0); + // Draw A Button Colored gDPPipeSync(OVERLAY_DISP++); - Interface_SetView1(play, XREG(31) + 0x17, XREG(31) + 0x44, 190, 235); + Interface_SetPerspectiveView(play, 23 + R_A_BTN_Y_OFFSET, 68 + R_A_BTN_Y_OFFSET, 190, 235); gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[0], 4, 0); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 200, 255, interfaceCtx->aAlpha); gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); + // Draw A Button Do-Action gDPPipeSync(OVERLAY_DISP++); - Interface_SetView1(play, XREG(31) + 0x17, XREG(31) + 0x44, 190, 235); + Interface_SetPerspectiveView(play, 23 + R_A_BTN_Y_OFFSET, 68 + R_A_BTN_Y_OFFSET, 190, 235); gSPSetGeometryMode(OVERLAY_DISP++, G_CULL_BACK); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); @@ -4218,12 +4218,12 @@ void func_80118BA4(PlayState* play) { Matrix_Translate(0.0f, 0.0f, D_801BF9CC[gSaveContext.options.language] / 10.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); - Matrix_RotateXFApply(interfaceCtx->unk_218 / 10000.0f); + Matrix_RotateXFApply(interfaceCtx->aButtonRoll / 10000.0f); gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[8], 4, 0); // Draw Action Label - if (((interfaceCtx->unk_210 < 2) || (interfaceCtx->unk_210 == 3))) { + if (((interfaceCtx->aButtonState <= A_BTN_STATE_1) || (interfaceCtx->aButtonState == A_BTN_STATE_3))) { OVERLAY_DISP = Gfx_DrawTexQuad4b(OVERLAY_DISP, interfaceCtx->doActionSegment, 3, DO_ACTION_TEX_WIDTH, DO_ACTION_TEX_HEIGHT, 0); } else { @@ -4239,7 +4239,7 @@ s16 D_801BFB14[] = { 255, 100, 255, 0 }; // magicArrowEffectsR s16 D_801BFB1C[] = { 0, 100, 255, 0 }; // magicArrowEffectsG s16 D_801BFB24[] = { 0, 255, 100, 0 }; // magicArrowEffectsB -void func_80119030(PlayState* play) { +void Interface_DrawPauseMenuEquippingIcons(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; PauseContext* pauseCtx = &play->pauseCtx; s16 temp; @@ -4248,7 +4248,7 @@ void func_80119030(PlayState* play) { gDPPipeSync(OVERLAY_DISP++); - Interface_SetView2(interfaceCtx); + Interface_SetOrthoView(interfaceCtx); if (pauseCtx->state == 6) { if ((pauseCtx->unk_200 == 3) || (pauseCtx->unk_200 == 0xF)) { @@ -4309,19 +4309,17 @@ void func_80119030(PlayState* play) { */ #ifdef NON_MATCHING void Interface_DrawClock(PlayState* play) { - static s16 D_801BFB2C = 255; // clockAlpha - static s16 D_801BFB30 = 0; // clockAlphaTimer1 - static s16 D_801BFB34 = 0; // clockAlphaTimer2 - // clockHours - static u16 D_801BFB38[] = { + static s16 sThreeDayClockAlpha = 255; + static s16 D_801BFB30 = 0; // clockAlphaTimer1 + static s16 D_801BFB34 = 0; // clockAlphaTimer2 + static u16 sThreeDayClockHours[] = { CLOCK_TIME(0, 0), CLOCK_TIME(1, 0), CLOCK_TIME(2, 0), CLOCK_TIME(3, 0), CLOCK_TIME(4, 0), CLOCK_TIME(5, 0), CLOCK_TIME(6, 0), CLOCK_TIME(7, 0), CLOCK_TIME(8, 0), CLOCK_TIME(9, 0), CLOCK_TIME(10, 0), CLOCK_TIME(11, 0), CLOCK_TIME(12, 0), CLOCK_TIME(13, 0), CLOCK_TIME(14, 0), CLOCK_TIME(15, 0), CLOCK_TIME(16, 0), CLOCK_TIME(17, 0), CLOCK_TIME(18, 0), CLOCK_TIME(19, 0), CLOCK_TIME(20, 0), CLOCK_TIME(21, 0), CLOCK_TIME(22, 0), CLOCK_TIME(23, 0), CLOCK_TIME(24, 0) - 1, }; - // threeDayTimerHourTexs - static TexturePtr D_801BFB6C[] = { + static TexturePtr sThreeDayClockHourTextures[] = { gThreeDayClockHour12Tex, gThreeDayClockHour1Tex, gThreeDayClockHour2Tex, gThreeDayClockHour3Tex, gThreeDayClockHour4Tex, gThreeDayClockHour5Tex, gThreeDayClockHour6Tex, gThreeDayClockHour7Tex, gThreeDayClockHour8Tex, gThreeDayClockHour9Tex, gThreeDayClockHour10Tex, gThreeDayClockHour11Tex, @@ -4347,8 +4345,7 @@ void Interface_DrawClock(PlayState* play) { static s16 D_801BFC08[] = { 100, 0 }; // finalHoursClockFrameEnvRedTargets static s16 D_801BFC0C[] = { 30, 0 }; // finalHoursClockFrameEnvGreenTargets static s16 D_801BFC10[] = { 100, 0 }; // finalHoursClockFrameEnvBlueTargets - // finalHoursCounterDigitTex - static TexturePtr D_801BFC14[] = { + static TexturePtr sFinalHoursDigitTextures[] = { gFinalHoursClockDigit0Tex, gFinalHoursClockDigit1Tex, gFinalHoursClockDigit2Tex, gFinalHoursClockDigit3Tex, gFinalHoursClockDigit4Tex, gFinalHoursClockDigit5Tex, gFinalHoursClockDigit6Tex, gFinalHoursClockDigit7Tex, gFinalHoursClockDigit8Tex, gFinalHoursClockDigit9Tex, gFinalHoursClockColonTex, @@ -4377,7 +4374,7 @@ void Interface_DrawClock(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - if (REG(15) != 0) { + if (R_TIME_SPEED != 0) { if ((msgCtx->msgMode == 0) || ((play->actorCtx.flags & ACTORCTX_FLAG_1) && !Play_InCsMode(play)) || (msgCtx->msgMode == 0) || ((msgCtx->currentTextId >= 0x100) && (msgCtx->currentTextId <= 0x200)) || (gSaveContext.gameMode == 3)) { @@ -4389,33 +4386,33 @@ void Interface_DrawClock(PlayState* play) { */ if (((void)0, gSaveContext.hudVisibility) == HUD_VISIBILITY_ALL) { if (func_801234D4(play) != 0) { - D_801BFB2C = 80; + sThreeDayClockAlpha = 80; D_801BFB30 = 5; D_801BFB34 = 20; } else if (D_801BFB34 != 0) { D_801BFB34--; } else if (D_801BFB30 != 0) { - colorStep = ABS_ALT(D_801BFB2C - 255) / D_801BFB30; - D_801BFB2C += colorStep; + colorStep = ABS_ALT(sThreeDayClockAlpha - 255) / D_801BFB30; + sThreeDayClockAlpha += colorStep; - if (D_801BFB2C >= 255) { - D_801BFB2C = 255; + if (sThreeDayClockAlpha >= 255) { + sThreeDayClockAlpha = 255; D_801BFB30 = 0; } } else { if (play->actorCtx.flags & ACTORCTX_FLAG_1) { - D_801BFB2C = 255; + sThreeDayClockAlpha = 255; } else { - D_801BFB2C = interfaceCtx->bAlpha; + sThreeDayClockAlpha = interfaceCtx->bAlpha; } D_801BFB34 = 0; D_801BFB30 = 0; } } else { if (play->actorCtx.flags & ACTORCTX_FLAG_1) { - D_801BFB2C = 255; + sThreeDayClockAlpha = 255; } else { - D_801BFB2C = interfaceCtx->bAlpha; + sThreeDayClockAlpha = interfaceCtx->bAlpha; } D_801BFB34 = 0; D_801BFB30 = 0; @@ -4430,7 +4427,7 @@ void Interface_DrawClock(PlayState* play) { */ gDPSetAlphaCompare(OVERLAY_DISP++, G_AC_THRESHOLD); gDPSetRenderMode(OVERLAY_DISP++, G_RM_XLU_SURF, G_RM_XLU_SURF2); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 130, 130, 130, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 130, 130, 130, sThreeDayClockAlpha); gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); @@ -4441,7 +4438,7 @@ void Interface_DrawClock(PlayState* play) { * Draw Clock's Border */ gDPPipeSync(OVERLAY_DISP++); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, sThreeDayClockAlpha); gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); @@ -4524,12 +4521,13 @@ void Interface_DrawClock(PlayState* play) { gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, D_801BFBCC, D_801BFBD0, 255, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, D_801BFBCC, D_801BFBD0, 255, + sThreeDayClockAlpha); gDPSetEnvColor(OVERLAY_DISP++, D_801BFBD8, D_801BFBDC, D_801BFBE0, 0); } else { // Clock diamond is green for regular daySpeed gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 170, 100, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 170, 100, sThreeDayClockAlpha); } OVERLAY_DISP = Gfx_DrawTexRectIA8(OVERLAY_DISP, gThreeDayClockDiamondTex, 40, 32, 140, @@ -4539,7 +4537,7 @@ void Interface_DrawClock(PlayState* play) { * Draw Three-Day Clock's Day-Number over Diamond */ gDPPipeSync(OVERLAY_DISP++); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 155, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 155, sThreeDayClockAlpha); OVERLAY_DISP = Gfx_DrawTexRectIA8(OVERLAY_DISP, interfaceCtx->doActionSegment + 0x780, 48, 27, 137, 192, 48, 27, 1 << 10, 1 << 10); @@ -4570,8 +4568,8 @@ void Interface_DrawClock(PlayState* play) { gSPMatrix(OVERLAY_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (D_801BFB2C != 255) { - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 110, D_801BFB2C); + if (sThreeDayClockAlpha != 255) { + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 110, sThreeDayClockAlpha); } else { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 110, D_801BF97C); } @@ -4601,7 +4599,7 @@ void Interface_DrawClock(PlayState* play) { // determines the current hour for (sp1C6 = 0; sp1C6 <= 24; sp1C6++) { - if (((void)0, gSaveContext.save.time) < D_801BFB38[sp1C6 + 1]) { + if (((void)0, gSaveContext.save.time) < sThreeDayClockHours[sp1C6 + 1]) { break; } } @@ -4615,7 +4613,7 @@ void Interface_DrawClock(PlayState* play) { gDPPipeSync(OVERLAY_DISP++); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 100, 110, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 100, 110, sThreeDayClockAlpha); Matrix_Translate(sp1D8, temp_f14, 0.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); @@ -4634,7 +4632,7 @@ void Interface_DrawClock(PlayState* play) { gDPPipeSync(OVERLAY_DISP++); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 55, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 55, sThreeDayClockAlpha); Matrix_Translate(sp1D8, temp_f14, 0.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); @@ -4666,14 +4664,15 @@ void Interface_DrawClock(PlayState* play) { gDPPipeSync(OVERLAY_DISP++); gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, sThreeDayClockAlpha); gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[24], 8, 0); - OVERLAY_DISP = Gfx_DrawTexQuad4b(OVERLAY_DISP, D_801BFB6C[sp1C6], 4, 16, 11, 0); + OVERLAY_DISP = + Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTextures[sp1C6], 4, 16, 11, 0); // Colours the Three-Day Clocks's Hour Digit Above the Sun gDPPipeSync(OVERLAY_DISP++); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 155, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 155, sThreeDayClockAlpha); gSP1Quadrangle(OVERLAY_DISP++, 4, 6, 7, 5, 0); /** @@ -4690,14 +4689,15 @@ void Interface_DrawClock(PlayState* play) { gDPPipeSync(OVERLAY_DISP++); gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, sThreeDayClockAlpha); gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[32], 8, 0); - OVERLAY_DISP = Gfx_DrawTexQuad4b(OVERLAY_DISP, D_801BFB6C[sp1C6], 4, 16, 11, 0); + OVERLAY_DISP = + Gfx_DrawTexQuad4b(OVERLAY_DISP, sThreeDayClockHourTextures[sp1C6], 4, 16, 11, 0); // Colours the Three-Day Clocks's Hour Digit Above the Moon gDPPipeSync(OVERLAY_DISP++); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 155, D_801BFB2C); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 155, sThreeDayClockAlpha); gSP1Quadrangle(OVERLAY_DISP++, 4, 6, 7, 5, 0); // Unknown @@ -4757,7 +4757,7 @@ void Interface_DrawClock(PlayState* play) { } } - sp1E6 = D_801BFB2C; + sp1E6 = sThreeDayClockAlpha; if (sp1E6 != 0) { sp1E6 = 255; } @@ -4832,9 +4832,9 @@ void Interface_DrawClock(PlayState* play) { for (sp1C6 = 0; sp1C6 < 8; sp1C6++) { index = D_801BFC40[sp1C6]; - OVERLAY_DISP = - Gfx_DrawTexRectI8(OVERLAY_DISP, D_801BFC14[finalHoursClockSlots[sp1C6]], 8, 8, - index, 205, 8, 8, 1 << 10, 1 << 10); + OVERLAY_DISP = Gfx_DrawTexRectI8( + OVERLAY_DISP, sFinalHoursDigitTextures[finalHoursClockSlots[sp1C6]], 8, 8, + index, 205, 8, 8, 1 << 10, 1 << 10); } } } @@ -4846,17 +4846,17 @@ void Interface_DrawClock(PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } #else -s16 D_801BFB2C = 255; +s16 sThreeDayClockAlpha = 255; s16 D_801BFB30 = 0; s16 D_801BFB34 = 0; -u16 D_801BFB38[] = { +u16 sThreeDayClockHours[] = { CLOCK_TIME(0, 0), CLOCK_TIME(1, 0), CLOCK_TIME(2, 0), CLOCK_TIME(3, 0), CLOCK_TIME(4, 0), CLOCK_TIME(5, 0), CLOCK_TIME(6, 0), CLOCK_TIME(7, 0), CLOCK_TIME(8, 0), CLOCK_TIME(9, 0), CLOCK_TIME(10, 0), CLOCK_TIME(11, 0), CLOCK_TIME(12, 0), CLOCK_TIME(13, 0), CLOCK_TIME(14, 0), CLOCK_TIME(15, 0), CLOCK_TIME(16, 0), CLOCK_TIME(17, 0), CLOCK_TIME(18, 0), CLOCK_TIME(19, 0), CLOCK_TIME(20, 0), CLOCK_TIME(21, 0), CLOCK_TIME(22, 0), CLOCK_TIME(23, 0), CLOCK_TIME(24, 0) - 1, }; -TexturePtr D_801BFB6C[] = { +TexturePtr sThreeDayClockHourTextures[] = { gThreeDayClockHour12Tex, gThreeDayClockHour1Tex, gThreeDayClockHour2Tex, gThreeDayClockHour3Tex, gThreeDayClockHour4Tex, gThreeDayClockHour5Tex, gThreeDayClockHour6Tex, gThreeDayClockHour7Tex, gThreeDayClockHour8Tex, gThreeDayClockHour9Tex, gThreeDayClockHour10Tex, gThreeDayClockHour11Tex, @@ -4882,7 +4882,7 @@ s16 D_801BFC04[] = { 255, 0 }; s16 D_801BFC08[] = { 100, 0 }; s16 D_801BFC0C[] = { 30, 0 }; s16 D_801BFC10[] = { 100, 0 }; -TexturePtr D_801BFC14[] = { +TexturePtr sFinalHoursDigitTextures[] = { gFinalHoursClockDigit0Tex, gFinalHoursClockDigit1Tex, gFinalHoursClockDigit2Tex, gFinalHoursClockDigit3Tex, gFinalHoursClockDigit4Tex, gFinalHoursClockDigit5Tex, gFinalHoursClockDigit6Tex, gFinalHoursClockDigit7Tex, gFinalHoursClockDigit8Tex, gFinalHoursClockDigit9Tex, gFinalHoursClockColonTex, @@ -5032,10 +5032,10 @@ void Interface_UpdateMinigamePerfectType1(PlayState* play) { } s16 D_801BFC6C[] = { - 0x004E, 0x0036, 0x001D, 0x0005, 0xFFEE, 0xFFD6, 0xFFBD, 0xFFAB, + 78, 54, 29, 5, 0xFFEE, 0xFFD6, 0xFFBD, 0xFFAB, }; s16 D_801BFC7C[] = { - 0x00B4, 0x00B4, 0x00B4, 0x00B4, 0xFF4C, 0xFF4C, 0xFF4C, 0xFF4C, + 180, 180, 180, 180, 0xFF4C, 0xFF4C, 0xFF4C, 0xFF4C, }; s16 sMinigamePerfectType2PrimColorTargets[2][3] = { { 255, 255, 255 }, @@ -5182,7 +5182,7 @@ void Interface_UpdateMinigamePerfectType2(PlayState* play) { } s16 D_801BFC98[] = { - 0x004E, 0x0036, 0x001D, 0x0005, 0xFFEE, 0xFFD6, 0xFFBD, 0xFFAB, + 78, 54, 29, 5, 0xFFEE, 0xFFD6, 0xFFBD, 0xFFAB, }; u16 D_801BFCA8[] = { 0xC000, 0xE000, 0x0000, 0x2000, 0xA000, 0x8000, 0x6000, 0x4000, @@ -5521,9 +5521,9 @@ void Interface_DrawTimers(PlayState* play) { if (interfaceCtx->magicAlpha != 255) { gSaveContext.timerY[sTimerId] = 22; } else if (gSaveContext.save.playerData.healthCapacity > 0xA0) { - gSaveContext.timerY[sTimerId] = 54; + gSaveContext.timerY[sTimerId] = 54; // two rows of hearts } else { - gSaveContext.timerY[sTimerId] = 46; + gSaveContext.timerY[sTimerId] = 46; // one row of hearts } if ((interfaceCtx->minigameState == MINIGAME_STATE_COUNTDOWN_GO) || @@ -5578,9 +5578,9 @@ void Interface_DrawTimers(PlayState* play) { } else { gSaveContext.timerX[sTimerId] = 26; if (gSaveContext.save.playerData.healthCapacity > 0xA0) { - gSaveContext.timerY[sTimerId] = 54; + gSaveContext.timerY[sTimerId] = 54; // two rows of hearts } else { - gSaveContext.timerY[sTimerId] = 46; + gSaveContext.timerY[sTimerId] = 46; // one row of hearts } } @@ -5939,12 +5939,12 @@ void Interface_UpdateBottleTimers(PlayState* play) { void Interface_DrawMinigameIcons(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; - s16 sp42; - s16 sp40; - s16 sp3E; - s16 sp3C; - s16 phi_a0; - s16 phi_a1; + s16 i; + s16 numDigitsDrawn; + s16 rectX; + s16 rectY; + s16 width; + s16 height; OPEN_DISPS(play->state.gfxCtx); @@ -5952,25 +5952,25 @@ void Interface_DrawMinigameIcons(PlayState* play) { if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) { // Carrots rendering if the action corresponds to riding a horse - if (interfaceCtx->unk_212 == 8) { + if (interfaceCtx->aButtonHorseDoAction == DO_ACTION_FASTER) { // Load Carrot Icon gDPLoadTextureBlock(OVERLAY_DISP++, gCarrotIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - sp3E = 110; - sp3C = (interfaceCtx->minigameState != MINIGAME_STATE_NONE) ? 200 : 56; + rectX = 110; + rectY = (interfaceCtx->minigameState != MINIGAME_STATE_NONE) ? 200 : 56; // Draw 6 carrots - for (sp42 = 1; sp42 < 7; sp42++, sp3E += 16) { + for (i = 1; i < 7; i++, rectX += 16) { // Carrot Color (based on availability) - if ((interfaceCtx->numHorseBoosts == 0) || (interfaceCtx->numHorseBoosts < sp42)) { + if ((interfaceCtx->numHorseBoosts == 0) || (interfaceCtx->numHorseBoosts < i)) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 150, 255, interfaceCtx->aAlpha); } else { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); } - gSPTextureRectangle(OVERLAY_DISP++, sp3E << 2, sp3C << 2, (sp3E + 16) << 2, (sp3C + 16) << 2, + gSPTextureRectangle(OVERLAY_DISP++, rectX << 2, rectY << 2, (rectX + 16) << 2, (rectY + 16) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } } @@ -5979,13 +5979,13 @@ void Interface_DrawMinigameIcons(PlayState* play) { gDPPipeSync(OVERLAY_DISP++); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - phi_a0 = 0x18; - phi_a1 = 0x10; - sp3E = 0x14; + width = 24; + height = 16; + rectX = 20; if (gSaveContext.save.playerData.healthCapacity > 0xA0) { - sp3C = 0x4B; + rectY = 75; // two rows of hearts } else { - sp3C = 0x43; + rectY = 67; // one row of hearts } if (gSaveContext.save.entrance == ENTRANCE(WATERFALL_RAPIDS, 1)) { @@ -6001,9 +6001,9 @@ void Interface_DrawMinigameIcons(PlayState* play) { G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } else if (play->sceneId == SCENE_30GYOSON) { - phi_a0 = 0x10; - phi_a1 = 0x1E; - sp3E = 0x18; + width = 16; + height = 30; + rectX = 24; gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 100, 75, interfaceCtx->bAlpha); gDPSetEnvColor(OVERLAY_DISP++, 55, 55, 0, 255); gDPLoadTextureBlock(OVERLAY_DISP++, gFishermanMinigameTorchIconTex, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 30, 0, @@ -6017,31 +6017,31 @@ void Interface_DrawMinigameIcons(PlayState* play) { G_TX_NOLOD, G_TX_NOLOD); } - gSPTextureRectangle(OVERLAY_DISP++, (sp3E << 2), (sp3C << 2), ((sp3E + phi_a0) << 2), - ((sp3C + phi_a1) << 2), G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + gSPTextureRectangle(OVERLAY_DISP++, (rectX << 2), (rectY << 2), ((rectX + width) << 2), + ((rectY + height) << 2), G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); gDPPipeSync(OVERLAY_DISP++); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); if (play->sceneId == SCENE_30GYOSON) { - sp3E += 0x14; + rectX += 20; if (gSaveContext.save.playerData.healthCapacity > 0xA0) { - sp3C = 0x57; + rectY = 87; // two rows of hearts } else { - sp3C = 0x4F; + rectY = 79; // one row of hearts } } else { - sp3E += 0x1A; + rectX += 26; } - for (sp42 = sp40 = 0; sp42 < 4; sp42++) { - if ((sMinigameScoreDigits[sp42] != 0) || (sp40 != 0) || (sp42 >= 3)) { - OVERLAY_DISP = Gfx_DrawTexRectI8(OVERLAY_DISP, - ((u8*)gCounterDigit0Tex + (8 * 16 * sMinigameScoreDigits[sp42])), - 8, 0x10, sp3E, sp3C - 2, 9, 0xFA, 0x370, 0x370); - sp3E += 9; - sp40++; + for (i = 0, numDigitsDrawn = 0; i < 4; i++) { + if ((sMinigameScoreDigits[i] != 0) || (numDigitsDrawn != 0) || (i >= 3)) { + OVERLAY_DISP = + Gfx_DrawTexRectI8(OVERLAY_DISP, ((u8*)gCounterDigit0Tex + (8 * 16 * sMinigameScoreDigits[i])), + 8, 0x10, rectX, rectY - 2, 9, 0xFA, 0x370, 0x370); + rectX += 9; + numDigitsDrawn++; } } @@ -6113,7 +6113,7 @@ void Interface_Draw(PlayState* play) { if (pauseCtx->debugEditor == DEBUG_EDITOR_NONE) { Interface_SetVertices(play); - Interface_SetView2(interfaceCtx); + Interface_SetOrthoView(interfaceCtx); // Draw Grandma's Story if (interfaceCtx->storyDmaStatus == STORY_DMA_DONE) { @@ -6332,12 +6332,13 @@ void Interface_Draw(PlayState* play) { Interface_DrawItemButtons(play); if (player->transformation == ((void)0, gSaveContext.save.playerForm)) { - func_80118084(play); + Interface_DrawBButtonIcons(play); } + Interface_DrawCButtonIcons(play); - func_80118890(play); - func_80118BA4(play); - func_80119030(play); + Interface_DrawAButton(play); + + Interface_DrawPauseMenuEquippingIcons(play); // Draw either the minigame countdown or the three-day clock if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) { @@ -6519,15 +6520,14 @@ void Interface_AllocStory(PlayState* play) { } void Interface_Update(PlayState* play) { - static u8 D_801BFD94 = 0; - static s16 D_801BFD98 = 0; - static s16 D_801BFD9C = 0; + static u8 sIsSunsPlayedAtDay = false; + static s16 sPrevTimeSpeed = 0; InterfaceContext* interfaceCtx = &play->interfaceCtx; MessageContext* msgCtx = &play->msgCtx; Player* player = GET_PLAYER(play); s16 dimmingAlpha; s16 risingAlpha; - u16 action; + u16 aButtonDoAction; // Update buttons if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) { @@ -6645,6 +6645,7 @@ void Interface_Update(PlayState* play) { Map_Update(play); + // Update health if (gSaveContext.healthAccumulator != 0) { gSaveContext.healthAccumulator -= 4; gSaveContext.save.playerData.health += 4; @@ -6660,8 +6661,9 @@ void Interface_Update(PlayState* play) { } LifeMeter_UpdateSizeAndBeep(play); - sEnvTimerType = Player_GetEnvTimerType(play); + // Update Env Timer Part 1 + sEnvTimerType = Player_GetEnvTimerType(play); if (sEnvTimerType == PLAYER_ENV_TIMER_HOTROOM) { if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_GORON) { sEnvTimerType = PLAYER_ENV_TIMER_NONE; @@ -6675,7 +6677,7 @@ void Interface_Update(PlayState* play) { LifeMeter_UpdateColors(play); - // Update Rupees + // Update rupees if (gSaveContext.rupeeAccumulator != 0) { if (gSaveContext.rupeeAccumulator > 0) { if (gSaveContext.save.playerData.rupees < CUR_CAPACITY(UPG_WALLET)) { @@ -6705,6 +6707,7 @@ void Interface_Update(PlayState* play) { } } + // Update minigame perfect if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) { if (interfaceCtx->isMinigamePerfect) { if (interfaceCtx->minigamePerfectType == MINIGAME_PERFECT_TYPE_1) { @@ -6717,7 +6720,7 @@ void Interface_Update(PlayState* play) { } } - // Update Minigame State + // Update minigame State if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) { if (interfaceCtx->minigameState) { // != MINIGAME_STATE_NONE switch (interfaceCtx->minigameState) { @@ -6768,13 +6771,13 @@ void Interface_Update(PlayState* play) { } } - // Update Do-Actions - switch (interfaceCtx->unk_210) { - case 1: - interfaceCtx->unk_218 += 10466.667f; - if (interfaceCtx->unk_218 >= 15700.0f) { - interfaceCtx->unk_218 = -15700.0f; - interfaceCtx->unk_210 = 2; + // Update A Button + switch (interfaceCtx->aButtonState) { + case A_BTN_STATE_1: + interfaceCtx->aButtonRoll += 10466.667f; + if (interfaceCtx->aButtonRoll >= 15700.0f) { + interfaceCtx->aButtonRoll = -15700.0f; + interfaceCtx->aButtonState = A_BTN_STATE_2; if ((msgCtx->msgMode != 0) && (msgCtx->unk12006 == 0x26)) { XREG(31) = -14; @@ -6784,47 +6787,50 @@ void Interface_Update(PlayState* play) { } break; - case 2: - interfaceCtx->unk_218 += 10466.667f; - if (interfaceCtx->unk_218 >= 0.0f) { - interfaceCtx->unk_218 = 0.0f; - interfaceCtx->unk_210 = 0; - interfaceCtx->unk_212 = interfaceCtx->unk_214; - action = interfaceCtx->unk_212; - if ((action == DO_ACTION_MAX) || (action == DO_ACTION_MAX + 1)) { - action = DO_ACTION_NONE; + case A_BTN_STATE_2: + interfaceCtx->aButtonRoll += 10466.667f; + if (interfaceCtx->aButtonRoll >= 0.0f) { + interfaceCtx->aButtonRoll = 0.0f; + interfaceCtx->aButtonState = A_BTN_STATE_0; + interfaceCtx->aButtonHorseDoAction = interfaceCtx->aButtonDoAction; + aButtonDoAction = interfaceCtx->aButtonHorseDoAction; + if ((aButtonDoAction == DO_ACTION_MAX) || (aButtonDoAction == DO_ACTION_MAX + 1)) { + aButtonDoAction = DO_ACTION_NONE; } - Interface_LoadActionLabel(&play->interfaceCtx, action, 0); + Interface_LoadAButtonDoActionLabel(&play->interfaceCtx, aButtonDoAction, 0); } break; - case 3: - interfaceCtx->unk_218 += 10466.667f; - if (interfaceCtx->unk_218 >= 15700.0f) { - interfaceCtx->unk_218 = -15700.0f; - interfaceCtx->unk_210 = 2; + case A_BTN_STATE_3: + interfaceCtx->aButtonRoll += 10466.667f; + if (interfaceCtx->aButtonRoll >= 15700.0f) { + interfaceCtx->aButtonRoll = -15700.0f; + interfaceCtx->aButtonState = A_BTN_STATE_2; } break; - case 4: - interfaceCtx->unk_218 += 10466.667f; - if (interfaceCtx->unk_218 >= 0.0f) { - interfaceCtx->unk_218 = 0.0f; - interfaceCtx->unk_210 = 0; - interfaceCtx->unk_212 = interfaceCtx->unk_214; - action = interfaceCtx->unk_212; - if ((action == DO_ACTION_MAX) || (action == DO_ACTION_MAX + 1)) { - action = DO_ACTION_NONE; + case A_BTN_STATE_4: + interfaceCtx->aButtonRoll += 10466.667f; + if (interfaceCtx->aButtonRoll >= 0.0f) { + interfaceCtx->aButtonRoll = 0.0f; + interfaceCtx->aButtonState = A_BTN_STATE_0; + interfaceCtx->aButtonHorseDoAction = interfaceCtx->aButtonDoAction; + aButtonDoAction = interfaceCtx->aButtonHorseDoAction; + if ((aButtonDoAction == DO_ACTION_MAX) || (aButtonDoAction == DO_ACTION_MAX + 1)) { + aButtonDoAction = DO_ACTION_NONE; } - Interface_LoadActionLabel(&play->interfaceCtx, action, 0); + Interface_LoadAButtonDoActionLabel(&play->interfaceCtx, aButtonDoAction, 0); } break; + + default: // A_BTN_STATE_0 + break; } // Update Magic if (!(player->stateFlags1 & PLAYER_STATE1_200)) { - if (XREG(4) == 1) { + if (R_MAGIC_DBG_SET_UPGRADE == MAGIC_DBG_SET_UPGRADE_DOUBLE_METER) { // Upgrade to double magic if (!gSaveContext.save.playerData.isMagicAcquired) { gSaveContext.save.playerData.isMagicAcquired = true; @@ -6832,8 +6838,8 @@ void Interface_Update(PlayState* play) { gSaveContext.save.playerData.isDoubleMagicAcquired = true; gSaveContext.save.playerData.magic = MAGIC_DOUBLE_METER; gSaveContext.save.playerData.magicLevel = 0; - XREG(4) = 0; - } else if (XREG(4) == -1) { + R_MAGIC_DBG_SET_UPGRADE = MAGIC_DBG_SET_UPGRADE_NO_ACTION; + } else if (R_MAGIC_DBG_SET_UPGRADE == MAGIC_DBG_SET_UPGRADE_NORMAL_METER) { // Upgrade to normal magic if (!gSaveContext.save.playerData.isMagicAcquired) { gSaveContext.save.playerData.isMagicAcquired = true; @@ -6841,7 +6847,7 @@ void Interface_Update(PlayState* play) { gSaveContext.save.playerData.isDoubleMagicAcquired = false; gSaveContext.save.playerData.magic = MAGIC_NORMAL_METER; gSaveContext.save.playerData.magicLevel = 0; - XREG(4) = 0; + R_MAGIC_DBG_SET_UPGRADE = MAGIC_DBG_SET_UPGRADE_NO_ACTION; } if ((gSaveContext.save.playerData.isMagicAcquired) && (gSaveContext.save.playerData.magicLevel == 0)) { @@ -6857,7 +6863,7 @@ void Interface_Update(PlayState* play) { Magic_UpdateAddRequest(); } - // Update Env Timer + // Update Env Timer Part 2 if (gSaveContext.timerStates[TIMER_ID_ENV] == TIMER_STATE_OFF) { if ((sEnvTimerType == PLAYER_ENV_TIMER_HOTROOM) || (sEnvTimerType == PLAYER_ENV_TIMER_UNDERWATER_FREE)) { if (CUR_FORM != PLAYER_FORM_ZORA) { @@ -6877,7 +6883,7 @@ void Interface_Update(PlayState* play) { gSaveContext.timerStates[TIMER_ID_ENV] = TIMER_STATE_OFF; } - // Update minigame + // Update Minigame if (gSaveContext.minigameStatus == MINIGAME_STATUS_ACTIVE) { gSaveContext.minigameScore += interfaceCtx->minigamePoints; gSaveContext.minigameHiddenScore += interfaceCtx->minigameHiddenPoints; @@ -6916,7 +6922,7 @@ void Interface_Update(PlayState* play) { } } - // Update sun song + // Update Sun Song if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE) { // exit out of ocarina mode after suns song finishes playing if ((msgCtx->ocarinaAction != 0x39) && (gSaveContext.sunsSongState == SUNSSONG_START)) { @@ -6924,26 +6930,32 @@ void Interface_Update(PlayState* play) { } // handle suns song in areas where time moves - if (play->envCtx.timeIncrement != 0) { + if (play->envCtx.sceneTimeSpeed != 0) { if (gSaveContext.sunsSongState != SUNSSONG_SPEED_TIME) { - D_801BFD94 = false; + sIsSunsPlayedAtDay = false; if ((gSaveContext.save.time >= CLOCK_TIME(6, 0)) && (gSaveContext.save.time <= CLOCK_TIME(18, 0))) { - D_801BFD94 = true; + sIsSunsPlayedAtDay = true; } gSaveContext.sunsSongState = SUNSSONG_SPEED_TIME; - D_801BFD98 = REG(15); - REG(15) = 400; - } else if (!D_801BFD94) { + sPrevTimeSpeed = R_TIME_SPEED; + R_TIME_SPEED = 400; + } else if (!sIsSunsPlayedAtDay) { + // Nighttime if ((gSaveContext.save.time >= CLOCK_TIME(6, 0)) && (gSaveContext.save.time <= CLOCK_TIME(18, 0))) { + // Daytime has been reached. End suns song effect gSaveContext.sunsSongState = SUNSSONG_INACTIVE; - REG(15) = D_801BFD98; + R_TIME_SPEED = sPrevTimeSpeed; + play->msgCtx.ocarinaMode = 4; + } + } else { + // Daytime + if (gSaveContext.save.time > CLOCK_TIME(18, 0)) { + // Nighttime has been reached. End suns song effect + gSaveContext.sunsSongState = SUNSSONG_INACTIVE; + R_TIME_SPEED = sPrevTimeSpeed; play->msgCtx.ocarinaMode = 4; } - } else if (gSaveContext.save.time > CLOCK_TIME(18, 0)) { - gSaveContext.sunsSongState = SUNSSONG_INACTIVE; - REG(15) = D_801BFD98; - play->msgCtx.ocarinaMode = 4; } } else { gSaveContext.sunsSongState = SUNSSONG_SPECIAL; @@ -7007,7 +7019,7 @@ void Interface_Init(PlayState* play) { View_Init(&interfaceCtx->view, play->state.gfxCtx); interfaceCtx->magicConsumptionTimer = 16; - interfaceCtx->unkTimer = 200; + interfaceCtx->healthTimer = 200; parameterStaticSize = SEGMENT_ROM_SIZE(parameter_static); interfaceCtx->parameterSegment = THA_AllocEndAlign16(&play->state.heap, parameterStaticSize); diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 7b88d4520..2c9edb6aa 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -380,25 +380,25 @@ void Scene_HeaderCmdTimeSettings(PlayState* play, SceneCmd* cmd) { (u16)(((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / 0.021972656f); } - if (cmd->timeSettings.unk6 != 0xFF) { - play->envCtx.timeIncrement = cmd->timeSettings.unk6; + if (cmd->timeSettings.timeSpeed != 0xFF) { + play->envCtx.sceneTimeSpeed = cmd->timeSettings.timeSpeed; } else { - play->envCtx.timeIncrement = 0; + play->envCtx.sceneTimeSpeed = 0; } - if ((gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) && (play->envCtx.timeIncrement != 0)) { - play->envCtx.timeIncrement = 5; + if ((gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) && (play->envCtx.sceneTimeSpeed != 0)) { + play->envCtx.sceneTimeSpeed = 5; } if (gSaveContext.sunsSongState == SUNSSONG_INACTIVE) { - REG(15) = play->envCtx.timeIncrement; + R_TIME_SPEED = play->envCtx.sceneTimeSpeed; } play->envCtx.unk_4 = -(Math_SinS(((void)0, gSaveContext.save.time) - 0x8000) * 120.0f) * 25.0f; play->envCtx.unk_8 = (Math_CosS(((void)0, gSaveContext.save.time) - 0x8000) * 120.0f) * 25.0f; play->envCtx.unk_C = (Math_CosS(((void)0, gSaveContext.save.time) - 0x8000) * 20.0f) * 25.0f; - if ((play->envCtx.timeIncrement == 0) && (gSaveContext.save.cutscene < 0xFFF0)) { + if ((play->envCtx.sceneTimeSpeed == 0) && (gSaveContext.save.cutscene < 0xFFF0)) { gSaveContext.skyboxTime = gSaveContext.save.time; if ((gSaveContext.skyboxTime >= CLOCK_TIME(4, 0)) && (gSaveContext.skyboxTime < CLOCK_TIME(6, 30))) { diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index 2be56dda3..eb387b372 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -1816,8 +1816,8 @@ void DmStk_Update(Actor* thisx, PlayState* play) { (play->msgCtx.currentTextId == 0x5E6) && !FrameAdvance_IsEnabled(&play->state) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && (ActorCutscene_GetCurrentIndex() == -1) && (play->csCtx.state == 0)) { - gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)REG(15); - if (REG(15) != 0) { + gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)R_TIME_SPEED; + if (R_TIME_SPEED != 0) { gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)((void)0, gSaveContext.save.daySpeed); } } diff --git a/src/overlays/actors/ovl_En_Al/z_en_al.c b/src/overlays/actors/ovl_En_Al/z_en_al.c index 8792f8038..c97438dee 100644 --- a/src/overlays/actors/ovl_En_Al/z_en_al.c +++ b/src/overlays/actors/ovl_En_Al/z_en_al.c @@ -748,7 +748,7 @@ void func_80BDF578(EnAl* this, PlayState* play) { void func_80BDF5E8(EnAl* this, PlayState* play) { ScheduleOutput sp20; - this->unk_4E0 = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->unk_4E0 = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BDFC70, &sp20) || ((this->unk_35C != sp20.result) && !func_80BDF390(this, play, &sp20))) { this->actor.shape.shadowDraw = NULL; diff --git a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c index 575cf2d35..9658aed3c 100644 --- a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c +++ b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c @@ -100,7 +100,7 @@ void func_809C10B0(EnAob01* this, s32 arg1) { } void func_809C1124(void) { - gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)REG(15); + gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)R_TIME_SPEED; gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)((void)0, gSaveContext.save.daySpeed); } diff --git a/src/overlays/actors/ovl_En_Baba/z_en_baba.c b/src/overlays/actors/ovl_En_Baba/z_en_baba.c index dcbbee65d..9403b4c4c 100644 --- a/src/overlays/actors/ovl_En_Baba/z_en_baba.c +++ b/src/overlays/actors/ovl_En_Baba/z_en_baba.c @@ -654,7 +654,7 @@ void EnBaba_GaveBlastMask(EnBaba* this, PlayState* play) { void EnBaba_FollowSchedule(EnBaba* this, PlayState* play) { ScheduleOutput scheduleOutput; - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, sSchedule, &scheduleOutput) || ((this->scheduleResult != scheduleOutput.result) && diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c index baa65bfa3..09a9ea49d 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -846,7 +846,7 @@ void EnFishing_Init(Actor* thisx, PlayState* play2) { D_8090CD04 = 20; play->specialEffects = sFishingEffects; - REG(15) = 1; // gTimeIncrement in OoT + R_TIME_SPEED = 1; D_809171FC = 0; D_809171F6 = 10; diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index c85815ee7..bbb88044a 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -1582,7 +1582,7 @@ void func_80950C24(EnGm* this, PlayState* play) { void func_80950CDC(EnGm* this, PlayState* play) { ScheduleOutput sp20; - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80951820, &sp20) || ((this->unk_258 != sp20.result) && !func_80950280(this, play, &sp20))) { diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index e58ea297e..49c4fd0a9 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -3993,9 +3993,9 @@ void func_80886C00(EnHorse* this, PlayState* play) { if (((this->action == ENHORSE_ACTION_MOUNTED_WALK) || (this->action == ENHORSE_ACTION_MOUNTED_TROT) || (this->action == ENHORSE_ACTION_MOUNTED_GALLOP)) && - (CHECK_BTN_ALL(input->press.button, BTN_A) || (func_801A5100() == 5)) && (play->interfaceCtx.unk_212 == 8) && - !(this->stateFlags & ENHORSE_BOOST) && !(this->stateFlags & ENHORSE_FLAG_8) && - !(this->stateFlags & ENHORSE_FLAG_9)) { + (CHECK_BTN_ALL(input->press.button, BTN_A) || (func_801A5100() == 5)) && + (play->interfaceCtx.aButtonHorseDoAction == DO_ACTION_FASTER) && !(this->stateFlags & ENHORSE_BOOST) && + !(this->stateFlags & ENHORSE_FLAG_8) && !(this->stateFlags & ENHORSE_FLAG_9)) { if (this->numBoosts > 0) { Rumble_Request(0.0f, 180, 20, 100); this->stateFlags |= ENHORSE_BOOST; diff --git a/src/overlays/actors/ovl_En_Ig/z_en_ig.c b/src/overlays/actors/ovl_En_Ig/z_en_ig.c index bc1ca559b..83319c2d4 100644 --- a/src/overlays/actors/ovl_En_Ig/z_en_ig.c +++ b/src/overlays/actors/ovl_En_Ig/z_en_ig.c @@ -876,7 +876,7 @@ void func_80BF2A50(EnIg* this, PlayState* play) { void func_80BF2AF8(EnIg* this, PlayState* play) { ScheduleOutput sp20; - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BF3260, &sp20) || ((this->scheduleResult != sp20.result) && !func_80BF2368(this, play, &sp20))) { diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index 2050c7316..b18b4203f 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -3015,7 +3015,7 @@ void func_80B49C38(EnInvadepoh* this, PlayState* play) { if (this->unk378 == 0) { temp_v0_2 = func_800FE620(play); if (temp_v0_2 > 0) { - temp_v0_2 = (REG(15) * -16.0f / temp_v0_2) - 0.5f; + temp_v0_2 = (R_TIME_SPEED * -16.0f / temp_v0_2) - 0.5f; this->unk378 = func_80B45550(this, play, SQ(80.0f), temp_v0_2); } } @@ -3967,7 +3967,7 @@ void func_80B4C730(EnInvadepoh* this, PlayState* play) { if (this->unk378 == 0) { temp_v0_2 = func_800FE620(play); if (temp_v0_2 > 0) { - temp_v0_2 = (REG(15) * -23.0f / temp_v0_2) - 0.5f; + temp_v0_2 = (R_TIME_SPEED * -23.0f / temp_v0_2) - 0.5f; this->unk378 = func_80B45550(this, play, SQ(80.0f), temp_v0_2); } } diff --git a/src/overlays/actors/ovl_En_Ja/z_en_ja.c b/src/overlays/actors/ovl_En_Ja/z_en_ja.c index f615c05fe..ef662bb68 100644 --- a/src/overlays/actors/ovl_En_Ja/z_en_ja.c +++ b/src/overlays/actors/ovl_En_Ja/z_en_ja.c @@ -301,7 +301,7 @@ void func_80BC2150(EnJa* this, PlayState* play) { void func_80BC21A8(EnJa* this, PlayState* play) { ScheduleOutput sp18; - this->unk_35C = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->unk_35C = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BC35F0, &sp18) || ((this->unk_1D8.unk_00 != sp18.result) && !func_80BC20D0(this, play, &sp18))) { this->actor.shape.shadowDraw = NULL; diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index 1f5aebe64..0da6a331f 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -1991,7 +1991,7 @@ void func_80AFA4D0(EnPm* this, PlayState* play) { u16 sp3C = 0; ScheduleOutput sp2C; - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (this->unk_38C != 0) { time = gSaveContext.save.time - D_801F4E78; sp3C = gSaveContext.save.time; diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 4f3882aa7..12459bfa4 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -231,7 +231,7 @@ void EnSuttari_TriggerTransition(PlayState* play, u16 entrance) { } void EnSuttari_UpdateTime(void) { - gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)REG(15); + gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)R_TIME_SPEED; gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)((void)0, gSaveContext.save.daySpeed); } @@ -1104,7 +1104,7 @@ void func_80BACE4C(EnSuttari* this, PlayState* play) { void func_80BACEE0(EnSuttari* this, PlayState* play) { ScheduleOutput scheduleOutput; - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BAE820, &scheduleOutput) || ((this->unk428 != scheduleOutput.result) && !func_80BABF64(this, play, &scheduleOutput))) { this->actor.flags &= ~ACTOR_FLAG_1; @@ -1128,7 +1128,7 @@ void func_80BACEE0(EnSuttari* this, PlayState* play) { void func_80BAD004(EnSuttari* this, PlayState* play) { ScheduleOutput scheduleOutput; - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BAE820, &scheduleOutput) || ((this->unk428 != scheduleOutput.result) && !func_80BABF64(this, play, &scheduleOutput))) { this->actor.flags &= ~ACTOR_FLAG_1; @@ -1255,7 +1255,7 @@ void func_80BAD5F8(EnSuttari* this, PlayState* play) { this->animIndex = 2; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BAE820, &scheduleOutput) || ((this->unk428 != scheduleOutput.result) && !func_80BABF64(this, play, &scheduleOutput))) { this->actor.flags &= ~ACTOR_FLAG_1; @@ -1293,7 +1293,7 @@ void func_80BAD7F8(EnSuttari* this, PlayState* play) { this->animIndex = 2; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } - this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BAE820, &scheduleOutput) || ((this->unk428 != scheduleOutput.result) && !func_80BABF64(this, play, &scheduleOutput))) { this->actor.flags &= ~ACTOR_FLAG_1; diff --git a/src/overlays/actors/ovl_En_Tab/z_en_tab.c b/src/overlays/actors/ovl_En_Tab/z_en_tab.c index ffa557746..fb4370f69 100644 --- a/src/overlays/actors/ovl_En_Tab/z_en_tab.c +++ b/src/overlays/actors/ovl_En_Tab/z_en_tab.c @@ -474,7 +474,7 @@ void func_80BE1224(EnTab* this, PlayState* play) { void func_80BE127C(EnTab* this, PlayState* play) { ScheduleOutput sp18; - this->unk_31A = REG(15) + ((void)0, gSaveContext.save.daySpeed); + this->unk_31A = R_TIME_SPEED + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BE18D0, &sp18) || ((this->unk_1D8 != sp18.result) && !func_80BE1060(this, play, &sp18))) { diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 60c4b4dd0..b7c17a1c8 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -323,8 +323,8 @@ void func_80AECB6C(EnTk* this, PlayState* play) { return; } - if (REG(15) != 0.0f) { - this->skelAnime.playSpeed = (f32)func_800FE620(play) / REG(15); + if (R_TIME_SPEED != 0.0f) { + this->skelAnime.playSpeed = (f32)func_800FE620(play) / R_TIME_SPEED; } else { this->skelAnime.playSpeed = 0.0f; } @@ -337,14 +337,14 @@ void func_80AECB6C(EnTk* this, PlayState* play) { func_80AEC658(&this->skelAnime, this->unk_320, 1.0f, &sp48, &sp44); } - temp2 = REG(15) * sp44; + temp2 = R_TIME_SPEED * sp44; temp_f0 = temp2; - this->unk_2DC += (REG(15) * sp44) - temp2; + this->unk_2DC += (R_TIME_SPEED * sp44) - temp2; temp3 = this->unk_2DC; this->timePathTimeSpeed = temp2 + temp3; this->unk_2DC -= temp3; - this->unk_2E0 += REG(15); + this->unk_2E0 += R_TIME_SPEED; if (Schedule_RunScript(play, D_80AEF800, &sp34)) { if ((this->unk_3CC != sp34.result) && !func_80AED354(this, play, &sp34)) { diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index ec6f12aeb..dc81d94ea 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -486,8 +486,8 @@ void EnWeatherTag_Update(Actor* thisx, PlayState* play) { (play->transitionTrigger == TRANS_TRIGGER_OFF) && (ActorCutscene_GetCurrentIndex() == -1) && (play->csCtx.state == 0)) { - gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)REG(15); - if (REG(15) != 0) { + gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)R_TIME_SPEED; + if (R_TIME_SPEED != 0) { gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)((void)0, gSaveContext.save.daySpeed); } } diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 7eaf78c20..7dabab2e7 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -80,7 +80,7 @@ void OceffSpot_End(OceffSpot* this, PlayState* play) { this->unk16C -= 0.05f; } else { Actor_MarkForDeath(&this->actor); - if ((REG(15) != 0x190) && (play->msgCtx.unk12046 == 0)) { + if ((R_TIME_SPEED != 400) && (play->msgCtx.unk12046 == 0)) { if ((play->msgCtx.ocarinaAction != 0x39) || (play->msgCtx.ocarinaMode != 0xA)) { gSaveContext.sunsSongState = SUNSSONG_START; } diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index cf2f9676b..e7629ae5c 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -2124,12 +2124,12 @@ 0x80114FD0:("Inventory_UpdateBottleItem",), 0x80115130:("Inventory_ConsumeFairy",), 0x801152B8:("Inventory_UpdateItem",), - 0x801153C8:("func_801153C8",), - 0x80115428:("Interface_LoadActionLabel",), + 0x801153C8:("Interface_MemSetZeroed",), + 0x80115428:("Interface_LoadAButtonDoActionLabel",), 0x8011552C:("Interface_SetAButtonDoAction",), 0x801155B4:("Interface_SetBButtonDoAction",), 0x80115764:("Interface_SetTatlCall",), - 0x80115844:("func_80115844",), + 0x80115844:("Interface_LoadBButtonDoActionLabel",), 0x80115908:("Health_ChangeBy",), 0x801159C0:("Health_GiveHearts",), 0x801159EC:("Rupees_ChangeBy",), @@ -2141,15 +2141,15 @@ 0x80116114:("Magic_FlashMeterBorder",), 0x80116348:("Magic_Update",), 0x80116918:("Magic_DrawMeter",), - 0x80116FD8:("Interface_SetView1",), - 0x801170B8:("Interface_SetView2",), + 0x80116FD8:("Interface_SetPerspectiveView",), + 0x801170B8:("Interface_SetOrthoView",), 0x80117100:("Interface_DrawItemButtons",), 0x80117A20:("Interface_DrawItemIconTexture",), 0x80117BD0:("Interface_DrawAmmoCount",), - 0x80118084:("func_80118084",), - 0x80118890:("func_80118890",), - 0x80118BA4:("func_80118BA4",), - 0x80119030:("func_80119030",), + 0x80118084:("Interface_DrawBButtonIcons",), + 0x80118890:("Interface_DrawCButtonIcons",), + 0x80118BA4:("Interface_DrawAButton",), + 0x80119030:("Interface_DrawPauseMenuEquippingIcons",), 0x80119610:("Interface_DrawClock",), 0x8011B4E0:("Interface_SetMinigamePerfect",), 0x8011B5C0:("Interface_UpdateMinigamePerfectType1",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index c48de3cc9..a246b56c4 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -1127,11 +1127,11 @@ 0x801BFB14:("D_801BFB14","UNK_TYPE1","",0x1), 0x801BFB1C:("D_801BFB1C","UNK_TYPE1","",0x1), 0x801BFB24:("D_801BFB24","UNK_TYPE1","",0x1), - 0x801BFB2C:("D_801BFB2C","UNK_TYPE2","",0x2), + 0x801BFB2C:("sThreeDayClockAlpha","UNK_TYPE2","",0x2), 0x801BFB30:("D_801BFB30","UNK_TYPE2","",0x2), 0x801BFB34:("D_801BFB34","UNK_TYPE2","",0x2), - 0x801BFB38:("D_801BFB38","UNK_TYPE1","",0x1), - 0x801BFB6C:("D_801BFB6C","UNK_TYPE1","",0x1), + 0x801BFB38:("sThreeDayClockHours","UNK_TYPE1","",0x1), + 0x801BFB6C:("sThreeDayClockHourTextures","UNK_TYPE1","",0x1), 0x801BFBCC:("D_801BFBCC","UNK_TYPE2","",0x2), 0x801BFBD0:("D_801BFBD0","UNK_TYPE2","",0x2), 0x801BFBD4:("D_801BFBD4","UNK_TYPE2","",0x2), @@ -1150,7 +1150,7 @@ 0x801BFC08:("D_801BFC08","UNK_TYPE1","",0x1), 0x801BFC0C:("D_801BFC0C","UNK_TYPE1","",0x1), 0x801BFC10:("D_801BFC10","UNK_TYPE1","",0x1), - 0x801BFC14:("D_801BFC14","UNK_TYPE1","",0x1), + 0x801BFC14:("sFinalHoursDigitTextures","UNK_TYPE1","",0x1), 0x801BFC40:("D_801BFC40","UNK_TYPE1","",0x1), 0x801BFC50:("D_801BFC50","UNK_TYPE2","",0x2), 0x801BFC60:("sMinigamePerfectType1PrimColorTargets","s16","[6]",0xC), @@ -1175,8 +1175,8 @@ 0x801BFD6C:("sMinigameCountdownPrimColors","UNK_TYPE2","",0x2), 0x801BFD84:("gStoryTextures","UNK_TYPE1","",0x1), 0x801BFD8C:("gStoryTLUTs","UNK_TYPE1","",0x1), - 0x801BFD94:("D_801BFD94","UNK_TYPE4","",0x4), - 0x801BFD98:("D_801BFD98","UNK_TYPE4","[2]",0x8), + 0x801BFD94:("sIsSunsPlayedAtDay","UNK_TYPE4","",0x4), + 0x801BFD98:("sPrevTimeSpeed","UNK_TYPE4","[2]",0x8), 0x801BFDA0:("sMaskObjectIds","s16","[24]",0x30), 0x801BFDD0:("D_801BFDD0","UNK_TYPE1","",0x1), 0x801BFDE8:("sMaskItemIds","UNK_TYPE1","",0x1), diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index b807a0e24..7426fac19 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -1638,12 +1638,12 @@ asm/non_matchings/code/z_parameter/Inventory_HasItemInBottle.s,Inventory_HasItem asm/non_matchings/code/z_parameter/Inventory_UpdateBottleItem.s,Inventory_UpdateBottleItem,0x80114FD0,0x58 asm/non_matchings/code/z_parameter/Inventory_ConsumeFairy.s,Inventory_ConsumeFairy,0x80115130,0x62 asm/non_matchings/code/z_parameter/Inventory_UpdateItem.s,Inventory_UpdateItem,0x801152B8,0x44 -asm/non_matchings/code/z_parameter/func_801153C8.s,func_801153C8,0x801153C8,0x18 -asm/non_matchings/code/z_parameter/Interface_LoadActionLabel.s,Interface_LoadActionLabel,0x80115428,0x41 +asm/non_matchings/code/z_parameter/Interface_MemSetZeroed.s,Interface_MemSetZeroed,0x801153C8,0x18 +asm/non_matchings/code/z_parameter/Interface_LoadAButtonDoActionLabel.s,Interface_LoadAButtonDoActionLabel,0x80115428,0x41 asm/non_matchings/code/z_parameter/Interface_SetAButtonDoAction.s,Interface_SetAButtonDoAction,0x8011552C,0x22 asm/non_matchings/code/z_parameter/Interface_SetBButtonDoAction.s,Interface_SetBButtonDoAction,0x801155B4,0x6C asm/non_matchings/code/z_parameter/Interface_SetTatlCall.s,Interface_SetTatlCall,0x80115764,0x38 -asm/non_matchings/code/z_parameter/func_80115844.s,func_80115844,0x80115844,0x31 +asm/non_matchings/code/z_parameter/Interface_LoadBButtonDoActionLabel.s,Interface_LoadBButtonDoActionLabel,0x80115844,0x31 asm/non_matchings/code/z_parameter/Health_ChangeBy.s,Health_ChangeBy,0x80115908,0x2E asm/non_matchings/code/z_parameter/Health_GiveHearts.s,Health_GiveHearts,0x801159C0,0xB asm/non_matchings/code/z_parameter/Rupees_ChangeBy.s,Rupees_ChangeBy,0x801159EC,0xA @@ -1655,15 +1655,15 @@ asm/non_matchings/code/z_parameter/Magic_UpdateAddRequest.s,Magic_UpdateAddReque asm/non_matchings/code/z_parameter/Magic_FlashMeterBorder.s,Magic_FlashMeterBorder,0x80116114,0x8D asm/non_matchings/code/z_parameter/Magic_Update.s,Magic_Update,0x80116348,0x174 asm/non_matchings/code/z_parameter/Magic_DrawMeter.s,Magic_DrawMeter,0x80116918,0x1B0 -asm/non_matchings/code/z_parameter/Interface_SetView1.s,Interface_SetView1,0x80116FD8,0x38 -asm/non_matchings/code/z_parameter/Interface_SetView2.s,Interface_SetView2,0x801170B8,0x12 +asm/non_matchings/code/z_parameter/Interface_SetPerspectiveView.s,Interface_SetPerspectiveView,0x80116FD8,0x38 +asm/non_matchings/code/z_parameter/Interface_SetOrthoView.s,Interface_SetOrthoView,0x801170B8,0x12 asm/non_matchings/code/z_parameter/Interface_DrawItemButtons.s,Interface_DrawItemButtons,0x80117100,0x248 asm/non_matchings/code/z_parameter/Interface_DrawItemIconTexture.s,Interface_DrawItemIconTexture,0x80117A20,0x6C asm/non_matchings/code/z_parameter/Interface_DrawAmmoCount.s,Interface_DrawAmmoCount,0x80117BD0,0x12D -asm/non_matchings/code/z_parameter/func_80118084.s,func_80118084,0x80118084,0x203 -asm/non_matchings/code/z_parameter/func_80118890.s,func_80118890,0x80118890,0xC5 -asm/non_matchings/code/z_parameter/func_80118BA4.s,func_80118BA4,0x80118BA4,0x123 -asm/non_matchings/code/z_parameter/func_80119030.s,func_80119030,0x80119030,0x178 +asm/non_matchings/code/z_parameter/Interface_DrawBButtonIcons.s,Interface_DrawBButtonIcons,0x80118084,0x203 +asm/non_matchings/code/z_parameter/Interface_DrawCButtonIcons.s,Interface_DrawCButtonIcons,0x80118890,0xC5 +asm/non_matchings/code/z_parameter/Interface_DrawAButton.s,Interface_DrawAButton,0x80118BA4,0x123 +asm/non_matchings/code/z_parameter/Interface_DrawPauseMenuEquippingIcons.s,Interface_DrawPauseMenuEquippingIcons,0x80119030,0x178 asm/non_matchings/code/z_parameter/Interface_DrawClock.s,Interface_DrawClock,0x80119610,0x7B4 asm/non_matchings/code/z_parameter/Interface_SetMinigamePerfect.s,Interface_SetMinigamePerfect,0x8011B4E0,0x38 asm/non_matchings/code/z_parameter/Interface_UpdateMinigamePerfectType1.s,Interface_UpdateMinigamePerfectType1,0x8011B5C0,0x108