mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-02 07:46:01 +00:00
Merge branch 'master' of https://github.com/zeldaret/oot into gcc_support
This commit is contained in:
commit
118bb7daad
22 changed files with 101 additions and 102 deletions
|
@ -93,7 +93,7 @@ def search_rom_address(target_addr):
|
|||
rom = ram - ram_offset
|
||||
sym = line.split()[-1]
|
||||
|
||||
if "0x" in sym:
|
||||
if sym.startswith("0x"):
|
||||
ram_offset = None
|
||||
continue
|
||||
if "/" in sym:
|
||||
|
@ -139,7 +139,7 @@ def parse_map(map_fname):
|
|||
rom = ram - ram_offset
|
||||
sym = line.split()[-1]
|
||||
|
||||
if "0x" in sym:
|
||||
if sym.startswith("0x"):
|
||||
ram_offset = None
|
||||
continue
|
||||
elif "/" in sym:
|
||||
|
|
|
@ -906,8 +906,8 @@ void Environment_AdjustLights(GlobalContext* globalCtx, f32 arg1, f32 arg2, f32
|
|||
s32 Environment_GetBgsDayCount(void);
|
||||
void Environment_ClearBgsDayCount(void);
|
||||
s32 Environment_GetTotalDays(void);
|
||||
void func_800775F0(u16);
|
||||
s32 func_80077600(void);
|
||||
void Environment_ForcePlaySequence(u16);
|
||||
s32 Environment_IsForcedSequenceDisabled(void);
|
||||
void func_80077624(GlobalContext* globalCtx);
|
||||
void func_80077684(GlobalContext* globalCtx);
|
||||
void Environment_WarpSongLeave(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef BGM_H
|
||||
#define BGM_H
|
||||
#ifndef SEQUENCE_H
|
||||
#define SEQUENCE_H
|
||||
|
||||
#define NA_BGM_STOP 0x100000FF
|
||||
|
||||
#define NA_BGM_GENERAL_SFX 0x0 // General Sound Effects
|
||||
#define NA_BGM_NATURE_BACKGROUND 0x1 // Environmental nature background sounds
|
||||
#define NA_BGM_NATURE_AMBIENCE 0x1 // Environmental nature background sounds
|
||||
#define NA_BGM_FIELD_LOGIC 0x2 // Hyrule Field
|
||||
#define NA_BGM_FIELD_INIT 0x3 // Hyrule Field Initial Segment From Loading Area
|
||||
#define NA_BGM_FIELD_MOVE_1 0x4 // Hyrule Field Moving Segment 1
|
||||
|
|
|
@ -185,10 +185,9 @@ typedef struct {
|
|||
} View; // size = 0x128
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 seqIndex;
|
||||
/* 0x01 */ u8 nightSeqIndex;
|
||||
/* 0x02 */ char unk_02[0x2];
|
||||
} SoundContext; // size = 0x4
|
||||
/* 0x00 */ u8 seqId;
|
||||
/* 0x01 */ u8 natureAmbienceId;
|
||||
} SequenceContext; // size = 0x2
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 enabled;
|
||||
|
@ -1138,7 +1137,7 @@ typedef struct GlobalContext {
|
|||
/* 0x00790 */ Camera* cameraPtrs[NUM_CAMS];
|
||||
/* 0x007A0 */ s16 activeCamera;
|
||||
/* 0x007A2 */ s16 nextCamera;
|
||||
/* 0x007A4 */ SoundContext soundCtx;
|
||||
/* 0x007A4 */ SequenceContext sequenceCtx;
|
||||
/* 0x007A8 */ LightContext lightCtx;
|
||||
/* 0x007B8 */ FrameAdvanceContext frameAdvCtx;
|
||||
/* 0x007C0 */ CollisionContext colCtx;
|
||||
|
|
|
@ -135,8 +135,8 @@ typedef struct {
|
|||
/* 0x13D6 */ s16 timerX[2];
|
||||
/* 0x13DA */ s16 timerY[2];
|
||||
/* 0x13DE */ char unk_13DE[0x0002];
|
||||
/* 0x13E0 */ u8 seqIndex;
|
||||
/* 0x13E1 */ u8 nightSeqIndex;
|
||||
/* 0x13E0 */ u8 seqId;
|
||||
/* 0x13E1 */ u8 natureAmbienceId;
|
||||
/* 0x13E2 */ u8 buttonStatus[5];
|
||||
/* 0x13E7 */ u8 unk_13E7; // alpha related
|
||||
/* 0x13E8 */ u16 unk_13E8; // alpha type?
|
||||
|
@ -157,7 +157,7 @@ typedef struct {
|
|||
/* 0x140A */ u8 audioSetting;
|
||||
/* 0x140B */ char unk_140B[0x0001];
|
||||
/* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold
|
||||
/* 0x140E */ u16 unk_140E; // bgm related
|
||||
/* 0x140E */ u16 forcedSeqId; // immediately start playing the sequence if set
|
||||
/* 0x1410 */ u8 unk_1410; // transition related
|
||||
/* 0x1411 */ char unk_1411[0x0001];
|
||||
/* 0x1412 */ u16 nextCutsceneIndex;
|
||||
|
|
|
@ -157,10 +157,10 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 code;
|
||||
/* 0x01 */ u8 bgmId;
|
||||
/* 0x01 */ u8 specId;
|
||||
/* 0x02 */ char pad[4];
|
||||
/* 0x06 */ u8 nightSeqIndex;
|
||||
/* 0x07 */ u8 seqIndex;
|
||||
/* 0x06 */ u8 natureAmbienceId;
|
||||
/* 0x07 */ u8 seqId;
|
||||
} SCmdSoundSettings;
|
||||
|
||||
typedef struct {
|
||||
|
@ -513,8 +513,8 @@ typedef enum {
|
|||
#define SCENE_CMD_END() \
|
||||
{ SCENE_CMD_ID_END, 0, CMD_W(0) }
|
||||
|
||||
#define SCENE_CMD_SOUND_SETTINGS(audioSessionId, nighttimeSfx, bgmId) \
|
||||
{ SCENE_CMD_ID_SOUND_SETTINGS, audioSessionId, CMD_BBBB(0, 0, nighttimeSfx, bgmId) }
|
||||
#define SCENE_CMD_SOUND_SETTINGS(specId, natureAmbienceId, seqId) \
|
||||
{ SCENE_CMD_ID_SOUND_SETTINGS, specId, CMD_BBBB(0, 0, natureAmbienceId, seqId) }
|
||||
|
||||
#define SCENE_CMD_ECHO_SETTINGS(echo) \
|
||||
{ SCENE_CMD_ID_ECHO_SETTINGS, 0, CMD_BBBB(0, 0, 0, echo) }
|
||||
|
|
|
@ -2809,7 +2809,7 @@ void AudioDebug_ProcessInput(void) {
|
|||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
|
||||
sAudioSndContWork[5] ^= 1;
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, sAudioSndContWork[5]);
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_BACKGROUND) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
|
@ -3840,7 +3840,7 @@ void func_800F5BF0(u8 arg0) {
|
|||
u16 temp_v0;
|
||||
|
||||
temp_v0 = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
if (temp_v0 != NA_BGM_NATURE_BACKGROUND) {
|
||||
if (temp_v0 != NA_BGM_NATURE_AMBIENCE) {
|
||||
D_80130628 = temp_v0;
|
||||
}
|
||||
func_800F6FB4(arg0);
|
||||
|
@ -3934,7 +3934,7 @@ void func_800F5E90(u8 arg0) {
|
|||
}
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, phi_t0);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_SUB, 10, NA_BGM_ENEMY | 0x800);
|
||||
if (phi_t1 != NA_BGM_NATURE_BACKGROUND) {
|
||||
if (phi_t1 != NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, (0x7F - sAudioEnemyVol) & 0xFF, 0xA);
|
||||
func_800F510C(sAudioEnemyVol);
|
||||
}
|
||||
|
@ -3990,11 +3990,11 @@ void func_800F6114(f32 dist) {
|
|||
|
||||
sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f;
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, 0xA);
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_BACKGROUND) {
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, (0x7F - sAudioEnemyVol), 0xA);
|
||||
}
|
||||
}
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_BACKGROUND) {
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) {
|
||||
func_800F510C(sAudioEnemyVol);
|
||||
}
|
||||
}
|
||||
|
@ -4028,7 +4028,7 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
D_8016B9D8++;
|
||||
}
|
||||
}
|
||||
} else if ((temp_a0 == NA_BGM_NATURE_BACKGROUND) && ((arg1 & 0xFF) == NA_BGM_LONLON)) {
|
||||
} else if ((temp_a0 == NA_BGM_NATURE_AMBIENCE) && ((arg1 & 0xFF) == NA_BGM_LONLON)) {
|
||||
temp_a0 = (s8)(func_800FA0B4(SEQ_PLAYER_BGM_SUB) & 0xFF);
|
||||
if ((temp_a0 != (arg1 & 0xFF)) && (D_8016B9D8 < 10)) {
|
||||
func_800F5E18(SEQ_PLAYER_BGM_SUB, NA_BGM_LONLON, 0, 0, 0);
|
||||
|
@ -4151,7 +4151,7 @@ void Audio_SetExtraFilter(u8 filter) {
|
|||
|
||||
sAudioExtraFilter2 = filter;
|
||||
sAudioExtraFilter = filter;
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 == NA_BGM_NATURE_BACKGROUND) {
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 == NA_BGM_NATURE_AMBIENCE) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
t = i;
|
||||
// CHAN_UPD_SCRIPT_IO (seq player 0, all channels, slot 6)
|
||||
|
@ -4275,7 +4275,7 @@ void func_800F6D58(u8 arg0, u8 arg1, u8 arg2) {
|
|||
u8 temp_a0;
|
||||
u8 i;
|
||||
|
||||
if ((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_BACKGROUND) && func_800FA11C(1, 0xF00000FF)) {
|
||||
if ((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) && func_800FA11C(1, 0xF00000FF)) {
|
||||
sAudioNatureFailed = 1;
|
||||
return;
|
||||
}
|
||||
|
@ -4316,7 +4316,7 @@ void func_800F6E7C(u16 arg0, u16 arg1) {
|
|||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_NATURE_BACKGROUND);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_NATURE_AMBIENCE);
|
||||
|
||||
if (i != 0) {
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
|
|
|
@ -8,9 +8,9 @@ void SaveContext_Init(void) {
|
|||
bzero(&gSaveContext, sizeof(gSaveContext));
|
||||
D_8015FA88 = 0;
|
||||
D_8015FA8C = 0;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.unk_140E = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
|
|
|
@ -62,8 +62,8 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
|
||||
gSaveContext.nayrusLoveTimer = 2000;
|
||||
gSaveContext.naviTimer = 0;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[1] = 0;
|
||||
gSaveContext.eventInf[2] = 0;
|
||||
|
|
|
@ -1922,34 +1922,34 @@ void func_800758AC(GlobalContext* globalCtx) {
|
|||
// both lost woods exits on the bridge from kokiri to hyrule field
|
||||
if (((void)0, gSaveContext.entranceIndex) == 0x4DE || ((void)0, gSaveContext.entranceIndex) == 0x5E0) {
|
||||
func_800F6FB4(4);
|
||||
} else if (((void)0, gSaveContext.unk_140E) != NA_BGM_GENERAL_SFX) {
|
||||
if (!func_80077600()) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | (s32)((void)0, gSaveContext.unk_140E));
|
||||
} else if (((void)0, gSaveContext.forcedSeqId) != NA_BGM_GENERAL_SFX) {
|
||||
if (!Environment_IsForcedSequenceDisabled()) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | (s32)((void)0, gSaveContext.forcedSeqId));
|
||||
}
|
||||
gSaveContext.unk_140E = NA_BGM_GENERAL_SFX;
|
||||
} else if (globalCtx->soundCtx.seqIndex == NA_BGM_NO_MUSIC) {
|
||||
if (globalCtx->soundCtx.nightSeqIndex == 0x13) {
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
} else if (globalCtx->sequenceCtx.seqId == NA_BGM_NO_MUSIC) {
|
||||
if (globalCtx->sequenceCtx.natureAmbienceId == 0x13) {
|
||||
return;
|
||||
}
|
||||
if (((void)0, gSaveContext.nightSeqIndex) != globalCtx->soundCtx.nightSeqIndex) {
|
||||
func_800F6FB4(globalCtx->soundCtx.nightSeqIndex);
|
||||
if (((void)0, gSaveContext.natureAmbienceId) != globalCtx->sequenceCtx.natureAmbienceId) {
|
||||
func_800F6FB4(globalCtx->sequenceCtx.natureAmbienceId);
|
||||
}
|
||||
} else if (globalCtx->soundCtx.nightSeqIndex == 0x13) {
|
||||
} else if (globalCtx->sequenceCtx.natureAmbienceId == 0x13) {
|
||||
// "BGM Configuration"
|
||||
osSyncPrintf("\n\n\nBGM設定game_play->sound_info.BGM=[%d] old_bgm=[%d]\n\n", globalCtx->soundCtx.seqIndex,
|
||||
((void)0, gSaveContext.seqIndex));
|
||||
if (((void)0, gSaveContext.seqIndex) != globalCtx->soundCtx.seqIndex) {
|
||||
func_800F5550(globalCtx->soundCtx.seqIndex);
|
||||
osSyncPrintf("\n\n\nBGM設定game_play->sound_info.BGM=[%d] old_bgm=[%d]\n\n", globalCtx->sequenceCtx.seqId,
|
||||
((void)0, gSaveContext.seqId));
|
||||
if (((void)0, gSaveContext.seqId) != globalCtx->sequenceCtx.seqId) {
|
||||
func_800F5550(globalCtx->sequenceCtx.seqId);
|
||||
}
|
||||
} else if (((void)0, gSaveContext.dayTime) > 0x4AAA && ((void)0, gSaveContext.dayTime) < 0xB71D) {
|
||||
if (((void)0, gSaveContext.seqIndex) != globalCtx->soundCtx.seqIndex) {
|
||||
func_800F5550(globalCtx->soundCtx.seqIndex);
|
||||
if (((void)0, gSaveContext.seqId) != globalCtx->sequenceCtx.seqId) {
|
||||
func_800F5550(globalCtx->sequenceCtx.seqId);
|
||||
}
|
||||
|
||||
globalCtx->envCtx.unk_E0 = 1;
|
||||
} else {
|
||||
if (((void)0, gSaveContext.nightSeqIndex) != globalCtx->soundCtx.nightSeqIndex) {
|
||||
func_800F6FB4(globalCtx->soundCtx.nightSeqIndex);
|
||||
if (((void)0, gSaveContext.natureAmbienceId) != globalCtx->sequenceCtx.natureAmbienceId) {
|
||||
func_800F6FB4(globalCtx->sequenceCtx.natureAmbienceId);
|
||||
}
|
||||
|
||||
if (((void)0, gSaveContext.dayTime) > 0xB71C && ((void)0, gSaveContext.dayTime) < 0xCAAC) {
|
||||
|
@ -1961,10 +1961,10 @@ void func_800758AC(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
osSyncPrintf("\n-----------------\n", ((void)0, gSaveContext.unk_140E));
|
||||
osSyncPrintf("\n 強制BGM=[%d]", ((void)0, gSaveContext.unk_140E)); // "Forced BGM"
|
||||
osSyncPrintf("\n BGM=[%d]", globalCtx->soundCtx.seqIndex);
|
||||
osSyncPrintf("\n エンブ=[%d]", globalCtx->soundCtx.nightSeqIndex);
|
||||
osSyncPrintf("\n-----------------\n", ((void)0, gSaveContext.forcedSeqId));
|
||||
osSyncPrintf("\n 強制BGM=[%d]", ((void)0, gSaveContext.forcedSeqId)); // "Forced BGM"
|
||||
osSyncPrintf("\n BGM=[%d]", globalCtx->sequenceCtx.seqId);
|
||||
osSyncPrintf("\n エンブ=[%d]", globalCtx->sequenceCtx.natureAmbienceId);
|
||||
osSyncPrintf("\n status=[%d]", globalCtx->envCtx.unk_E0);
|
||||
|
||||
Audio_SetEnvReverb(globalCtx->roomCtx.curRoom.echo);
|
||||
|
@ -1977,7 +1977,7 @@ void func_80075B44(GlobalContext* globalCtx) {
|
|||
func_800F6D58(86, 1, 0);
|
||||
if (globalCtx->envCtx.unk_EE[0] == 0 && globalCtx->envCtx.unk_F2[0] == 0) {
|
||||
osSyncPrintf("\n\n\nNa_StartMorinigBgm\n\n");
|
||||
func_800F5510(globalCtx->soundCtx.seqIndex);
|
||||
func_800F5510(globalCtx->sequenceCtx.seqId);
|
||||
}
|
||||
globalCtx->envCtx.unk_E0++;
|
||||
break;
|
||||
|
@ -1997,7 +1997,7 @@ void func_80075B44(GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 3:
|
||||
if (globalCtx->envCtx.unk_EE[0] == 0 && globalCtx->envCtx.unk_F2[0] == 0) {
|
||||
func_800F6FB4(globalCtx->soundCtx.nightSeqIndex);
|
||||
func_800F6FB4(globalCtx->sequenceCtx.natureAmbienceId);
|
||||
func_800F6D58(1, 1, 1);
|
||||
}
|
||||
globalCtx->envCtx.unk_E0++;
|
||||
|
@ -2390,25 +2390,25 @@ s32 Environment_GetTotalDays(void) {
|
|||
return gSaveContext.totalDays;
|
||||
}
|
||||
|
||||
void func_800775F0(u16 arg0) {
|
||||
gSaveContext.unk_140E = arg0;
|
||||
void Environment_ForcePlaySequence(u16 seqId) {
|
||||
gSaveContext.forcedSeqId = seqId;
|
||||
}
|
||||
|
||||
s32 func_80077600(void) {
|
||||
s32 ret = false;
|
||||
s32 Environment_IsForcedSequenceDisabled(void) {
|
||||
s32 isDisabled = false;
|
||||
|
||||
if (gSaveContext.unk_140E == NA_BGM_DISABLED) {
|
||||
ret = true;
|
||||
if (gSaveContext.forcedSeqId == NA_BGM_DISABLED) {
|
||||
isDisabled = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return isDisabled;
|
||||
}
|
||||
|
||||
void func_80077624(GlobalContext* globalCtx) {
|
||||
if (globalCtx->soundCtx.nightSeqIndex == 19) {
|
||||
if (globalCtx->sequenceCtx.natureAmbienceId == 19) {
|
||||
func_800F6FB4(5);
|
||||
} else {
|
||||
func_800F6FB4(globalCtx->soundCtx.nightSeqIndex);
|
||||
func_800F6FB4(globalCtx->sequenceCtx.natureAmbienceId);
|
||||
}
|
||||
|
||||
func_800F6D58(14, 1, 1);
|
||||
|
@ -2419,8 +2419,8 @@ void func_80077684(GlobalContext* globalCtx) {
|
|||
func_800F6D58(14, 1, 0);
|
||||
func_800F6D58(15, 1, 0);
|
||||
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_BACKGROUND) {
|
||||
gSaveContext.seqIndex = NA_BGM_NATURE_SFX_RAIN;
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_AMBIENCE) {
|
||||
gSaveContext.seqId = NA_BGM_NATURE_SFX_RAIN;
|
||||
func_800758AC(globalCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4160,8 +4160,8 @@ void Interface_Update(GlobalContext* globalCtx) {
|
|||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
|
||||
func_800F6964(30);
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
} else {
|
||||
gSaveContext.sunsSongState = SUNSSONG_SPECIAL;
|
||||
}
|
||||
|
|
|
@ -393,8 +393,8 @@ void Gameplay_Init(GameState* thisx) {
|
|||
|
||||
Interface_SetSceneRestrictions(globalCtx);
|
||||
func_800758AC(globalCtx);
|
||||
gSaveContext.seqIndex = globalCtx->soundCtx.seqIndex;
|
||||
gSaveContext.nightSeqIndex = globalCtx->soundCtx.nightSeqIndex;
|
||||
gSaveContext.seqId = globalCtx->sequenceCtx.seqId;
|
||||
gSaveContext.natureAmbienceId = globalCtx->sequenceCtx.natureAmbienceId;
|
||||
func_8002DF18(globalCtx, GET_PLAYER(globalCtx));
|
||||
AnimationContext_Update(globalCtx, &globalCtx->animationCtx);
|
||||
gSaveContext.respawnFlag = 0;
|
||||
|
@ -479,12 +479,12 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
if (!(gEntranceTable[globalCtx->nextEntranceIndex + sp6E].field & 0x8000)) { // Continue BGM Off
|
||||
// "Sound initalized. 111"
|
||||
osSyncPrintf("\n\n\nサウンドイニシャル来ました。111");
|
||||
if ((globalCtx->fadeTransition < 56) && (func_80077600() == 0)) {
|
||||
if ((globalCtx->fadeTransition < 56) && !Environment_IsForcedSequenceDisabled()) {
|
||||
// "Sound initalized. 222"
|
||||
osSyncPrintf("\n\n\nサウンドイニシャル来ました。222");
|
||||
func_800F6964(0x14);
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -413,11 +413,11 @@ void func_80099134(GlobalContext* globalCtx, SceneCmd* cmd) {
|
|||
|
||||
// Scene Command 0x15: Sound Settings
|
||||
void func_80099140(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->soundCtx.seqIndex = cmd->soundSettings.seqIndex;
|
||||
globalCtx->soundCtx.nightSeqIndex = cmd->soundSettings.nightSeqIndex;
|
||||
globalCtx->sequenceCtx.seqId = cmd->soundSettings.seqId;
|
||||
globalCtx->sequenceCtx.natureAmbienceId = cmd->soundSettings.natureAmbienceId;
|
||||
|
||||
if (gSaveContext.seqIndex == (u8)NA_BGM_DISABLED) {
|
||||
Audio_QueueSeqCmd(cmd->soundSettings.bgmId | 0xF0000000);
|
||||
if (gSaveContext.seqId == (u8)NA_BGM_DISABLED) {
|
||||
Audio_QueueSeqCmd(cmd->soundSettings.specId | 0xF0000000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,11 +115,11 @@ void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, GlobalConte
|
|||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 6;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
globalCtx->fadeTransition = 3;
|
||||
func_800775F0(NA_BGM_INGO);
|
||||
Environment_ForcePlaySequence(NA_BGM_INGO);
|
||||
} else {
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 4;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
func_800775F0(NA_BGM_INGO);
|
||||
Environment_ForcePlaySequence(NA_BGM_INGO);
|
||||
globalCtx->fadeTransition = 0x2E;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -630,7 +630,7 @@ void func_80A7A4C8(EnIn* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0001;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.infTable[10] &= ~4;
|
||||
func_800775F0(NA_BGM_HORSE);
|
||||
Environment_ForcePlaySequence(NA_BGM_HORSE);
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
|
|
|
@ -94,7 +94,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx
|
|||
globalCtx->envCtx.unk_F2[0] = 0;
|
||||
if (globalCtx->csCtx.state == CS_STATE_IDLE) {
|
||||
func_80077684(globalCtx);
|
||||
} else if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_BACKGROUND) {
|
||||
} else if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_AMBIENCE) {
|
||||
func_800F6D58(0xF, 1, 0);
|
||||
func_800F6D58(0xE, 1, 0);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ const ActorInit En_Syateki_Man_InitVars = {
|
|||
|
||||
static u16 sBgmList[] = {
|
||||
NA_BGM_GENERAL_SFX,
|
||||
NA_BGM_NATURE_BACKGROUND,
|
||||
NA_BGM_NATURE_AMBIENCE,
|
||||
NA_BGM_FIELD_LOGIC,
|
||||
NA_BGM_DUNGEON,
|
||||
NA_BGM_KAKARIKO_ADULT,
|
||||
|
|
|
@ -2824,8 +2824,8 @@ void func_80836448(GlobalContext* globalCtx, Player* this, LinkAnimationHeader*
|
|||
globalCtx->gameOverCtx.state = GAMEOVER_DEATH_START;
|
||||
func_800F6AB0(0);
|
||||
Audio_PlayFanfare(NA_BGM_GAME_OVER);
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
}
|
||||
|
||||
OnePointCutscene_Init(globalCtx, 9806, cond ? 120 : 60, &this->actor, MAIN_CAM);
|
||||
|
@ -3986,8 +3986,8 @@ s32 func_80839034(GlobalContext* globalCtx, Player* this, CollisionPoly* poly, u
|
|||
if (temp == 11) {
|
||||
func_800788CC(NA_SE_OC_SECRET_HOLE_OUT);
|
||||
func_800F6964(5);
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
} else {
|
||||
linearVel = this->linearVelocity;
|
||||
|
||||
|
@ -11923,8 +11923,8 @@ void func_8084E3C4(Player* this, GlobalContext* globalCtx) {
|
|||
Environment_WarpSongLeave(globalCtx);
|
||||
}
|
||||
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12440,8 +12440,8 @@ void func_8084F88C(Player* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
globalCtx->fadeTransition = 2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
}
|
||||
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
|
|
|
@ -1448,8 +1448,8 @@ void FileChoose_LoadGame(GameState* thisx) {
|
|||
|
||||
gSaveContext.respawn[0].entranceIndex = -1;
|
||||
gSaveContext.respawnFlag = 0;
|
||||
gSaveContext.seqIndex = 0xFF;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.showTitleCard = true;
|
||||
gSaveContext.dogParams = 0;
|
||||
gSaveContext.timer1State = 0;
|
||||
|
@ -1463,7 +1463,7 @@ void FileChoose_LoadGame(GameState* thisx) {
|
|||
gSaveContext.healthAccumulator = 0;
|
||||
gSaveContext.unk_13F0 = 0;
|
||||
gSaveContext.unk_13F2 = 0;
|
||||
gSaveContext.unk_140E = 0;
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.nextTransition = 0xFF;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
|
|
|
@ -32,8 +32,8 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
|
|||
gSaveContext.entranceIndex = entranceIndex;
|
||||
gSaveContext.respawnFlag = 0;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = -1;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.showTitleCard = true;
|
||||
gWeatherMode = 0;
|
||||
this->state.running = false;
|
||||
|
|
|
@ -136,8 +136,8 @@ void Title_Main(GameState* thisx) {
|
|||
}
|
||||
|
||||
if (this->exit) {
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.gameMode = 1;
|
||||
this->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&this->state, Opening_Init, OpeningContext);
|
||||
|
|
|
@ -64,8 +64,8 @@ def search_address(target_addr):
|
|||
ram = int(line[16 : 16 + 18], 0)
|
||||
rom = ram - ram_offset
|
||||
sym = line.split()[-1]
|
||||
|
||||
if "0x" in sym:
|
||||
|
||||
if sym.startswith("0x"):
|
||||
ram_offset = None
|
||||
continue
|
||||
if "/" in sym:
|
||||
|
@ -112,7 +112,7 @@ def search_symbol(target_sym):
|
|||
rom = ram - ram_offset
|
||||
sym = line.split()[-1]
|
||||
|
||||
if "0x" in sym:
|
||||
if sym.startswith("0x"):
|
||||
ram_offset = None
|
||||
continue
|
||||
elif "/" in sym:
|
||||
|
|
Loading…
Reference in a new issue