1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 14:34:32 +00:00

code_80110450 (game over) OK* (#739)

* OK (sort of)

* remove hack

* clean up comments
This commit is contained in:
fig02 2021-03-28 19:50:46 -04:00 committed by GitHub
parent 187d2d1500
commit 1639417327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 209 additions and 444 deletions

View file

@ -341,7 +341,7 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
Math_ApproachF(&this->dyna.actor.world.pos.y, this->unk_168 - 1000.0f, 1.0f, this->dyna.actor.velocity.y);
//! Note to whoever tries to match this function:
//! daytime commonly needs the (void)0 trick.
//! could help with the temp above and some of these other memes.
//! could help with the temp above and some of these other memes.
//! -fig02 (https://github.com/zeldaret/oot/pull/713#discussion_r593921251)
if (!gSaveContext.dayTime) {
if (1) {}

View file

@ -72,8 +72,9 @@ void EnOkarinaEffect_TriggerStorm(EnOkarinaEffect* this, GlobalContext* globalCt
void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx) {
Flags_UnsetEnv(globalCtx, 5); // clear storms env flag
if (((globalCtx->pauseCtx.state == 0) && (globalCtx->unk_10A20 == 0) && (globalCtx->msgCtx.unk_E300 == 0) &&
(!FrameAdvance_IsEnabled(globalCtx)) && ((globalCtx->transitionMode == 0) || (gSaveContext.gameMode != 0))) ||
if (((globalCtx->pauseCtx.state == 0) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) &&
(globalCtx->msgCtx.unk_E300 == 0) && (!FrameAdvance_IsEnabled(globalCtx)) &&
((globalCtx->transitionMode == 0) || (gSaveContext.gameMode != 0))) ||
(this->timer >= 250)) {
if (globalCtx->envCtx.unk_1E != 0 || globalCtx->envCtx.unk_1F != 1) {
this->timer--;

View file

@ -2768,10 +2768,10 @@ void func_80836448(GlobalContext* globalCtx, Player* this, LinkAnimationHeader*
func_800F47BC();
if (Inventory_ConsumeFairy(globalCtx)) {
globalCtx->unk_10A20 = 20;
globalCtx->gameOverCtx.state = GAMEOVER_REVIVE_START;
this->unk_84F = 1;
} else {
globalCtx->unk_10A20 = 1;
globalCtx->gameOverCtx.state = GAMEOVER_DEATH_START;
func_800F6AB0(0);
func_800F5C64(0x20);
gSaveContext.seqIndex = 0xFF;
@ -7788,8 +7788,8 @@ void func_80843AE8(GlobalContext* globalCtx, Player* this) {
Player_SpawnFairy(globalCtx, this, &this->actor.world.pos, &D_808545E4, FAIRY_REVIVE_DEATH);
func_8002F7DC(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
func_800800F8(globalCtx, 0x26B4, 125, &this->actor, 0);
} else if (globalCtx->unk_10A20 == 2) {
globalCtx->unk_10A20 = 3;
} else if (globalCtx->gameOverCtx.state == GAMEOVER_DEATH_WAIT_GROUND) {
globalCtx->gameOverCtx.state = GAMEOVER_DEATH_DELAY_MENU;
}
}