mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 06:54:33 +00:00
Clean Up Sequence Structs in Scene/Save/z64 (#1051)
* Clean up sound scene struct * Follow-up cleaning * cleanup * Document forcedSeqId * Update include/z64save.h Co-authored-by: fig02 <fig02srl@gmail.com> * Update include/z64.h Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
21a92ab95f
commit
5e9d24fca4
20 changed files with 96 additions and 97 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue