lots of timer docs

This commit is contained in:
engineer124
2022-08-15 23:25:25 -04:00
parent 6292de0b3e
commit 8615f46250
32 changed files with 599 additions and 532 deletions
+10 -10
View File
@@ -1816,12 +1816,12 @@ void OLib_DbCameraVec3fSum(PosRot* a, Vec3f* b, Vec3f* dest, s16 mode);
// void func_8010DC58(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void func_8010DE38(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6);
// void Interface_InitVertices(void);
// void Interface_TimerCallback(void);
void func_8010E9F0(s16 timerId, s16 timeLimit);
void func_8010EA9C(s16 timeLimit, s16 arg1);
// void func_8010EB50(void);
// void func_8010EBA0(void);
// void func_8010EC54(void);
// void Interface_PostmanTimerCallback(void);
void Interface_StartTimer(s16 timerId, s16 timeLimit);
void Interface_StartPostmanTimer(s16 timeLimit, s16 bunnyHoodState);
// void Interface_StartGoronRaceTimer(void);
// void Interface_StartBottleTimer(void);
// void Interface_GetCompressedTimerDigits(void);
void Interface_NewDay(PlayState* play, s32 day);
void Interface_SetHudVisibility(u16 hudVisibility);
// void func_80110038(void);
@@ -1869,10 +1869,10 @@ void Interface_SetPerfectMinigame(PlayState* play, s16 rewardType);
// void func_8011B9E0(void);
// void func_8011BF70(void);
// void Interface_DrawMinigamePerfect(void);
void func_8011C808(PlayState* play);
// void func_8011C898(void);
void Interface_StartMoonCrash(PlayState* play);
// void Interface_GetTimerDigits(void);
// void Interface_DrawTimers(void);
// void Interface_UpdateTimers(void);
// void Interface_UpdateBottleTimers(void);
// void Interface_DrawMinigameIcons(void);
// void Interface_Draw(UNK_TYPE4 ctxt);
// void Interface_LoadStory(void);
@@ -1946,7 +1946,7 @@ s32 Player_ActionToExplosive(Player* player, s32 actionParam);
s32 Player_GetExplosiveHeld(Player* player);
s32 func_80124278(Actor* actor, s32 arg1);
s32 func_801242B4(Player* player);
s32 func_801242DC(PlayState* play);
s32 Player_GetEnvTimerType(PlayState* play);
void func_80124420(Player* player);
void func_80124618(struct_80124618 arg0[], f32 curFrame, Vec3f* arg2);
void func_801246F4(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, s32 boots, s32 face, OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor);
+2
View File
@@ -71,6 +71,8 @@
#define R_A_ICON_X XREG(20)
#define R_A_BTN_COLOR(i) XREG(22 + i)
#define R_MAGIC_CONSUME_TIMER_GIANT XREG(41)
#define R_FINAL_HOURS_TIMER_Y XREG(80)
#define R_FINAL_HOURS_TIMER_X XREG(81)
#define R_MINIMAP_DISABLED XREG(95)
#define R_B_LABEL_DD WREG(0)
#define R_OW_MINIMAP_X WREG(29)
+12 -12
View File
@@ -1033,19 +1033,19 @@ extern UNK_PTR D_801BF5C0;
// extern UNK_TYPE2 sMagicBarOutlinePrimBlue;
// extern UNK_TYPE2 sMagicBorderRatio;
// extern UNK_TYPE2 sMagicBorderStep;
// extern UNK_TYPE2 D_801BF8DC;
// extern UNK_TYPE2 D_801BF8E0;
// extern UNK_TYPE2 D_801BF8E4;
// extern UNK_TYPE4 D_801BF8E8;
// extern UNK_TYPE4 D_801BF8F0;
// extern UNK_TYPE2 sEnvTimerType;
// extern UNK_TYPE2 sEnvTimerActive;
// extern UNK_TYPE2 sPostmanBunnyHoodState;
// extern UNK_TYPE4 sTimerPausedOsTime;
// extern UNK_TYPE4 sBottleTimerPausedOsTime;
// extern UNK_TYPE4 D_801BF8F4;
// extern UNK_TYPE4 D_801BF8F8;
// extern UNK_TYPE4 D_801BF8FC;
// extern UNK_TYPE4 D_801BF930;
// extern UNK_TYPE4 D_801BF934;
// extern UNK_TYPE1 D_801BF968;
// extern UNK_TYPE1 sIsTimerPaused;
// extern UNK_TYPE1 D_801BF96A;
// extern UNK_TYPE1 D_801BF96C;
// extern UNK_TYPE1 sIsBottleTimerPaused;
// extern UNK_TYPE1 D_801BF96E;
// extern UNK_TYPE2 sTimerId;
// extern UNK_TYPE1 D_801BF972;
@@ -1085,7 +1085,7 @@ extern UNK_PTR D_801BF5C0;
// extern UNK_TYPE2 D_801BFA4C;
// extern UNK_TYPE2 D_801BFA64;
// extern UNK_TYPE2 D_801BFA74;
// extern UNK_TYPE4 D_801BFA84;
// extern UNK_TYPE4 sPostmanTimerInputBtnAPressed;
// extern UNK_TYPE1 sDoActionTextures;
// extern UNK_TYPE1 D_801BFAB8;
// extern UNK_TYPE1 D_801BFAC4;
@@ -1137,15 +1137,15 @@ extern UNK_PTR D_801BF5C0;
// extern UNK_TYPE2 D_801BFCA8;
// extern UNK_TYPE1 D_801BFCB8;
// extern UNK_TYPE4 D_801BFCC4;
// extern UNK_TYPE2 D_801BFCE4;
// extern UNK_TYPE2 D_801BFCE8;
// extern UNK_TYPE2 sTimerStateTimer;
// extern UNK_TYPE2 sTimerDigits;
// extern UNK_TYPE2 D_801BFCEA;
// extern UNK_TYPE2 D_801BFCEC;
// extern UNK_TYPE2 D_801BFCEE;
// extern UNK_TYPE2 D_801BFCF0;
// extern UNK_TYPE2 D_801BFCF2;
// extern UNK_TYPE2 D_801BFCF4;
// extern UNK_TYPE2 D_801BFCF8;
// extern UNK_TYPE2 sTimerBeepSfxSeconds;
// extern UNK_TYPE2 D_801BFCFC;
// extern UNK_TYPE2 D_801BFD0C;
// extern UNK_TYPE1 D_801BFD1C;
@@ -3153,7 +3153,7 @@ extern s16 D_801F4E7A;
// extern UNK_TYPE1 D_801F57B4;
// extern UNK_TYPE1 D_801F5834;
// extern NmiBuff* gNMIBuffer;
// extern UNK_TYPE1 D_801F5850;
// extern UNK_TYPE1 sPostmanTimerInput;
// extern UNK_TYPE1 D_801F58B0;
// extern UNK_TYPE1 D_801F59AC;
// extern UNK_TYPE1 D_801F59B0;
-3
View File
@@ -299,9 +299,6 @@ typedef enum {
#define BOTTLE_FIRST 0
#define BOTTLE_MAX 6
#define BOTTLE_FIRST 0
#define BOTTLE_MAX 6
typedef enum {
/* 0x00 */ GI_NONE,
/* 0x01 */ GI_RUPEE_GREEN,
+8
View File
@@ -70,6 +70,14 @@ typedef enum {
/* 0x19 */ PLAYER_MASK_MAX
} PlayerMask;
typedef enum {
/* 0 */ PLAYER_ENV_TIMER_NONE,
/* 1 */ PLAYER_ENV_TIMER_HOTROOM,
/* 2 */ PLAYER_ENV_TIMER_UNDERWATER_FLOOR,
/* 3 */ PLAYER_ENV_TIMER_SWIMMING,
/* 4 */ PLAYER_ENV_TIMER_UNDERWATER_FREE
} PlayerEnvTimer;
typedef enum PlayerActionParam {
/* -1 */ PLAYER_AP_MINUS1 = -1,
/* 0x00 */ PLAYER_AP_NONE,
+56 -39
View File
@@ -3,6 +3,7 @@
#include "ultra64.h"
#include "z64math.h"
#include "z64item.h"
#include "os.h"
struct GameState;
@@ -54,37 +55,52 @@ typedef enum {
#define MAGIC_NORMAL_METER 0x30
#define MAGIC_DOUBLE_METER (2 * MAGIC_NORMAL_METER)
#define SECONDS_TO_TIMER(seconds) ((seconds) * 100)
// 1 centiSecond = 10 milliSeconds = 1/100 seconds
#define SECONDS_TO_TIMER_PRECISE(seconds, centiSeconds) ((seconds) * 100 + (centiSeconds))
typedef enum {
/* 0 */ TIMER_STATE_OFF,
/* 1 */ TIMER_STATE_1,
/* 2 */ TIMER_STATE_2,
/* 3 */ TIMER_STATE_3,
/* 4 */ TIMER_STATE_4,
/* 5 */ TIMER_STATE_5,
/* 6 */ TIMER_STATE_6,
/* 7 */ TIMER_STATE_7,
/* 8 */ TIMER_STATE_8,
/* 9 */ TIMER_STATE_9,
/* 0 */ TIMER_ID_POSTMAN, // postman's counting minigame
/* 1 */ TIMER_ID_1, // minigame timer
/* 2 */ TIMER_ID_2,
/* 3 */ TIMER_ID_FINAL_HOURS, // countdown until mooncrash
/* 4 */ TIMER_ID_4,
/* 5 */ TIMER_ID_ENV, // environmental timer (underwater or hot room)
/* 6 */ TIMER_ID_GORON_RACE_UNUSED,
/* 7 */ TIMER_ID_MAX,
/* 99 */ TIMER_ID_NONE = 99,
} TimerId;
typedef enum {
/* 0 */ TIMER_COUNT_DOWN,
/* 1 */ TIMER_COUNT_UP
} TimerDirection;
typedef enum {
/* 0 */ TIMER_STATE_OFF,
/* 1 */ TIMER_STATE_1,
/* 2 */ TIMER_STATE_2,
/* 3 */ TIMER_STATE_MOVING_TIMER,
/* 4 */ TIMER_STATE_4,
/* 5 */ TIMER_STATE_STOP,
/* 6 */ TIMER_STATE_6,
/* 7 */ TIMER_STATE_7,
/* 8 */ TIMER_STATE_ENV_START,
/* 9 */ TIMER_STATE_9,
/* 10 */ TIMER_STATE_10,
/* 11 */ TIMER_STATE_11,
/* 12 */ TIMER_STATE_12,
/* 13 */ TIMER_STATE_13,
/* 14 */ TIMER_STATE_14,
/* 15 */ TIMER_STATE_15,
/* 16 */ TIMER_STATE_16
/* 13 */ TIMER_STATE_POSTMAN_START,
/* 14 */ TIMER_STATE_POSTMAN_COUNTING,
/* 15 */ TIMER_STATE_POSTMAN_STOP,
/* 16 */ TIMER_STATE_POSTMAN_END
} TimerState;
typedef enum {
/* 0 */ TIMER_ID_0,
/* 1 */ TIMER_ID_1, // minigame timer
/* 2 */ TIMER_ID_2,
/* 3 */ TIMER_ID_3, // countdown until mooncrash
/* 4 */ TIMER_ID_4,
/* 5 */ TIMER_ID_5,
/* 6 */ TIMER_ID_6,
/* 7 */ TIMER_ID_MAX,
/* 99 */ TIMER_ID_NONE = 99,
} TimerId;
/* 0 */ BOTTLE_TIMER_STATE_OFF,
/* 1 */ BOTTLE_TIMER_STATE_COUNTING
} BottleTimerState;
typedef enum {
/* 0 */ HUD_VISIBILITY_IDLE,
@@ -113,6 +129,7 @@ typedef enum {
/* 50 */ HUD_VISIBILITY_ALL = 50,
/* 52 */ HUD_VISIBILITY_OFF_NOW = 52
} HudVisibility;
typedef struct SramContext {
/* 0x00 */ u8* readBuff;
/* 0x04 */ u8 *saveBuf;
@@ -273,11 +290,11 @@ typedef struct SaveContext {
/* 0x1015 */ u8 unk_1015;
/* 0x1016 */ u16 jinxTimer;
/* 0x1018 */ s16 rupeeAccumulator; // "lupy_udct"
/* 0x101A */ u8 bottleStatus[6]; // "bottle_status", one entry for each bottle
/* 0x1020 */ OSTime bottleTimer1Value[6]; // "bottle_ostime", one entry for each bottle
/* 0x1050 */ OSTime bottleTimer2Value[6]; // "bottle_sub", one entry for each bottle
/* 0x1080 */ OSTime bottleTimer3Value[6]; // "bottle_time", one entry for each bottle
/* 0x10B0 */ OSTime bottleTimer4Value[6]; // "bottle_stop_time", one entry for each bottle
/* 0x101A */ u8 bottleTimerState[BOTTLE_MAX]; // "bottle_status", one entry for each bottle
/* 0x1020 */ OSTime bottleTimerStartOsTime[BOTTLE_MAX]; // "bottle_ostime", one entry for each bottle
/* 0x1050 */ u64 bottleTimerCurSubTime[BOTTLE_MAX]; // "bottle_sub", one entry for each bottle
/* 0x1080 */ u64 bottleTimerCurTime[BOTTLE_MAX]; // "bottle_time", one entry for each bottle
/* 0x10B0 */ OSTime bottleTimerPausedOsTime[BOTTLE_MAX]; // "bottle_stop_time", one entry for each bottle
/* 0x10E0 */ u64 pictoPhoto[1400]; // buffer containing the pictograph photo
/* 0x3CA0 */ s32 fileNum; // "file_no"
/* 0x3CA4 */ s16 powderKegTimer; // "big_bom_timer"
@@ -296,16 +313,16 @@ typedef struct SaveContext {
/* 0x3DBF */ u8 showTitleCard; // "name_display"
/* 0x3DC0 */ s16 unk_3DC0; // "shield_magic_timer"
/* 0x3DC2 */ u8 unk_3DC2; // "pad1"
/* 0x3DC8 */ OSTime timerOsTime; // "get_time"
/* 0x3DD0 */ u8 timerState[7]; // "event_fg"
/* 0x3DD7 */ u8 timersNoTimeLimit[7]; // "calc_flag"
/* 0x3DE0 */ OSTime eventTimer1Value[7]; // "event_ostime"
/* 0x3E18 */ OSTime eventTimer2Value[7]; // "event_sub"
/* 0x3E50 */ OSTime funcTimer1Value[7]; // "func_time"
/* 0x3E88 */ OSTime funcTimer2Value[7]; // "func_end_time"
/* 0x3EC0 */ OSTime funcTimer3Value[7]; // "func_stop_time"
/* 0x3EF8 */ s16 timerX[7]; // "event_xp"
/* 0x3F06 */ s16 timerY[7]; // "event_yp"
/* 0x3DC8 */ OSTime timerOsTime; // "get_time"
/* 0x3DD0 */ u8 timerState[TIMER_ID_MAX]; // "event_fg"
/* 0x3DD7 */ u8 timerDirection[TIMER_ID_MAX]; // "calc_flag"
/* 0x3DE0 */ u64 timerCurTime[TIMER_ID_MAX]; // "event_ostime"
/* 0x3E18 */ u64 timerCurSubTime[TIMER_ID_MAX]; // "event_sub"
/* 0x3E50 */ OSTime timerStartOsTime[TIMER_ID_MAX]; // "func_time"
/* 0x3E88 */ OSTime timerEndOsTime[TIMER_ID_MAX]; // "func_end_time"
/* 0x3EC0 */ OSTime timerPausedOsTime[TIMER_ID_MAX]; // "func_stop_time"
/* 0x3EF8 */ s16 timerX[TIMER_ID_MAX]; // "event_xp"
/* 0x3F06 */ s16 timerY[TIMER_ID_MAX]; // "event_yp"
/* 0x3F14 */ s16 unk_3F14; // "character_change"
/* 0x3F16 */ u8 seqIndex; // "old_bgm"
/* 0x3F17 */ u8 nightSeqIndex; // "old_env"
-1
View File
@@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u8 D_80096B20 = 1;
+1 -1
View File
@@ -688,7 +688,7 @@ void Inventory_SetMapVisibility(s16 tingleIndex) {
void Inventory_SaveDekuPlaygroundHighScore(s16 timerId) {
s16 i;
gSaveContext.save.dekuPlaygroundHighScores[CURRENT_DAY - 1] = gSaveContext.eventTimer1Value[timerId];
gSaveContext.save.dekuPlaygroundHighScores[CURRENT_DAY - 1] = gSaveContext.timerCurTime[timerId];
for (i = 0; i < 8; i++) {
gSaveContext.save.inventory.dekuPlaygroundPlayerName[CURRENT_DAY - 1][i] =
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#include "vt.h"
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
+351 -318
View File
File diff suppressed because it is too large Load Diff
+12 -11
View File
@@ -860,39 +860,40 @@ s32 func_80124278(Actor* actor, s32 actionParam) {
}
s32 func_801242B4(Player* player) {
return (player->stateFlags1 & PLAYER_STATE1_8000000) && player->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER;
return (player->stateFlags1 & PLAYER_STATE1_8000000) && (player->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER);
}
s32 func_801242DC(PlayState* play) {
s32 Player_GetEnvTimerType(PlayState* play) {
Player* player = GET_PLAYER(play);
TextTriggerEntry* triggerEntry;
s32 envIndex;
s32 envTimerType;
if (play->roomCtx.currRoom.unk2 == 3) { // Room is hot
envIndex = 0;
envTimerType = PLAYER_ENV_TIMER_HOTROOM - 1;
} else if ((player->transformation != PLAYER_FORM_ZORA) && (player->unk_AD8 > 80)) {
envIndex = 3;
envTimerType = PLAYER_ENV_TIMER_UNDERWATER_FREE - 1;
} else if (player->stateFlags1 & PLAYER_STATE1_8000000) {
if ((player->transformation == PLAYER_FORM_ZORA) && (player->currentBoots >= PLAYER_BOOTS_ZORA_UNDERWATER) &&
(player->actor.bgCheckFlags & 1)) {
envIndex = 1;
envTimerType = PLAYER_ENV_TIMER_UNDERWATER_FLOOR - 1;
} else {
envIndex = 2;
envTimerType = PLAYER_ENV_TIMER_SWIMMING - 1;
}
} else {
return 0;
return PLAYER_ENV_TIMER_NONE;
}
// Trigger general textboxes under certain conditions, like "It's so hot in here!". Unused in MM
triggerEntry = &sEnvironmentTextTriggers[envIndex];
triggerEntry = &sEnvironmentTextTriggers[envTimerType];
if (!Player_InCsMode(play)) {
if ((triggerEntry->flag) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) && (envIndex == 0)) {
if ((triggerEntry->flag) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
(envTimerType == (PLAYER_ENV_TIMER_HOTROOM - 1))) {
Message_StartTextbox(play, triggerEntry->textId, NULL);
gSaveContext.textTriggerFlags |= triggerEntry->flag;
}
}
return envIndex + 1;
return envTimerType + 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80124420.s")
+14 -14
View File
@@ -219,13 +219,13 @@ void Sram_ActivateOwl(u8 owlId) {
void Sram_ClearHighscores(void) {
gSaveContext.save.unk_EE8 = (gSaveContext.save.unk_EE8 & 0xFFFF) | 0x130000;
gSaveContext.save.unk_EE8 = (gSaveContext.save.unk_EE8 & 0xFFFF0000) | 0xA;
gSaveContext.save.horseBackBalloonHighScore = 6000; // 60 seconds
gSaveContext.save.horseBackBalloonHighScore = SECONDS_TO_TIMER(60);
SET_TOWN_SHOOTING_GALLERY_HIGH_SCORE(39);
SET_SWAMP_SHOOTING_GALLERY_HIGH_SCORE(10);
gSaveContext.save.dekuPlaygroundHighScores[0] = 7500; // 75 seconds
gSaveContext.save.dekuPlaygroundHighScores[1] = 7500; // 75 seconds
gSaveContext.save.dekuPlaygroundHighScores[2] = 7600; // 76 seconds
gSaveContext.save.dekuPlaygroundHighScores[0] = SECONDS_TO_TIMER(75);
gSaveContext.save.dekuPlaygroundHighScores[1] = SECONDS_TO_TIMER(75);
gSaveContext.save.dekuPlaygroundHighScores[2] = SECONDS_TO_TIMER(76);
}
/**
@@ -896,11 +896,11 @@ void func_80144A94(SramContext* sramCtx) {
for (i = 0; i < ARRAY_COUNT(gSaveContext.timerState); i++) {
gSaveContext.timerState[i] = TIMER_STATE_OFF;
gSaveContext.eventTimer1Value[i] = 0;
gSaveContext.eventTimer2Value[i] = 0;
gSaveContext.funcTimer1Value[i] = 0;
gSaveContext.funcTimer2Value[i] = 0;
gSaveContext.funcTimer3Value[i] = 0;
gSaveContext.timerCurTime[i] = SECONDS_TO_TIMER(0);
gSaveContext.timerCurSubTime[i] = SECONDS_TO_TIMER(0);
gSaveContext.timerStartOsTime[i] = 0;
gSaveContext.timerEndOsTime[i] = 0;
gSaveContext.timerPausedOsTime[i] = 0;
}
D_801BDAA0 = 1;
@@ -971,11 +971,11 @@ void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
for (i = 0; i < ARRAY_COUNT(gSaveContext.timerState); i++) {
gSaveContext.timerState[i] = TIMER_STATE_OFF;
gSaveContext.eventTimer1Value[i] = 0;
gSaveContext.eventTimer2Value[i] = 0;
gSaveContext.funcTimer1Value[i] = 0;
gSaveContext.funcTimer2Value[i] = 0;
gSaveContext.funcTimer3Value[i] = 0;
gSaveContext.timerCurTime[i] = SECONDS_TO_TIMER(0);
gSaveContext.timerCurSubTime[i] = SECONDS_TO_TIMER(0);
gSaveContext.timerStartOsTime[i] = 0;
gSaveContext.timerEndOsTime[i] = 0;
gSaveContext.timerPausedOsTime[i] = 0;
}
if (gSaveContext.save.isFirstCycle) {
@@ -53,6 +53,7 @@
* - Seaweed
*/
#include "prevent_bss_reordering.h"
#include "z_boss_03.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
#include "overlays/actors/ovl_En_Water_Effect/z_en_water_effect.h"
+8 -8
View File
@@ -1045,11 +1045,11 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_ROOFTOP, 0)) {
if (gSaveContext.sceneSetupIndex == 0) {
if (gSaveContext.timerState[TIMER_ID_3] == TIMER_STATE_OFF) {
if (gSaveContext.timerState[TIMER_ID_FINAL_HOURS] == TIMER_STATE_OFF) {
// Starts a 5 minute (300 second) timer until the moon falls.
func_8010E9F0(TIMER_ID_3, 300);
XREG(80) = 200;
XREG(81) = 115;
Interface_StartTimer(TIMER_ID_FINAL_HOURS, 300);
R_FINAL_HOURS_TIMER_Y = 200;
R_FINAL_HOURS_TIMER_X = 115;
}
if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) {
@@ -1062,12 +1062,12 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
} else if (gSaveContext.sceneSetupIndex == 3) {
this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED;
if (gSaveContext.timerState[TIMER_ID_3] == TIMER_STATE_OFF) {
if (gSaveContext.timerState[TIMER_ID_FINAL_HOURS] == TIMER_STATE_OFF) {
// This code is called when the Giants fail to stop the moon.
// Starts a 1 minute (60 second) timer until the moon falls.
func_8010E9F0(TIMER_ID_3, 60);
XREG(80) = 200;
XREG(81) = 115;
Interface_StartTimer(TIMER_ID_FINAL_HOURS, 60);
R_FINAL_HOURS_TIMER_Y = 200;
R_FINAL_HOURS_TIMER_X = 115;
}
this->actor.world.pos.y = 120.0f;
+2 -2
View File
@@ -216,7 +216,7 @@ void EnDno_Init(Actor* thisx, PlayState* play) {
} else {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 14, &this->unk_32C);
thisx->room = -1;
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_5;
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_STOP;
this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo);
this->unk_3B0 |= 1;
this->actionFunc = func_80A72438;
@@ -817,7 +817,7 @@ void func_80A73244(EnDno* this, PlayState* play) {
this->unk_328 = 2;
this->actor.speedXZ = 0.0f;
Flags_UnsetSwitch(play, ENDNO_GET_3F80(&this->actor));
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_5;
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_STOP;
this->unk_44E = 0;
this->actionFunc = func_80A732C8;
}
+12 -12
View File
@@ -401,7 +401,7 @@ void func_80962340(EnFu* this, PlayState* play) {
Message_StartTextbox(play, 0x287E, &this->actor);
this->unk_552 = 0x287E;
}
} else if ((gSaveContext.eventTimer1Value[TIMER_ID_4] == 0) && (this->unk_552 != 0x2888)) {
} else if ((gSaveContext.timerCurTime[TIMER_ID_4] == SECONDS_TO_TIMER(0)) && (this->unk_552 != 0x2888)) {
Message_StartTextbox(play, 0x2886, &this->actor);
this->unk_552 = 0x2886;
} else {
@@ -644,7 +644,7 @@ void func_80962A10(EnFu* this, PlayState* play) {
play_sound(NA_SE_SY_FOUND);
player->stateFlags1 &= ~0x20;
func_8010E9F0(TIMER_ID_4, 60);
Interface_StartTimer(TIMER_ID_4, 60);
if (this->unk_546 == 1) {
func_809616E0(this, play);
} else {
@@ -682,7 +682,7 @@ void func_80962BCC(EnFu* this, PlayState* play) {
play_sound(NA_SE_SY_FOUND);
player->stateFlags1 &= ~0x20;
player->stateFlags3 |= 0x400000;
func_8010E9F0(TIMER_ID_4, 60);
Interface_StartTimer(TIMER_ID_4, 60);
if (this->unk_546 == 1) {
func_809616E0(this, play);
@@ -713,7 +713,7 @@ void func_80962D60(EnFu* this, PlayState* play) {
play_sound(NA_SE_SY_FOUND);
player->stateFlags1 &= ~0x20;
player->stateFlags3 |= 0x400000;
func_8010E9F0(TIMER_ID_4, 60);
Interface_StartTimer(TIMER_ID_4, 60);
if (this->unk_546 == 1) {
func_809616E0(this, play);
@@ -761,11 +761,11 @@ void func_80962F4C(EnFu* this, PlayState* play) {
break;
}
if (gSaveContext.eventTimer1Value[TIMER_ID_4] < 2000) {
if (gSaveContext.timerCurTime[TIMER_ID_4] < SECONDS_TO_TIMER(20)) {
s16 val = D_80964B00[this->unk_542] + 200;
Math_SmoothStepToS(&fuKaiten->rotationSpeed, val, 10, 5, 5);
} else if (gSaveContext.eventTimer1Value[TIMER_ID_4] < 4000) {
} else if (gSaveContext.timerCurTime[TIMER_ID_4] < SECONDS_TO_TIMER(40)) {
s16 val = D_80964B00[this->unk_542] + 100;
Math_SmoothStepToS(&fuKaiten->rotationSpeed, val, 10, 5, 5);
@@ -777,12 +777,12 @@ void func_80962F4C(EnFu* this, PlayState* play) {
if ((!DynaPolyActor_IsInRidingRotatingState((DynaPolyActor*)this->actor.child) &&
(player->actor.bgCheckFlags & 1)) ||
(gSaveContext.eventTimer1Value[TIMER_ID_4] < 1) || (this->unk_548 == this->unk_54C)) {
(gSaveContext.timerCurTime[TIMER_ID_4] <= SECONDS_TO_TIMER(0)) || (this->unk_548 == this->unk_54C)) {
player->stateFlags3 &= ~0x400000;
func_80961E88(play);
player->stateFlags1 |= 0x20;
if (this->unk_548 < this->unk_54C) {
if (gSaveContext.eventTimer1Value[TIMER_ID_4] == 0) {
if (gSaveContext.timerCurTime[TIMER_ID_4] == SECONDS_TO_TIMER(0)) {
Message_StartTextbox(play, 0x2885, &this->actor);
this->unk_552 = 0x2885;
} else {
@@ -790,15 +790,15 @@ void func_80962F4C(EnFu* this, PlayState* play) {
this->unk_552 = 0x2888;
}
func_801A2C20();
gSaveContext.eventTimer1Value[TIMER_ID_4] = 0;
gSaveContext.timerState[TIMER_ID_4] = TIMER_STATE_5;
gSaveContext.timerCurTime[TIMER_ID_4] = SECONDS_TO_TIMER(0);
gSaveContext.timerState[TIMER_ID_4] = TIMER_STATE_STOP;
this->unk_548 = 0;
func_809632D0(this);
} else {
this->unk_548 = 0;
func_801A2C20();
gSaveContext.eventTimer1Value[TIMER_ID_4] = 0;
gSaveContext.timerState[TIMER_ID_4] = TIMER_STATE_5;
gSaveContext.timerCurTime[TIMER_ID_4] = SECONDS_TO_TIMER(0);
gSaveContext.timerState[TIMER_ID_4] = TIMER_STATE_STOP;
func_801A3098(NA_BGM_GET_ITEM | 0x900);
Interface_SetPerfectMinigame(play, 1);
this->unk_54A = 3;
+5 -5
View File
@@ -459,7 +459,7 @@ void func_80B10240(EnGb2* this, PlayState* play) {
D_80B119B0[this->unk_280].unk_04.y, D_80B119B0[this->unk_280].unk_04.z, 0, 0, 0,
this->unk_27E);
if (this->unk_280 == 0) {
func_8010E9F0(TIMER_ID_1, 180);
Interface_StartTimer(TIMER_ID_1, 180);
}
this->actionFunc = func_80B10344;
} else {
@@ -487,7 +487,7 @@ void func_80B10344(EnGb2* this, PlayState* play) {
if (this->unk_26C & 0x200) {
if (this->unk_280 == 3) {
this->unk_26C &= ~0x200;
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_5;
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_STOP;
func_800FE498();
gSaveContext.eventInf[4] |= 0x40;
func_80B0FE7C(play);
@@ -506,7 +506,7 @@ void func_80B10344(EnGb2* this, PlayState* play) {
}
if (gSaveContext.save.playerData.health < 49) {
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_5;
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_STOP;
gSaveContext.eventInf[4] |= 0x40;
gSaveContext.eventInf[4] |= 0x20;
@@ -519,8 +519,8 @@ void func_80B10344(EnGb2* this, PlayState* play) {
}
func_80B0FE7C(play);
} else if (gSaveContext.eventTimer1Value[TIMER_ID_1] == 0) {
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_5;
} else if (gSaveContext.timerCurTime[TIMER_ID_1] == SECONDS_TO_TIMER(0)) {
gSaveContext.timerState[TIMER_ID_1] = TIMER_STATE_STOP;
gSaveContext.eventInf[4] |= 0x40;
gSaveContext.eventInf[4] |= 0x10;
@@ -121,7 +121,7 @@ s32 func_808F8CCC(EnHorseGameCheck* this, PlayState* play2) {
return false;
}
func_8010E9F0(TIMER_ID_4, 0);
Interface_StartTimer(TIMER_ID_4, 0);
play->interfaceCtx.minigameState = 1;
this->horse1 = (EnHorse*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -1149.0f, -106.0f, 470.0f, 0, 0x7FFF, 0,
@@ -247,7 +247,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
return true;
}
if (gSaveContext.eventTimer1Value[TIMER_ID_4] >= 0x4650) {
if (gSaveContext.timerCurTime[TIMER_ID_4] >= SECONDS_TO_TIMER(180)) {
Audio_QueueSeqCmd(0x8041);
play_sound(NA_SE_SY_START_SHOT);
this->unk_164 |= 0x40000;
@@ -155,7 +155,7 @@ void func_80C13BB8(EnJgameTsn* this, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
if (this->actor.flags & ACTOR_FLAG_10000) {
this->actor.flags &= ~ACTOR_FLAG_10000;
if (gSaveContext.eventTimer1Value[TIMER_ID_4] > 0) {
if (gSaveContext.timerCurTime[TIMER_ID_4] > SECONDS_TO_TIMER(0)) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1);
Message_StartTextbox(play, 0x10A2, &this->actor);
this->unk_300 = 0x10A2;
@@ -287,7 +287,7 @@ void func_80C1410C(EnJgameTsn* this, PlayState* play) {
play->interfaceCtx.minigameState = 1;
Interface_InitMinigame(play);
gSaveContext.save.weekEventReg[90] |= 0x20;
func_8010E9F0(TIMER_ID_4, 120);
Interface_StartTimer(TIMER_ID_4, 120);
this->actionFunc = func_80C1418C;
}
@@ -352,7 +352,7 @@ void func_80C14230(EnJgameTsn* this, PlayState* play) {
func_80C14030(this);
}
if (gSaveContext.eventTimer1Value[TIMER_ID_4] == 0) {
if (gSaveContext.timerCurTime[TIMER_ID_4] == SECONDS_TO_TIMER(0)) {
Message_StartTextbox(play, 0x10A1, &this->actor);
this->unk_300 = 0x10A1;
player->stateFlags1 |= 0x20;
@@ -479,7 +479,7 @@ void func_80C147B4(EnJgameTsn* this, PlayState* play) {
case 0x10A1:
func_801477B4(play);
gSaveContext.minigameState = 3;
gSaveContext.timerState[TIMER_ID_4] = TIMER_STATE_5;
gSaveContext.timerState[TIMER_ID_4] = TIMER_STATE_STOP;
gSaveContext.save.weekEventReg[90] &= (u8)~0x20;
func_80C144E4(this);
break;
+9 -10
View File
@@ -674,7 +674,7 @@ void EnMa4_HorsebackGameCheckPlayerInteractions(EnMa4* this, PlayState* play) {
// "You're feeling confident"
Message_StartTextbox(play, 0x336E, &this->actor);
this->actionFunc = EnMa4_HorsebackGameTalking;
} else if ((gSaveContext.eventTimer1Value[TIMER_ID_4] < 115 * 100)) { // timer < 115 seconds
} else if (gSaveContext.timerCurTime[TIMER_ID_4] < SECONDS_TO_TIMER(115)) {
func_800B8614(&this->actor, play, 100.0f);
}
}
@@ -689,7 +689,7 @@ void EnMa4_InitHorsebackGame(EnMa4* this, PlayState* play) {
Player* player = GET_PLAYER(play);
play->interfaceCtx.minigameState = 1;
func_8010E9F0(TIMER_ID_4, 0);
Interface_StartTimer(TIMER_ID_4, 0);
gSaveContext.save.weekEventReg[8] |= 1;
Interface_InitMinigame(play);
player->stateFlags1 |= 0x20;
@@ -717,8 +717,7 @@ void EnMa4_HorsebackGameWait(EnMa4* this, PlayState* play) {
play->interfaceCtx.unk_25C = 1;
}
if ((gSaveContext.eventTimer1Value[TIMER_ID_4] >= 2 * 60 * 100) // timer >= 2 minutes
|| (this->poppedBalloonCounter == 10)) {
if ((gSaveContext.timerCurTime[TIMER_ID_4] >= SECONDS_TO_TIMER(120)) || (this->poppedBalloonCounter == 10)) {
gSaveContext.timerState[TIMER_ID_4] = TIMER_STATE_6;
EnMa4_SetupHorsebackGameEnd(this, play);
D_80AC0258 = 0;
@@ -898,13 +897,13 @@ void EnMa4_StartDialogue(EnMa4* this, PlayState* play) {
gSaveContext.save.weekEventReg[21] |= 0x40;
}
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
if (gSaveContext.eventTimer1Value[TIMER_ID_4] >= 2 * 60 * 100) {
if (gSaveContext.timerCurTime[TIMER_ID_4] >= SECONDS_TO_TIMER(120)) {
// "Too bad Grasshopper"
EnMa4_SetFaceExpression(this, 0, 0);
Message_StartTextbox(play, 0x336D, &this->actor);
this->textId = 0x336D;
} else {
time = gSaveContext.eventTimer1Value[TIMER_ID_4];
time = gSaveContext.timerCurTime[TIMER_ID_4];
if ((s32)time < (s32)gSaveContext.save.horseBackBalloonHighScore) {
// [Score] New record!
gSaveContext.save.horseBackBalloonHighScore = time;
@@ -943,12 +942,12 @@ void EnMa4_StartDialogue(EnMa4* this, PlayState* play) {
Message_StartTextbox(play, 0x3354, &this->actor);
this->textId = 0x3354;
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
if (gSaveContext.eventTimer1Value[TIMER_ID_4] >= 2 * 60 * 100) {
if (gSaveContext.timerCurTime[TIMER_ID_4] >= SECONDS_TO_TIMER(120)) {
// "Try again?"
Message_StartTextbox(play, 0x3356, &this->actor);
this->textId = 0x3356;
} else {
time = gSaveContext.eventTimer1Value[TIMER_ID_4];
time = gSaveContext.timerCurTime[TIMER_ID_4];
if ((s32)time < (s32)gSaveContext.save.horseBackBalloonHighScore) {
gSaveContext.save.horseBackBalloonHighScore = time;
EnMa4_SetFaceExpression(this, 0, 3);
@@ -970,12 +969,12 @@ void EnMa4_StartDialogue(EnMa4* this, PlayState* play) {
Message_StartTextbox(play, 0x3358, &this->actor);
this->textId = 0x3358;
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
if (gSaveContext.eventTimer1Value[TIMER_ID_4] >= 2 * 60 * 100) {
if (gSaveContext.timerCurTime[TIMER_ID_4] >= SECONDS_TO_TIMER(120)) {
// "Try again?"
Message_StartTextbox(play, 0x3356, &this->actor);
this->textId = 0x3356;
} else {
time = gSaveContext.eventTimer1Value[TIMER_ID_4];
time = gSaveContext.timerCurTime[TIMER_ID_4];
if ((s32)time < (s32)gSaveContext.save.horseBackBalloonHighScore) {
// New record
gSaveContext.save.horseBackBalloonHighScore = time;

Some files were not shown because too many files have changed in this diff Show More