mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +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
|
@ -49,14 +49,14 @@ void ObjRoomtimer_Init(Actor* thisx, PlayState* play) {
|
|||
void ObjRoomtimer_Destroy(Actor* thisx, PlayState* play) {
|
||||
ObjRoomtimer* this = (ObjRoomtimer*)thisx;
|
||||
|
||||
if ((this->actor.params != 0x3FF) && (gSaveContext.timer1Value > 0)) {
|
||||
gSaveContext.timer1State = 10;
|
||||
if ((this->actor.params != 0x3FF) && (gSaveContext.timerSeconds > 0)) {
|
||||
gSaveContext.timerState = TIMER_STATE_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B9D054(ObjRoomtimer* this, PlayState* play) {
|
||||
if (this->actor.params != 0x3FF) {
|
||||
func_80088B34(this->actor.params);
|
||||
Interface_SetTimer(this->actor.params);
|
||||
}
|
||||
|
||||
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP);
|
||||
|
@ -66,19 +66,20 @@ void func_80B9D054(ObjRoomtimer* this, PlayState* play) {
|
|||
void func_80B9D0B0(ObjRoomtimer* this, PlayState* play) {
|
||||
if (Flags_GetTempClear(play, this->actor.room)) {
|
||||
if (this->actor.params != 0x3FF) {
|
||||
gSaveContext.timer1State = 10;
|
||||
gSaveContext.timerState = TIMER_STATE_STOP;
|
||||
}
|
||||
Flags_SetClear(play, this->actor.room);
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
if ((this->actor.params != 0x3FF) && (gSaveContext.timer1Value == 0)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_ABYSS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Play_TriggerVoidOut(play);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ((this->actor.params != 0x3FF) && (gSaveContext.timerSeconds == 0)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_ABYSS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Play_TriggerVoidOut(play);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue