mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Document SaveContext.gameMode
(#1295)
* Document `SaveContext.gameMode` * end credits * Remove no longer needed comment
This commit is contained in:
parent
e16779cc33
commit
984871eb38
17 changed files with 41 additions and 31 deletions
|
@ -49,8 +49,7 @@ void EnLight_Init(Actor* thisx, PlayState* play) {
|
|||
EnLight* this = (EnLight*)thisx;
|
||||
s16 yOffset;
|
||||
|
||||
if (gSaveContext.gameMode == 3) {
|
||||
// special case for the credits
|
||||
if (gSaveContext.gameMode == GAMEMODE_END_CREDITS) {
|
||||
yOffset = (this->actor.params < 0) ? 1 : 40;
|
||||
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, yOffset + (s16)this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 255, 255, 180, -1);
|
||||
|
|
|
@ -145,7 +145,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
gSaveContext.gameMode = 2;
|
||||
gSaveContext.gameMode = GAMEMODE_FILE_SELECT;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
}
|
||||
|
|
|
@ -459,7 +459,7 @@ void func_80AAE294(EnMm* this, PlayState* play) {
|
|||
dustPos.y = this->actor.world.pos.y;
|
||||
dustPos.z = this->actor.world.pos.z;
|
||||
|
||||
if (gSaveContext.gameMode != 3) {
|
||||
if (gSaveContext.gameMode != GAMEMODE_END_CREDITS) {
|
||||
func_80033480(play, &dustPos, 50.0f, 2, 350, 20, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, PlayState* play) {
|
|||
Flags_UnsetEnv(play, 5); // clear storms env flag
|
||||
if (((play->pauseCtx.state == 0) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(play->msgCtx.msgLength == 0) && (!FrameAdvance_IsEnabled(play)) &&
|
||||
((play->transitionMode == TRANS_MODE_OFF) || (gSaveContext.gameMode != 0))) ||
|
||||
((play->transitionMode == TRANS_MODE_OFF) || (gSaveContext.gameMode != GAMEMODE_NORMAL))) ||
|
||||
(this->timer >= 250)) {
|
||||
if ((play->envCtx.lightMode != LIGHT_MODE_TIME) || play->envCtx.lightConfig != 1) {
|
||||
this->timer--;
|
||||
|
|
|
@ -9373,7 +9373,7 @@ void Player_Init(Actor* thisx, PlayState* play2) {
|
|||
D_80854738[initMode](play, this);
|
||||
|
||||
if (initMode != 0) {
|
||||
if ((gSaveContext.gameMode == 0) || (gSaveContext.gameMode == 3)) {
|
||||
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) || (gSaveContext.gameMode == GAMEMODE_END_CREDITS)) {
|
||||
this->naviActor = Player_SpawnFairy(play, this, &thisx->world.pos, &D_80854778, FAIRY_NAVI);
|
||||
if (gSaveContext.dogParams != 0) {
|
||||
gSaveContext.dogParams |= 0x8000;
|
||||
|
|
|
@ -1445,7 +1445,7 @@ void FileSelect_LoadGame(GameState* thisx) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
gSaveContext.fileNum = this->buttonIndex;
|
||||
Sram_OpenSave(&this->sramCtx);
|
||||
gSaveContext.gameMode = 0;
|
||||
gSaveContext.gameMode = GAMEMODE_NORMAL;
|
||||
SET_NEXT_GAMESTATE(&this->state, MapSelect_Init, MapSelectState);
|
||||
this->state.running = false;
|
||||
} else {
|
||||
|
@ -1453,7 +1453,7 @@ void FileSelect_LoadGame(GameState* thisx) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
gSaveContext.fileNum = this->buttonIndex;
|
||||
Sram_OpenSave(&this->sramCtx);
|
||||
gSaveContext.gameMode = 0;
|
||||
gSaveContext.gameMode = GAMEMODE_NORMAL;
|
||||
SET_NEXT_GAMESTATE(&this->state, Play_Init, PlayState);
|
||||
this->state.running = false;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "global.h"
|
||||
|
||||
void TitleSetup_SetupTitleScreen(TitleSetupState* this) {
|
||||
gSaveContext.gameMode = 1;
|
||||
gSaveContext.gameMode = GAMEMODE_TITLE_SCREEN;
|
||||
this->state.running = false;
|
||||
gSaveContext.linkAge = LINK_AGE_ADULT;
|
||||
Sram_InitDebugSave();
|
||||
|
|
|
@ -139,7 +139,7 @@ void ConsoleLogo_Main(GameState* thisx) {
|
|||
if (this->exit) {
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.gameMode = 1;
|
||||
gSaveContext.gameMode = GAMEMODE_TITLE_SCREEN;
|
||||
this->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&this->state, TitleSetup_Init, TitleSetupState);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue