mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-19 05:22:00 +00:00
Document Timers (#1412)
* Document Timers, First Draft * some progress * more timer docs * cleanup * small cleanup * more cleanup * comments * more cleanup * extra comment * more docs * brackets * PR Suggestions * cleanup, missed some * more suggestions * more PR Suggestions * small change * environmental
This commit is contained in:
parent
cc2409606e
commit
40639e698d
32 changed files with 550 additions and 435 deletions
|
@ -103,20 +103,20 @@ void func_80AAEF70(EnMm2* this, PlayState* play) {
|
|||
if (!GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
|
||||
this->actor.textId = 0x6086;
|
||||
} else if (GET_INFTABLE(INFTABLE_17F)) {
|
||||
if (GET_EVENTINF(EVENTINF_10)) {
|
||||
if (GET_EVENTINF(EVENTINF_MARATHON_ACTIVE)) {
|
||||
this->actor.textId = 0x6082;
|
||||
} else if (gSaveContext.timer2State != 0) {
|
||||
} else if (gSaveContext.subTimerState != SUBTIMER_STATE_OFF) {
|
||||
this->actor.textId = 0x6076;
|
||||
} else if (HIGH_SCORE(HS_MARATHON) == 158) {
|
||||
this->actor.textId = 0x607E;
|
||||
} else {
|
||||
this->actor.textId = 0x6081;
|
||||
}
|
||||
} else if (gSaveContext.timer2State) {
|
||||
} else if (gSaveContext.subTimerState != SUBTIMER_STATE_OFF) {
|
||||
this->actor.textId = 0x6076;
|
||||
} else {
|
||||
this->actor.textId = 0x607D;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
CLEAR_EVENTINF(EVENTINF_MARATHON_ACTIVE);
|
||||
HIGH_SCORE(HS_MARATHON) = 158;
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ void EnMm2_Init(Actor* thisx, PlayState* play2) {
|
|||
Actor_Kill(&this->actor);
|
||||
}
|
||||
if (this->actor.params == 1) {
|
||||
if (!GET_INFTABLE(INFTABLE_17F) || !GET_EVENTINF(EVENTINF_10)) {
|
||||
if (!GET_INFTABLE(INFTABLE_17F) || !GET_EVENTINF(EVENTINF_MARATHON_ACTIVE)) {
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " マラソン 開始されていない \n" VT_RST "\n");
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
@ -193,8 +193,8 @@ void func_80AAF330(EnMm2* this, PlayState* play) {
|
|||
if (!(this->unk_1F4 & 2)) {
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
gSaveContext.timer2State = 0;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
gSaveContext.subTimerState = SUBTIMER_STATE_OFF;
|
||||
CLEAR_EVENTINF(EVENTINF_MARATHON_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ void func_80AAF3C0(EnMm2* this, PlayState* play) {
|
|||
case 0:
|
||||
Message_ContinueTextbox(play, 0x607F);
|
||||
this->actor.textId = 0x607F;
|
||||
SET_EVENTINF(EVENTINF_10);
|
||||
SET_EVENTINF(EVENTINF_MARATHON_ACTIVE);
|
||||
break;
|
||||
case 1:
|
||||
Message_ContinueTextbox(play, 0x6080);
|
||||
|
@ -219,14 +219,14 @@ void func_80AAF3C0(EnMm2* this, PlayState* play) {
|
|||
if (this->unk_1F4 & 4) {
|
||||
if (1) {}
|
||||
this->unk_1F4 &= ~4;
|
||||
HIGH_SCORE(HS_MARATHON) += 1;
|
||||
HIGH_SCORE(HS_MARATHON)++;
|
||||
}
|
||||
}
|
||||
return;
|
||||
case 0x6081:
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
|
||||
this->unk_1F4 |= 4;
|
||||
HIGH_SCORE(HS_MARATHON) -= 1;
|
||||
HIGH_SCORE(HS_MARATHON)--;
|
||||
Message_ContinueTextbox(play, 0x607E);
|
||||
this->actor.textId = 0x607E;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ void func_80AAF3C0(EnMm2* this, PlayState* play) {
|
|||
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
if (this->actor.textId == 0x607F) {
|
||||
func_80088AA0(0);
|
||||
Interface_SetSubTimer(0);
|
||||
this->actionFunc = func_80AAF57C;
|
||||
} else {
|
||||
this->actionFunc = func_80AAF57C;
|
||||
|
@ -266,19 +266,20 @@ void func_80AAF668(EnMm2* this, PlayState* play) {
|
|||
this->actor.world.rot.y = -0x3E80;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (((void)0, gSaveContext.timer2Value) < HIGH_SCORE(HS_MARATHON)) {
|
||||
if (((void)0, gSaveContext.subTimerSeconds) < HIGH_SCORE(HS_MARATHON)) {
|
||||
this->actor.textId = 0x6085;
|
||||
} else {
|
||||
this->actor.textId = 0x6084;
|
||||
}
|
||||
if (func_80AAF224(this, play, func_80AAF5EC)) {
|
||||
this->unk_1F6 = 0;
|
||||
if (((void)0, gSaveContext.timer2Value) < HIGH_SCORE(HS_MARATHON)) {
|
||||
HIGH_SCORE(HS_MARATHON) = gSaveContext.timer2Value;
|
||||
if (((void)0, gSaveContext.subTimerSeconds) < HIGH_SCORE(HS_MARATHON)) {
|
||||
HIGH_SCORE(HS_MARATHON) = gSaveContext.subTimerSeconds;
|
||||
}
|
||||
} else {
|
||||
LOG_HEX("((z_common_data.event_inf[1]) & (0x0001))", GET_EVENTINF(EVENTINF_10), "../z_en_mm2.c", 541);
|
||||
if (!GET_EVENTINF(EVENTINF_10)) {
|
||||
LOG_HEX("((z_common_data.event_inf[1]) & (0x0001))", GET_EVENTINF(EVENTINF_MARATHON_ACTIVE), "../z_en_mm2.c",
|
||||
541);
|
||||
if (!GET_EVENTINF(EVENTINF_MARATHON_ACTIVE)) {
|
||||
this->unk_1F4 |= 2;
|
||||
this->unk_1F4 &= ~1;
|
||||
EnMm2_ChangeAnim(this, RM2_ANIM_STAND, &this->previousAnimation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue