mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +00:00
Document code_800F9280.c -> audio_seqcmd.c i.e. (Audio_QueueSeqCmd) (#1234)
* Document SoundSources * PR Suggestions * Duration timers to dec * `PlaySfxByPosAndId` -> `PlaySoundByPosition` * Begin importing docs from MM * Finish cleanup using code from MM * Start documenting commands * First attempt at thorough AudioSeqCmd wrappers * Improve names * Merge branch 'master' into audio_seqCmd fix name to minimize conflicts * Combine macros, implement them through repo * Improve docs * More progress, begin sequence command docs * seqcmd.h * More documentation of seqcmd.h * More docs * cleanup * More cleanup * More docs * VOL_SCALE_INDEX enum * missed enums * More Cleanup * docs * More docs * Add comments about sfxChannelLayout * More cleanup * Even better docs * Add a file description * small touchups * More cleanup of comments * more * More cleanup * More cleanup * Missing space * typos * Audio_SetVolumeScaleNow * More cleanup * Fill in enum * one more cleanup * Capitalize macros * remove AUDIO_ * cleanup * more cleanup * Small Fix * Add a lot of backticks for docs * Restructuring docs * More cleanup * swap channel args, cleanup * Typos * Many suggestions, revert filename * pr suggestions * even more PR * more pr suggestions * pr suggestion
This commit is contained in:
parent
a99d41bf35
commit
062f4d8e15
43 changed files with 1483 additions and 857 deletions
|
@ -1868,7 +1868,7 @@ void Audio_PlaySariaBgm(Vec3f* pos, u16 seqId, u16 distMax);
|
|||
void Audio_ClearSariaBgm2(void);
|
||||
void func_800F5510(u16 seqId);
|
||||
void func_800F5550(u16 seqId);
|
||||
void func_800F574C(f32 arg0, u8 arg2);
|
||||
void func_800F574C(f32 scaleTempoAndFreq, u8 duration);
|
||||
void func_800F5718(void);
|
||||
void func_800F5918(void);
|
||||
void func_800F595C(u16);
|
||||
|
@ -1879,7 +1879,7 @@ void func_800F5B58(void);
|
|||
void func_800F5BF0(u8 natureAmbienceId);
|
||||
void Audio_PlayFanfare(u16);
|
||||
void func_800F5C2C(void);
|
||||
void func_800F5E18(u8 playerIdx, u16 seqId, u8 fadeTimer, s8 arg3, s8 arg4);
|
||||
void func_800F5E18(u8 seqPlayerIndex, u16 seqId, u8 fadeTimer, s8 ioPort, s8 ioData);
|
||||
void Audio_SetSequenceMode(u8 seqMode);
|
||||
void Audio_SetBgmEnemyVolume(f32 dist);
|
||||
void func_800F6268(f32 dist, u16);
|
||||
|
@ -1898,7 +1898,7 @@ void func_800F6AB0(u16);
|
|||
// ? func_800F6BB8(?);
|
||||
void Audio_PreNMI(void);
|
||||
// ? func_800F6C34(?);
|
||||
void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 port, u8 val);
|
||||
void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 ioPort, u8 ioData);
|
||||
void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId);
|
||||
void Audio_Init(void);
|
||||
void Audio_InitSound(void);
|
||||
|
@ -1915,8 +1915,6 @@ void Audio_StopSfxByBank(u8 bankId);
|
|||
void func_800F8884(u8 bankId, Vec3f* pos);
|
||||
void Audio_StopSfxByPosAndBank(u8 bankId, Vec3f* pos);
|
||||
void Audio_StopSfxByPos(Vec3f* pos);
|
||||
void func_800F9280(u8 playerIdx, u8 seqId, u8 arg2, u16 fadeTimer);
|
||||
void Audio_QueueSeqCmd(u32 cmd);
|
||||
void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId);
|
||||
void Audio_StopSfxByTokenAndId(u8 token, u16 sfxId);
|
||||
void Audio_StopSfxById(u32 sfxId);
|
||||
|
@ -1924,19 +1922,17 @@ void Audio_ProcessSfxRequests(void);
|
|||
void func_800F8F88(void);
|
||||
u8 Audio_IsSfxPlaying(u32 sfxId);
|
||||
void Audio_ResetSfx(void);
|
||||
void func_800F9474(u8, u16);
|
||||
void func_800F94FC(u32);
|
||||
void Audio_ProcessSeqCmd(u32);
|
||||
void Audio_StartSequence(u8 seqPlayerIndex, u8 seqId, u8 seqArgs, u16 fadeInDuration);
|
||||
void Audio_StopSequence(u8 seqPlayerIndex, u16 fadeOutDuration);
|
||||
void Audio_QueueSeqCmd(u32 cmd);
|
||||
void Audio_ProcessSeqCmds(void);
|
||||
u16 func_800FA0B4(u8 playerIdx);
|
||||
s32 func_800FA11C(u32 arg0, u32 arg1);
|
||||
void func_800FA174(u8);
|
||||
void func_800FA18C(u8, u8);
|
||||
void Audio_SetVolScale(u8 playerIdx, u8 scaleIdx, u8 targetVol, u8 volFadeTimer);
|
||||
void func_800FA3DC(void);
|
||||
u16 Audio_GetActiveSeqId(u8 seqPlayerIndex);
|
||||
s32 Audio_IsSeqCmdNotQueued(u32 cmdVal, u32 cmdMask);
|
||||
void Audio_SetVolumeScale(u8 seqPlayerIndex, u8 scaleIndex, u8 targetVol, u8 volFadeTimer);
|
||||
void Audio_UpdateActiveSequences(void);
|
||||
u8 func_800FAD34(void);
|
||||
void func_800FADF8(void);
|
||||
void func_800FAEB4(void);
|
||||
void Audio_ResetActiveSequences(void);
|
||||
void Audio_ResetActiveSequencesAndVolume(void);
|
||||
void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
|
||||
void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y);
|
||||
|
|
506
include/seqcmd.h
Normal file
506
include/seqcmd.h
Normal file
|
@ -0,0 +1,506 @@
|
|||
#ifndef SEQCMD_H
|
||||
#define SEQCMD_H
|
||||
|
||||
// ==== Primary commands ====
|
||||
|
||||
#define SEQCMD_OP_MASK 0xF0000000
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ SEQCMD_OP_PLAY_SEQUENCE,
|
||||
/* 0x1 */ SEQCMD_OP_STOP_SEQUENCE,
|
||||
/* 0x2 */ SEQCMD_OP_QUEUE_SEQUENCE,
|
||||
/* 0x3 */ SEQCMD_OP_UNQUEUE_SEQUENCE,
|
||||
/* 0x4 */ SEQCMD_OP_SET_PLAYER_VOLUME,
|
||||
/* 0x5 */ SEQCMD_OP_SET_PLAYER_FREQ,
|
||||
/* 0x6 */ SEQCMD_OP_SET_CHANNEL_VOLUME,
|
||||
/* 0x7 */ SEQCMD_OP_SET_PLAYER_IO,
|
||||
/* 0x8 */ SEQCMD_OP_SET_CHANNEL_IO,
|
||||
/* 0x9 */ SEQCMD_OP_SET_CHANNEL_IO_DISABLE_MASK,
|
||||
/* 0xA */ SEQCMD_OP_SET_CHANNEL_DISABLE_MASK,
|
||||
/* 0xB */ SEQCMD_OP_TEMPO_CMD,
|
||||
/* 0xC */ SEQCMD_OP_SETUP_CMD,
|
||||
/* 0xD */ SEQCMD_OP_SET_CHANNEL_FREQ,
|
||||
/* 0xE */ SEQCMD_OP_GLOBAL_CMD,
|
||||
/* 0xF */ SEQCMD_OP_RESET_AUDIO_HEAP
|
||||
} SeqCmdOp;
|
||||
|
||||
// ==== Secondary commands ====
|
||||
|
||||
// Subset of `SEQCMD_OP_TEMPO_CMD`
|
||||
typedef enum {
|
||||
/* 0x0 */ SEQCMD_SUB_OP_TEMPO_SET,
|
||||
/* 0x1 */ SEQCMD_SUB_OP_TEMPO_SPEED_UP,
|
||||
/* 0x2 */ SEQCMD_SUB_OP_TEMPO_SLOW_DOWN,
|
||||
/* 0x3 */ SEQCMD_SUB_OP_TEMPO_SCALE,
|
||||
/* 0x4 */ SEQCMD_SUB_OP_TEMPO_RESET
|
||||
} SeqCmdTempoCmdOp;
|
||||
|
||||
// Subset of `SEQCMD_OP_SETUP_CMD`
|
||||
typedef enum {
|
||||
/* 0x0 */ SEQCMD_SUB_OP_SETUP_RESTORE_VOLUME,
|
||||
/* 0x1 */ SEQCMD_SUB_OP_SETUP_SEQ_UNQUEUE,
|
||||
/* 0x2 */ SEQCMD_SUB_OP_SETUP_RESTART_SEQ,
|
||||
/* 0x3 */ SEQCMD_SUB_OP_SETUP_TEMPO_SCALE,
|
||||
/* 0x4 */ SEQCMD_SUB_OP_SETUP_TEMPO_RESET,
|
||||
/* 0x5 */ SEQCMD_SUB_OP_SETUP_PLAY_SEQ,
|
||||
/* 0x6 */ SEQCMD_SUB_OP_SETUP_SET_FADE_TIMER,
|
||||
/* 0x7 */ SEQCMD_SUB_OP_SETUP_RESTORE_VOLUME_IF_QUEUED,
|
||||
/* 0x8 */ SEQCMD_SUB_OP_SETUP_RESTORE_VOLUME_WITH_SCALE_INDEX,
|
||||
/* 0x9 */ SEQCMD_SUB_OP_SETUP_SET_CHANNEL_DISABLE_MASK,
|
||||
/* 0xA */ SEQCMD_SUB_OP_SETUP_SET_PLAYER_FREQ,
|
||||
/* 0xE */ SEQCMD_SUB_OP_SETUP_POP_PERSISTENT_CACHE = 0xE,
|
||||
/* 0xF */ SEQCMD_SUB_OP_SETUP_RESET_SETUP_CMDS
|
||||
} SeqCmdSetupCmdOp;
|
||||
|
||||
// Subset of `SEQCMD_OP_GLOBAL_CMD`
|
||||
typedef enum {
|
||||
/* 0x0 */ SEQCMD_SUB_OP_GLOBAL_SET_SOUND_MODE,
|
||||
/* 0x1 */ SEQCMD_SUB_OP_GLOBAL_DISABLE_NEW_SEQUENCES
|
||||
} SeqCmdSubCmdOp;
|
||||
|
||||
// ==== Audio Sequence Primary Commands ====
|
||||
|
||||
/**
|
||||
* Play a sequence on a given seqPlayer
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to play the sequence
|
||||
* @param fadeInDuration duration the sequence will fade in over
|
||||
* @param seqArg no effect: < 0x7F, skip ticks: = 0x7F, will not play: >= 0x80 (see note)
|
||||
* @param seqId the id of the sequence to play, see `SeqId`
|
||||
*
|
||||
* @note seqArg will also be stored in gActiveSeqs.seqId, any check against that seqId must also include seqArg.
|
||||
* seqArg = 0x7F will interpret the duration as the number of ticks to skip.
|
||||
* seqArg >= 0x80 was intented to load a soundFont asynchronously but the code is unfinished (based on MM).
|
||||
*/
|
||||
#define SEQCMD_PLAY_SEQUENCE(seqPlayerIndex, fadeInDuration, seqArg, seqId) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_PLAY_SEQUENCE << 28) | ((u8)(seqPlayerIndex) << 24) | ((u8)(fadeInDuration) << 16) | \
|
||||
((u8)(seqArg) << 8) | (u16)(seqId))
|
||||
|
||||
/**
|
||||
* Stop a sequence on a given seqPlayer
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to play the sequence
|
||||
* @param fadeOutDuration duration the sequence will fade out over
|
||||
*
|
||||
* @note the 0xFF in the command is not read from at all, but is common in all Stop SeqPlayer Commands
|
||||
*/
|
||||
#define SEQCMD_STOP_SEQUENCE(seqPlayerIndex, fadeOutDuration) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_STOP_SEQUENCE << 28) | 0xFF | ((u8)(seqPlayerIndex) << 24) | \
|
||||
((u8)(fadeOutDuration) << 16))
|
||||
|
||||
/**
|
||||
* Add a sequence to a queue of sequences associated with a given seqPlayer.
|
||||
* If the sequence is first in queue, play the sequence
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to queue the sequence
|
||||
* @param fadeInDuration if the sequence is played, duration the sequence will fade in over
|
||||
* @param priority priority in the queue. The highest valued priority will be queued to play first. Also used as `seqArg`.
|
||||
* @param seqId the id of the sequence to play, see `SeqId`
|
||||
*
|
||||
* @note for the next sequence in the queue to play, the current sequence must be unqueued with the unqueue command
|
||||
* @note for a priority >= 0x7F, similar effects happen as `seqArg` in the play sequence command
|
||||
*/
|
||||
#define SEQCMD_QUEUE_SEQUENCE(seqPlayerIndex, fadeInDuration, priority, seqId) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_QUEUE_SEQUENCE << 28) | ((u8)(seqPlayerIndex) << 24) | ((u8)(fadeInDuration) << 16) | \
|
||||
((u8)(priority) << 8) | (u8)(seqId))
|
||||
|
||||
/**
|
||||
* Remove a sequence from a queue of sequences associated with a given seqPlayer.
|
||||
* If the sequence is first in queue, stop the sequence, and play the next one in queue if any
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to queue the sequence
|
||||
* @param fadeInDuration if the sequence is stopped, duration the sequence will fade out over, and duration the next seq will fade in over
|
||||
* @param seqId the id of the sequence to remove, see `SeqId`
|
||||
*
|
||||
* @note for the next sequence in the queue to play, the current sequence must be unqueued with this command
|
||||
*/
|
||||
#define SEQCMD_UNQUEUE_SEQUENCE(seqPlayerIndex, fadeOutInDuration, seqId) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_UNQUEUE_SEQUENCE << 28) | ((u8)(seqPlayerIndex) << 24) | \
|
||||
((u8)(fadeOutInDuration) << 16) | (seqId))
|
||||
|
||||
/**
|
||||
* Set the volume of an entire sequence on a given seqPlayer. Fade to the volume over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the volume
|
||||
* @param volume the target volume for the sequence. Ranged from 0-0xFF, with 0x7F mapping to 1.0f
|
||||
*/
|
||||
#define SEQCMD_SET_PLAYER_VOLUME(seqPlayerIndex, duration, volume) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_PLAYER_VOLUME << 28) | ((u8)(seqPlayerIndex) << 24) | ((duration) << 16) | \
|
||||
(volume))
|
||||
|
||||
/**
|
||||
* Scale the frequency of every channel on a given seqPlayer over a specified duration.
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the frequency
|
||||
* @param freqScale the scaling factor to shift the pitch. Ranged from 0-0xFFFF, with 1000 mapping to 1.0f
|
||||
*
|
||||
* @note 2000 will double the frequency (raise an octave), 500 will halve the frequency (lower an octave).
|
||||
* Cannot be used with `SEQCMD_SET_CHANNEL_FREQ` as they will overwrite one another.
|
||||
*/
|
||||
#define SEQCMD_SET_PLAYER_FREQ(seqPlayerIndex, duration, freqScale) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_PLAYER_FREQ << 28) | ((u8)(seqPlayerIndex) << 24) | ((duration) << 16) | \
|
||||
(freqScale))
|
||||
|
||||
/**
|
||||
* Scale the frequency of a specific channel on a given seqPlayer over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param channelIndex the index of the channel to modify
|
||||
* @param duration duration to transition to the frequency
|
||||
* @param freqScale the scaling factor to shift the pitch. Ranged from 0-0xFFF, with 1000 mapping to 1.0f
|
||||
*
|
||||
* @note a frequency of 2000 will double the frequency (raise an octave), 500 will halve the frequency (lower an octave).
|
||||
* Cannot be used with `SEQCMD_SET_PLAYER_FREQ` as they will overwrite one another.
|
||||
*/
|
||||
#define SEQCMD_SET_CHANNEL_FREQ(seqPlayerIndex, channelIndex, duration, freqScale) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_CHANNEL_FREQ << 28) | ((u8)(seqPlayerIndex) << 24) | ((duration) << 16) | \
|
||||
((channelIndex) << 12) | (freqScale))
|
||||
|
||||
/**
|
||||
* Set the volume of a specific channel on a given seqPlayer. Fade to the volume over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param channelIndex the index of the channel to modify
|
||||
* @param duration duration to transition to the volume
|
||||
* @param volume the target volume for the sequence. Ranged from 0-0xFF, with 0x7F mapping to 1.0f
|
||||
*/
|
||||
#define SEQCMD_SET_CHANNEL_VOLUME(seqPlayerIndex, channelIndex, duration, volume) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_CHANNEL_VOLUME << 28) | ((u8)(seqPlayerIndex) << 24) | ((u8)(duration) << 16) | \
|
||||
((u8)(channelIndex) << 8) | ((u8)volume))
|
||||
|
||||
/**
|
||||
* Write a value that can be read as input directly by the sequence itself. This will be set to the global
|
||||
* ioPort, which can affect the entire sequence.
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to write the input to
|
||||
* @param ioPort the index of the array to store the input-output value,
|
||||
* @param ioData the value s8 that's written to the input-output array
|
||||
*
|
||||
* @note Each seqPlayer has 8 global ioPorts indexed 0-7.
|
||||
* ioPort 0 and 1 are read-only-once, and will reset after being read by the sequence.
|
||||
* ioPort 2-7 can be read multiple times.
|
||||
*/
|
||||
#define SEQCMD_SET_PLAYER_IO(seqPlayerIndex, ioPort, ioData) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_PLAYER_IO << 28) | ((u8)(seqPlayerIndex) << 24) | ((u8)(ioPort) << 16) | \
|
||||
(u8)(ioData))
|
||||
|
||||
/**
|
||||
* Write a value that can be read as input directly by the sequence itself. This will be set to the channel
|
||||
* ioPort, which will only affect a single channel.
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to write the input to
|
||||
* @param channelIndex the index of the channel to write the input to
|
||||
* @param ioPort the index of the array to store the input-output value
|
||||
* @param ioData the value s8 that's written to the input-output array
|
||||
*
|
||||
* @note Each channel has 8 channel ioPorts indexed 0-7.
|
||||
* ioPort 0 and 1 are read-only-once, and will reset after being read by the sequence.
|
||||
* ioPort 2-7 can be read multiple times.
|
||||
*/
|
||||
#define SEQCMD_SET_CHANNEL_IO(seqPlayerIndex, channelIndex, ioPort, ioData) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_CHANNEL_IO << 28) | ((u8)(seqPlayerIndex) << 24) | ((u8)(ioPort) << 16) | \
|
||||
((u8)(channelIndex) << 8) | (u8)(ioData))
|
||||
|
||||
/**
|
||||
* Disable (or reenable) specific channels from receiving input set by `SEQCMD_SET_CHANNEL_IO`
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param channelMask a 16 bit mask where each bit maps to a channel. Bitflag on to disable
|
||||
*
|
||||
* @note using Audio_QueueCmdS8 0x06 will bypass this channelMask
|
||||
*/
|
||||
#define SEQCMD_SET_CHANNEL_IO_DISABLE_MASK(seqPlayerIndex, channelMask) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_CHANNEL_IO_DISABLE_MASK << 28) | ((u8)(seqPlayerIndex) << 24) | (u16)(channelMask))
|
||||
|
||||
/**
|
||||
* Disable (or reenable) specific channels
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param channelMask a 16 bit mask where each bit maps to a channel. Bitflag on to disable
|
||||
*/
|
||||
#define SEQCMD_SET_CHANNEL_DISABLE_MASK(seqPlayerIndex, channelMask) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SET_CHANNEL_DISABLE_MASK << 28) | ((u8)(seqPlayerIndex) << 24) | (u16)(channelMask))
|
||||
|
||||
// ==== Audio Sequence Tempo Commands ====
|
||||
|
||||
/**
|
||||
* Set the absolute tempo of a sequence on a given seqPlayer, fading over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the tempo
|
||||
* @param tempoTarget the target tempo for the sequence
|
||||
*
|
||||
* @note the absolute tempo is constrained to a maximum of 300
|
||||
*/
|
||||
#define SEQCMD_SET_TEMPO(seqPlayerIndex, duration, tempoTarget) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_TEMPO_CMD << 28) | (SEQCMD_SUB_OP_TEMPO_SET << 12) | ((u8)(seqPlayerIndex) << 24) | \
|
||||
((u8)(duration) << 16) | (u16)(tempoTarget))
|
||||
|
||||
/**
|
||||
* Increase the tempo of a sequence by a relative value on a given seqPlayer over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the tempo
|
||||
* @param tempoIncrease the change to add to the current tempo
|
||||
*
|
||||
* @note the absolute tempo is constrained to a maximum of 300
|
||||
*/
|
||||
#define SEQCMD_SPEED_UP_TEMPO(seqPlayerIndex, duration, tempoIncrease) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_TEMPO_CMD << 28) | (SEQCMD_SUB_OP_TEMPO_SPEED_UP << 12) | \
|
||||
((u8)(seqPlayerIndex) << 24) | ((u8)(duration) << 16) | (u16)(tempoIncrease))
|
||||
|
||||
/**
|
||||
* Decrease the tempo of a sequence by a relative value on a given seqPlayer over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the tempo
|
||||
* @param tempoDecrease the change to subtract to the current tempo
|
||||
*
|
||||
* @note the absolute tempo is constrained to a maximum of 300
|
||||
*/
|
||||
#define SEQCMD_SLOW_DOWN_TEMPO(seqPlayerIndex, duration, tempoDecrease) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_TEMPO_CMD << 28) | (SEQCMD_SUB_OP_TEMPO_SLOW_DOWN << 12) | \
|
||||
((u8)(seqPlayerIndex) << 24) | ((u8)(duration) << 16) | (u16)(tempoDecrease))
|
||||
|
||||
/**
|
||||
* Scale the tempo of a sequence by a multiplicative value on a given seqPlayer over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the tempo
|
||||
* @param tempoScale the scaling factor of the tempo, relative to 100
|
||||
*
|
||||
* @note a tempoScale of 200 will go double-time, 50 will go half-time.
|
||||
* the absolute tempo is constrained to a maximum of 300
|
||||
*/
|
||||
#define SEQCMD_SCALE_TEMPO(seqPlayerIndex, duration, tempoScale) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_TEMPO_CMD << 28) | (SEQCMD_SUB_OP_TEMPO_SCALE << 12) | ((u8)(seqPlayerIndex) << 24) | \
|
||||
((u8)(duration) << 16) | (u16)(tempoScale))
|
||||
|
||||
/**
|
||||
* Reset the tempo of a sequence to the original tempo on a given seqPlayer over a specified duration
|
||||
*
|
||||
* @param seqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the tempo
|
||||
*/
|
||||
#define SEQCMD_RESET_TEMPO(seqPlayerIndex, duration) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_TEMPO_CMD << 28) | (SEQCMD_SUB_OP_TEMPO_RESET << 12) | ((u8)(seqPlayerIndex) << 24) | \
|
||||
((u8)(duration) << 16))
|
||||
|
||||
/**
|
||||
* ==== Audio Sequence Setup Commands ====
|
||||
*
|
||||
* The setup commands are designed to wait to be executed.
|
||||
* Up to 8 commands can be queued per `seqPlayerIndex`.
|
||||
* These commands will only execute once that `seqPlayerIndex` is finished playing and is no longer enabled.
|
||||
* They will often target a different player (`targetSeqPlayerIndex`) but not always.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Setup a request to restore a volume on target seqPlayer once a setup seqPlayer is finished playing and disabled
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the volume
|
||||
*/
|
||||
#define SEQCMD_SETUP_RESTORE_PLAYER_VOLUME(setupSeqPlayerIndex, targetSeqPlayerIndex, duration) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_RESTORE_VOLUME << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | (u8)(duration))
|
||||
|
||||
/**
|
||||
* Setup a request to unqueue a seqPlayer once that same setup seqPlayer is finished playing and disabled
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to unqueue once the same seqPlayer is disabled
|
||||
*
|
||||
* @bug this command was misimplemented and fails to unqueue. The command relies on `gActiveSeqs.seqId` for
|
||||
* unqueueing, but seqId is reset before being used to unqueue. A simple fix is to unqueue based on
|
||||
* `gActiveSeqs.prevSeqId` instead.
|
||||
*/
|
||||
#define SEQCMD_SETUP_UNQUEUE_SEQUENCE(setupSeqPlayerIndex) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_SEQ_UNQUEUE << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24))
|
||||
|
||||
/**
|
||||
* Setup a request to restart and play an active sequence currently playing on a target seqPlayer
|
||||
* once a setup seqPlayer is finished playing and disabled
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to restart its active sequence
|
||||
*/
|
||||
#define SEQCMD_SETUP_RESTART_SEQUENCE(setupSeqPlayerIndex, targetSeqPlayerIndex) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_RESTART_SEQ << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16))
|
||||
|
||||
/**
|
||||
* Setup a request to scale the tempo of a sequence by a multiplicative value on a target seqPlayer
|
||||
* once a setup seqPlayer is finished playing and disabled
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the tempo
|
||||
* @param tempoScale the scaling factor of the tempo, relative to 100
|
||||
*
|
||||
* @note a tempoScale of 200 will go double-time, 50 will go half-time.
|
||||
* the absolute tempo is constrained to a maximum of 300
|
||||
*/
|
||||
#define SEQCMD_SETUP_SCALE_TEMPO(setupSeqPlayerIndex, targetSeqPlayerIndex, duration, tempoScale) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_TEMPO_SCALE << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | ((u8)(duration) << 8) | \
|
||||
(u8)(tempoScale))
|
||||
|
||||
/**
|
||||
* Setup a request to reset the tempo of a sequence to the original tempo on a target seqPlayer
|
||||
* once a setup seqPlayer is finished playing and disabled
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the tempo
|
||||
*/
|
||||
#define SEQCMD_SETUP_RESET_TEMPO(setupSeqPlayerIndex, targetSeqPlayerIndex, duration) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_TEMPO_RESET << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | (u8)(duration))
|
||||
|
||||
/**
|
||||
* Setup a request to play a sequence on a target seqPlayer once a setup seqPlayer is finished playing and disabled.
|
||||
* This command is optionally paired with `SEQCMD_SETUP_SET_FADE_IN_TIMER` to set the fade in duration
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to play the sequence
|
||||
* @param seqId the id of the sequence to play, see `SeqId`
|
||||
*/
|
||||
#define SEQCMD_SETUP_PLAY_SEQUENCE(setupSeqPlayerIndex, targetSeqPlayerIndex, seqId) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_PLAY_SEQ << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | (u16)(seqId))
|
||||
|
||||
/**
|
||||
* This command is an optional command before `SEQCMD_SETUP_PLAY_SEQUENCE` to set the fade in duration
|
||||
* (see cmd above)
|
||||
*
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to play the sequence
|
||||
* @param fadeInDuration duration the sequence will fade in over
|
||||
*/
|
||||
#define SEQCMD_SETUP_SET_FADE_IN_TIMER(targetSeqPlayerIndex, fadeInDuration) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_SET_FADE_TIMER << 20) | \
|
||||
((u8)(targetSeqPlayerIndex) << 24) | ((u8)(fadeInDuration) << 8))
|
||||
|
||||
/**
|
||||
* Setup a request to restore a volume on target seqPlayer once a setup seqPlayer is finished playing and disabled.
|
||||
* Specifically, it will only restore volume if the number of queued requests on the setup seqPlayer matches
|
||||
* the number of sequences queued
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the volume
|
||||
* @param numSeqRequests the number of sequence requests queued that must match the actual number of sequence requests
|
||||
*/
|
||||
#define SEQCMD_SETUP_RESTORE_PLAYER_VOLUME_IF_QUEUED(setupSeqPlayerIndex, targetSeqPlayerIndex, duration, \
|
||||
numSeqRequests) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_RESTORE_VOLUME_IF_QUEUED << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | ((u8)(duration) << 8) | \
|
||||
(u8)(numSeqRequests))
|
||||
|
||||
/**
|
||||
* Setup a request to restore a volume on target seqPlayer once a setup seqPlayer is finished playing and disabled.
|
||||
* Allows `scaleIndex` to be specified.
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param scaleIndex the scale index of a seqPlayer
|
||||
* @param duration duration to transition to the volume
|
||||
*/
|
||||
#define SEQCMD_SETUP_RESTORE_PLAYER_VOLUME_WITH_SCALE_INDEX(setupSeqPlayerIndex, targetSeqPlayerIndex, scaleIndex, duration) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_RESTORE_VOLUME_WITH_SCALE_INDEX << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | \
|
||||
((u8)(scaleIndex) << 8) | (u8)(duration))
|
||||
|
||||
/**
|
||||
* Setup a request to disable (or reenable) specific channels on a target seqPlayer
|
||||
* once a setup seqPlayer is finished playing and disabled.
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param channelMask a 16 bit mask where each bit maps to a channel. Bitflag on to disable
|
||||
*/
|
||||
#define SEQCMD_SETUP_SET_CHANNEL_DISABLE_MASK(setupSeqPlayerIndex, targetSeqPlayerIndex, channelMask) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_SET_CHANNEL_DISABLE_MASK << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | (u16)(channelMask))
|
||||
|
||||
/**
|
||||
* Queue a request to scale the frequency of an entire sequence on a target seqPlayer
|
||||
* once a setup seqPlayer is finished playing and disabled.
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param targetSeqPlayerIndex the index of the seqPlayer to modify
|
||||
* @param duration duration to transition to the frequency
|
||||
* @param freqScale the scaling factor to shift the pitch. Ranged from 0-0xFF, with 100 mapping to 1.0f
|
||||
*
|
||||
* @note The base value for frequency, 100, is 10 times smaller than other frequency commands.
|
||||
* 200 will double the frequency (raise an octave), 50 will halve the frequency (lower an octave).
|
||||
*/
|
||||
#define SEQCMD_SETUP_SET_PLAYER_FREQ(setupSeqPlayerIndex, targetSeqPlayerIndex, duration, freqScale) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_SET_PLAYER_FREQ << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)(targetSeqPlayerIndex) << 16) | ((u8)(duration) << 8) | \
|
||||
(u8)(freqScale))
|
||||
|
||||
/**
|
||||
* Queue a request to discard audio data by popping an entry from the persistent caches on the audio heap,
|
||||
* once a setup seqPlayer is finished playing and disabled.
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to wait for to be disabled
|
||||
* @param tableTypeFlag All tables with the flag `(tableTypeFlag & (1 << tableType))` will be discarded. Specifically:
|
||||
* `(tableTypeFlag & 1)` will discard the `SEQUENCE_TABLE`
|
||||
* `(tableTypeFlag & 2)` will discard the `FONT_TABLE`
|
||||
* `(tableTypeFlag & 4)` will discard the `SAMPLE_TABLE`
|
||||
*/
|
||||
#define SEQCMD_SETUP_POP_PERSISTENT_CACHE(setupSeqPlayerIndex, tableTypeFlag) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_POP_PERSISTENT_CACHE << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24) | ((u8)tableTypeFlag))
|
||||
|
||||
/**
|
||||
* Discard all setup command requests on a seqPlayerIndex by resetting the setup command queue
|
||||
*
|
||||
* @param setupSeqPlayerIndex the index of the seqPlayer to disable all setup commands
|
||||
*/
|
||||
#define SEQCMD_RESET_SETUP_CMDS(setupSeqPlayerIndex) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_SETUP_CMD << 28) | (SEQCMD_SUB_OP_SETUP_RESET_SETUP_CMDS << 20) | \
|
||||
((u8)(setupSeqPlayerIndex) << 24))
|
||||
|
||||
/**
|
||||
* ==== Audio Sequence Global Commands ====
|
||||
*
|
||||
* The global commands will apply to the entire audio system and all 4 sequence players
|
||||
*/
|
||||
|
||||
/**
|
||||
* Change the sound mode of audio
|
||||
*
|
||||
* @param soundMode see the `SoundMode` enum
|
||||
*/
|
||||
#define SEQCMD_SET_SOUND_MODE(soundMode) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_GLOBAL_CMD << 28) | (SEQCMD_SUB_OP_GLOBAL_SET_SOUND_MODE << 8) | (u8)(soundMode))
|
||||
|
||||
/**
|
||||
* Disable (or reenable) new sequences from starting
|
||||
*
|
||||
* @param isDisabled true to disable, false to enable
|
||||
*
|
||||
* @note this does not disable the sfx player
|
||||
*/
|
||||
#define SEQCMD_DISABLE_PLAY_SEQUENCES(isDisabled) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_GLOBAL_CMD << 28) | (SEQCMD_SUB_OP_GLOBAL_DISABLE_NEW_SEQUENCES << 8) | \
|
||||
(u16)(isDisabled))
|
||||
|
||||
/**
|
||||
* Restart the audio heap with the specified settings
|
||||
*
|
||||
* @param sfxChannelLayout index for different mappings between the 7 banks and the 16 channels
|
||||
* @param specId index for the audio specifications to set high-level audio parameters
|
||||
*
|
||||
* @note: For sfxChannelLayout, There are 4 possible layouts indexed by 0-3.
|
||||
* However, only index 0 is properly implemented. Other indices lead to bugs and softlocks.
|
||||
*/
|
||||
#define SEQCMD_RESET_AUDIO_HEAP(sfxChannelLayout, specId) \
|
||||
Audio_QueueSeqCmd((SEQCMD_OP_RESET_AUDIO_HEAP << 28) | ((u8)(sfxChannelLayout) << 8) | (u8)(specId))
|
||||
|
||||
#endif
|
|
@ -1,121 +1,121 @@
|
|||
#ifndef SEQUENCE_H
|
||||
#define SEQUENCE_H
|
||||
|
||||
#define NA_BGM_STOP 0x100000FF
|
||||
|
||||
#define NA_BGM_GENERAL_SFX 0x0 // General Sound Effects
|
||||
#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_DEFAULT_1 0x4 // Hyrule Field Moving Segment 1
|
||||
#define NA_BGM_FIELD_DEFAULT_2 0x5 // Hyrule Field Moving Segment 2
|
||||
#define NA_BGM_FIELD_DEFAULT_3 0x6 // Hyrule Field Moving Segment 3
|
||||
#define NA_BGM_FIELD_DEFAULT_4 0x7 // Hyrule Field Moving Segment 4
|
||||
#define NA_BGM_FIELD_DEFAULT_5 0x8 // Hyrule Field Moving Segment 5
|
||||
#define NA_BGM_FIELD_DEFAULT_6 0x9 // Hyrule Field Moving Segment 6
|
||||
#define NA_BGM_FIELD_DEFAULT_7 0x0A // Hyrule Field Moving Segment 7
|
||||
#define NA_BGM_FIELD_DEFAULT_8 0x0B // Hyrule Field Moving Segment 8
|
||||
#define NA_BGM_FIELD_DEFAULT_9 0x0C // Hyrule Field Moving Segment 9
|
||||
#define NA_BGM_FIELD_DEFAULT_A 0x0D // Hyrule Field Moving Segment 10
|
||||
#define NA_BGM_FIELD_DEFAULT_B 0x0E // Hyrule Field Moving Segment 11
|
||||
#define NA_BGM_FIELD_ENEMY_INIT 0x0F // Hyrule Field Enemy Approaches
|
||||
#define NA_BGM_FIELD_ENEMY_1 0x10 // Hyrule Field Enemy Near Segment 1
|
||||
#define NA_BGM_FIELD_ENEMY_2 0x11 // Hyrule Field Enemy Near Segment 2
|
||||
#define NA_BGM_FIELD_ENEMY_3 0x12 // Hyrule Field Enemy Near Segment 3
|
||||
#define NA_BGM_FIELD_ENEMY_4 0x13 // Hyrule Field Enemy Near Segment 4
|
||||
#define NA_BGM_FIELD_STILL_1 0x14 // Hyrule Field Standing Still Segment 1
|
||||
#define NA_BGM_FIELD_STILL_2 0x15 // Hyrule Field Standing Still Segment 2
|
||||
#define NA_BGM_FIELD_STILL_3 0x16 // Hyrule Field Standing Still Segment 3
|
||||
#define NA_BGM_FIELD_STILL_4 0x17 // Hyrule Field Standing Still Segment 4
|
||||
#define NA_BGM_DUNGEON 0x18 // Dodongo's Cavern
|
||||
#define NA_BGM_KAKARIKO_ADULT 0x19 // Kakariko Village (Adult)
|
||||
#define NA_BGM_ENEMY 0x1A // Battle
|
||||
#define NA_BGM_BOSS 0x1B // Boss Battle "NA_BGM_BOSS00"
|
||||
#define NA_BGM_INSIDE_DEKU_TREE 0x1C // Inside the Deku Tree "NA_BGM_FAIRY_DUNGEON"
|
||||
#define NA_BGM_MARKET 0x1D // Market
|
||||
#define NA_BGM_TITLE 0x1E // Title Theme
|
||||
#define NA_BGM_LINK_HOUSE 0x1F // House
|
||||
#define NA_BGM_GAME_OVER 0x20 // Game Over
|
||||
#define NA_BGM_BOSS_CLEAR 0x21 // Boss Clear
|
||||
#define NA_BGM_ITEM_GET 0x22 // Obtain Item
|
||||
#define NA_BGM_OPENING_GANON 0x23 // Enter Ganondorf
|
||||
#define NA_BGM_HEART_GET 0x24 // Obtain Heart Container
|
||||
#define NA_BGM_OCA_LIGHT 0x25 // Prelude of Light
|
||||
#define NA_BGM_JABU_JABU 0x26 // Inside Jabu-Jabu's Belly "NA_BGM_BUYO_DUNGEON"
|
||||
#define NA_BGM_KAKARIKO_KID 0x27 // Kakariko Village (Child)
|
||||
#define NA_BGM_GREAT_FAIRY 0x28 // Great Fairy's Fountain "NA_BGM_GODESS"
|
||||
#define NA_BGM_ZELDA_THEME 0x29 // Zelda's Theme "NA_BGM_HIME"
|
||||
#define NA_BGM_FIRE_TEMPLE 0x2A // Fire Temple "NA_BGM_FIRE_DUNGEON"
|
||||
#define NA_BGM_OPEN_TRE_BOX 0x2B // Open Treasure Chest
|
||||
#define NA_BGM_FOREST_TEMPLE 0x2C // Forest Temple "NA_BGM_FORST_DUNGEON"
|
||||
#define NA_BGM_COURTYARD 0x2D // Hyrule Castle Courtyard "NA_BGM_HIRAL_GARDEN"
|
||||
#define NA_BGM_GANON_TOWER 0x2E // Ganondorf's Theme
|
||||
#define NA_BGM_LONLON 0x2F // Lon Lon Ranch "NA_BGM_RONRON"
|
||||
#define NA_BGM_GORON_CITY 0x30 // Goron City "NA_BGM_GORON"
|
||||
#define NA_BGM_FIELD_MORNING 0x31 // Hyrule Field Morning Theme
|
||||
#define NA_BGM_SPIRITUAL_STONE 0x32 // Spiritual Stone Get "NA_BGM_SPIRIT_STONE"
|
||||
#define NA_BGM_OCA_BOLERO 0x33 // Bolero of Fire "NA_BGM_OCA_FLAME"
|
||||
#define NA_BGM_OCA_MINUET 0x34 // Minuet of Forest "NA_BGM_OCA_WIND"
|
||||
#define NA_BGM_OCA_SERENADE 0x35 // Serenade of Water "NA_BGM_OCA_WATER"
|
||||
#define NA_BGM_OCA_REQUIEM 0x36 // Requiem of Spirit "NA_BGM_OCA_SOUL"
|
||||
#define NA_BGM_OCA_NOCTURNE 0x37 // Nocturne of Shadow "NA_BGM_OCA_DARKNESS"
|
||||
#define NA_BGM_MINI_BOSS 0x38 // Mini-Boss Battle "NA_BGM_MIDDLE_BOSS"
|
||||
#define NA_BGM_SMALL_ITEM_GET 0x39 // Obtain Small Item "NA_BGM_S_ITEM_GET"
|
||||
#define NA_BGM_TEMPLE_OF_TIME 0x3A // Temple of Time "NA_BGM_SHRINE_OF_TIME"
|
||||
#define NA_BGM_EVENT_CLEAR 0x3B // Escape from Lon Lon Ranch
|
||||
#define NA_BGM_KOKIRI 0x3C // Kokiri Forest
|
||||
#define NA_BGM_OCA_FAIRY_GET 0x3D // Obtain Fairy Ocarina "NA_BGM_OCA_YOUSEI"
|
||||
#define NA_BGM_SARIA_THEME 0x3E // Lost Woods "NA_BGM_MAYOIMORI"
|
||||
#define NA_BGM_SPIRIT_TEMPLE 0x3F // Spirit Temple "NA_BGM_SOUL_DUNGEON"
|
||||
#define NA_BGM_HORSE 0x40 // Horse Race
|
||||
#define NA_BGM_HORSE_GOAL 0x41 // Horse Race Goal
|
||||
#define NA_BGM_INGO 0x42 // Ingo's Theme
|
||||
#define NA_BGM_MEDALLION_GET 0x43 // Obtain Medallion "NA_BGM_MEDAL_GET"
|
||||
#define NA_BGM_OCA_SARIA 0x44 // Ocarina Saria's Song
|
||||
#define NA_BGM_OCA_EPONA 0x45 // Ocarina Epona's Song
|
||||
#define NA_BGM_OCA_ZELDA 0x46 // Ocarina Zelda's Lullaby
|
||||
#define NA_BGM_OCA_SUNS 0x47 // Ocarina Sun's Song "NA_BGM_OCA_SUNMOON"
|
||||
#define NA_BGM_OCA_TIME 0x48 // Ocarina Song of Time
|
||||
#define NA_BGM_OCA_STORM 0x49 // Ocarina Song of Storms
|
||||
#define NA_BGM_NAVI_OPENING 0x4A // Fairy Flying "NA_BGM_NAVI"
|
||||
#define NA_BGM_DEKU_TREE_CS 0x4B // Deku Tree "NA_BGM_DEKUNOKI"
|
||||
#define NA_BGM_WINDMILL 0x4C // Windmill Hut "NA_BGM_FUSHA"
|
||||
#define NA_BGM_HYRULE_CS 0x4D // Legend of Hyrule "NA_BGM_HIRAL_DEMO"
|
||||
#define NA_BGM_MINI_GAME 0x4E // Shooting Gallery
|
||||
#define NA_BGM_SHEIK 0x4F // Sheik's Theme "NA_BGM_SEAK"
|
||||
#define NA_BGM_ZORA_DOMAIN 0x50 // Zora's Domain "NA_BGM_ZORA"
|
||||
#define NA_BGM_APPEAR 0x51 // Enter Zelda
|
||||
#define NA_BGM_ADULT_LINK 0x52 // Goodbye to Zelda
|
||||
#define NA_BGM_MASTER_SWORD 0x53 // Master Sword
|
||||
#define NA_BGM_INTRO_GANON 0x54
|
||||
#define NA_BGM_SHOP 0x55 // Shop
|
||||
#define NA_BGM_CHAMBER_OF_SAGES 0x56 // Chamber of the Sages "NA_BGM_KENJA"
|
||||
#define NA_BGM_FILE_SELECT 0x57 // File Select
|
||||
#define NA_BGM_ICE_CAVERN 0x58 // Ice Cavern "NA_BGM_ICE_DUNGEON"
|
||||
#define NA_BGM_DOOR_OF_TIME 0x59 // Open Door of Temple of Time "NA_BGM_GATE_OPEN"
|
||||
#define NA_BGM_OWL 0x5A // Kaepora Gaebora's Theme
|
||||
#define NA_BGM_SHADOW_TEMPLE 0x5B // Shadow Temple "NA_BGM_DARKNESS_DUNGEON"
|
||||
#define NA_BGM_WATER_TEMPLE 0x5C // Water Temple "NA_BGM_AQUA_DUNGEON"
|
||||
#define NA_BGM_BRIDGE_TO_GANONS 0x5D // Ganon's Castle Bridge "NA_BGM_BRIDGE"
|
||||
#define NA_BGM_OCARINA_OF_TIME 0x5E // Ocarina of Time "NA_BGM_SARIA"
|
||||
#define NA_BGM_GERUDO_VALLEY 0x5F // Gerudo Valley "NA_BGM_GERUDO"
|
||||
#define NA_BGM_POTION_SHOP 0x60 // Potion Shop "NA_BGM_DRUGSTORE"
|
||||
#define NA_BGM_KOTAKE_KOUME 0x61 // Kotake & Koume's Theme
|
||||
#define NA_BGM_ESCAPE 0x62 // Escape from Ganon's Castle
|
||||
#define NA_BGM_UNDERGROUND 0x63 // Ganon's Castle Under Ground
|
||||
#define NA_BGM_GANONDORF_BOSS 0x64 // Ganondorf Battle
|
||||
#define NA_BGM_GANON_BOSS 0x65 // Ganon Battle
|
||||
#define NA_BGM_END_DEMO 0x66 // Seal of Six Sages
|
||||
#define NA_BGM_STAFF_1 0x67 // End Credits I
|
||||
#define NA_BGM_STAFF_2 0x68 // End Credits II
|
||||
#define NA_BGM_STAFF_3 0x69 // End Credits III
|
||||
#define NA_BGM_STAFF_4 0x6A // End Credits IV
|
||||
#define NA_BGM_FIRE_BOSS 0x6B // King Dodongo & Volvagia Boss Battle "NA_BGM_BOSS01"
|
||||
#define NA_BGM_TIMED_MINI_GAME 0x6C // Mini-Game
|
||||
#define NA_BGM_CUTSCENE_EFFECTS 0x6D // A small collection of various cutscene sounds
|
||||
#define NA_BGM_NO_MUSIC 0x7F // No bgm music is played
|
||||
#define NA_BGM_NATURE_SFX_RAIN 0x80 // Related to rain
|
||||
#define NA_BGM_DISABLED 0xFFFF
|
||||
typedef enum {
|
||||
/* 0x00 */ NA_BGM_GENERAL_SFX, // General Sound Effects
|
||||
/* 0x01 */ NA_BGM_NATURE_AMBIENCE, // Environmental nature background sounds
|
||||
/* 0x02 */ NA_BGM_FIELD_LOGIC, // Hyrule Field
|
||||
/* 0x03 */ NA_BGM_FIELD_INIT, // Hyrule Field Initial Segment From Loading Area
|
||||
/* 0x04 */ NA_BGM_FIELD_DEFAULT_1, // Hyrule Field Moving Segment 1
|
||||
/* 0x05 */ NA_BGM_FIELD_DEFAULT_2, // Hyrule Field Moving Segment 2
|
||||
/* 0x06 */ NA_BGM_FIELD_DEFAULT_3, // Hyrule Field Moving Segment 3
|
||||
/* 0x07 */ NA_BGM_FIELD_DEFAULT_4, // Hyrule Field Moving Segment 4
|
||||
/* 0x08 */ NA_BGM_FIELD_DEFAULT_5, // Hyrule Field Moving Segment 5
|
||||
/* 0x09 */ NA_BGM_FIELD_DEFAULT_6, // Hyrule Field Moving Segment 6
|
||||
/* 0x0A */ NA_BGM_FIELD_DEFAULT_7, // Hyrule Field Moving Segment 7
|
||||
/* 0x0B */ NA_BGM_FIELD_DEFAULT_8, // Hyrule Field Moving Segment 8
|
||||
/* 0x0C */ NA_BGM_FIELD_DEFAULT_9, // Hyrule Field Moving Segment 9
|
||||
/* 0x0D */ NA_BGM_FIELD_DEFAULT_A, // Hyrule Field Moving Segment 10
|
||||
/* 0x0E */ NA_BGM_FIELD_DEFAULT_B, // Hyrule Field Moving Segment 11
|
||||
/* 0x0F */ NA_BGM_FIELD_ENEMY_INIT, // Hyrule Field Enemy Approaches
|
||||
/* 0x10 */ NA_BGM_FIELD_ENEMY_1, // Hyrule Field Enemy Near Segment 1
|
||||
/* 0x11 */ NA_BGM_FIELD_ENEMY_2, // Hyrule Field Enemy Near Segment 2
|
||||
/* 0x12 */ NA_BGM_FIELD_ENEMY_3, // Hyrule Field Enemy Near Segment 3
|
||||
/* 0x13 */ NA_BGM_FIELD_ENEMY_4, // Hyrule Field Enemy Near Segment 4
|
||||
/* 0x14 */ NA_BGM_FIELD_STILL_1, // Hyrule Field Standing Still Segment 1
|
||||
/* 0x15 */ NA_BGM_FIELD_STILL_2, // Hyrule Field Standing Still Segment 2
|
||||
/* 0x16 */ NA_BGM_FIELD_STILL_3, // Hyrule Field Standing Still Segment 3
|
||||
/* 0x17 */ NA_BGM_FIELD_STILL_4, // Hyrule Field Standing Still Segment 4
|
||||
/* 0x18 */ NA_BGM_DUNGEON, // Dodongo's Cavern
|
||||
/* 0x19 */ NA_BGM_KAKARIKO_ADULT, // Kakariko Village (Adult)
|
||||
/* 0x1A */ NA_BGM_ENEMY, // Battle
|
||||
/* 0x1B */ NA_BGM_BOSS, // Boss Battle "NA_BGM_BOSS00"
|
||||
/* 0x1C */ NA_BGM_INSIDE_DEKU_TREE, // Inside the Deku Tree "NA_BGM_FAIRY_DUNGEON"
|
||||
/* 0x1D */ NA_BGM_MARKET, // Market
|
||||
/* 0x1E */ NA_BGM_TITLE, // Title Theme
|
||||
/* 0x1F */ NA_BGM_LINK_HOUSE, // House
|
||||
/* 0x20 */ NA_BGM_GAME_OVER, // Game Over
|
||||
/* 0x21 */ NA_BGM_BOSS_CLEAR, // Boss Clear
|
||||
/* 0x22 */ NA_BGM_ITEM_GET, // Obtain Item
|
||||
/* 0x23 */ NA_BGM_OPENING_GANON, // Enter Ganondorf
|
||||
/* 0x24 */ NA_BGM_HEART_GET, // Obtain Heart Container
|
||||
/* 0x25 */ NA_BGM_OCA_LIGHT, // Prelude of Light
|
||||
/* 0x26 */ NA_BGM_JABU_JABU, // Inside Jabu-Jabu's Belly "NA_BGM_BUYO_DUNGEON"
|
||||
/* 0x27 */ NA_BGM_KAKARIKO_KID, // Kakariko Village (Child)
|
||||
/* 0x28 */ NA_BGM_GREAT_FAIRY, // Great Fairy's Fountain "NA_BGM_GODESS"
|
||||
/* 0x29 */ NA_BGM_ZELDA_THEME, // Zelda's Theme "NA_BGM_HIME"
|
||||
/* 0x2A */ NA_BGM_FIRE_TEMPLE, // Fire Temple "NA_BGM_FIRE_DUNGEON"
|
||||
/* 0x2B */ NA_BGM_OPEN_TRE_BOX, // Open Treasure Chest
|
||||
/* 0x2C */ NA_BGM_FOREST_TEMPLE, // Forest Temple "NA_BGM_FORST_DUNGEON"
|
||||
/* 0x2D */ NA_BGM_COURTYARD, // Hyrule Castle Courtyard "NA_BGM_HIRAL_GARDEN"
|
||||
/* 0x2E */ NA_BGM_GANON_TOWER, // Ganondorf's Theme
|
||||
/* 0x2F */ NA_BGM_LONLON, // Lon Lon Ranch "NA_BGM_RONRON"
|
||||
/* 0x30 */ NA_BGM_GORON_CITY, // Goron City "NA_BGM_GORON"
|
||||
/* 0x31 */ NA_BGM_FIELD_MORNING, // Hyrule Field Morning Theme
|
||||
/* 0x32 */ NA_BGM_SPIRITUAL_STONE, // Spiritual Stone Get "NA_BGM_SPIRIT_STONE"
|
||||
/* 0x33 */ NA_BGM_OCA_BOLERO, // Bolero of Fire "NA_BGM_OCA_FLAME"
|
||||
/* 0x34 */ NA_BGM_OCA_MINUET, // Minuet of Forest "NA_BGM_OCA_WIND"
|
||||
/* 0x35 */ NA_BGM_OCA_SERENADE, // Serenade of Water "NA_BGM_OCA_WATER"
|
||||
/* 0x36 */ NA_BGM_OCA_REQUIEM, // Requiem of Spirit "NA_BGM_OCA_SOUL"
|
||||
/* 0x37 */ NA_BGM_OCA_NOCTURNE, // Nocturne of Shadow "NA_BGM_OCA_DARKNESS"
|
||||
/* 0x38 */ NA_BGM_MINI_BOSS, // Mini-Boss Battle "NA_BGM_MIDDLE_BOSS"
|
||||
/* 0x39 */ NA_BGM_SMALL_ITEM_GET, // Obtain Small Item "NA_BGM_S_ITEM_GET"
|
||||
/* 0x3A */ NA_BGM_TEMPLE_OF_TIME, // Temple of Time "NA_BGM_SHRINE_OF_TIME"
|
||||
/* 0x3B */ NA_BGM_EVENT_CLEAR, // Escape from Lon Lon Ranch
|
||||
/* 0x3C */ NA_BGM_KOKIRI, // Kokiri Forest
|
||||
/* 0x3D */ NA_BGM_OCA_FAIRY_GET, // Obtain Fairy Ocarina "NA_BGM_OCA_YOUSEI"
|
||||
/* 0x3E */ NA_BGM_SARIA_THEME, // Lost Woods "NA_BGM_MAYOIMORI"
|
||||
/* 0x3F */ NA_BGM_SPIRIT_TEMPLE, // Spirit Temple "NA_BGM_SOUL_DUNGEON"
|
||||
/* 0x40 */ NA_BGM_HORSE, // Horse Race
|
||||
/* 0x41 */ NA_BGM_HORSE_GOAL, // Horse Race Goal
|
||||
/* 0x42 */ NA_BGM_INGO, // Ingo's Theme
|
||||
/* 0x43 */ NA_BGM_MEDALLION_GET, // Obtain Medallion "NA_BGM_MEDAL_GET"
|
||||
/* 0x44 */ NA_BGM_OCA_SARIA, // Ocarina Saria's Song
|
||||
/* 0x45 */ NA_BGM_OCA_EPONA, // Ocarina Epona's Song
|
||||
/* 0x46 */ NA_BGM_OCA_ZELDA, // Ocarina Zelda's Lullaby
|
||||
/* 0x47 */ NA_BGM_OCA_SUNS, // Ocarina Sun's Song "NA_BGM_OCA_SUNMOON"
|
||||
/* 0x48 */ NA_BGM_OCA_TIME, // Ocarina Song of Time
|
||||
/* 0x49 */ NA_BGM_OCA_STORM, // Ocarina Song of Storms
|
||||
/* 0x4A */ NA_BGM_NAVI_OPENING, // Fairy Flying "NA_BGM_NAVI"
|
||||
/* 0x4B */ NA_BGM_DEKU_TREE_CS, // Deku Tree "NA_BGM_DEKUNOKI"
|
||||
/* 0x4C */ NA_BGM_WINDMILL, // Windmill Hut "NA_BGM_FUSHA"
|
||||
/* 0x4D */ NA_BGM_HYRULE_CS, // Legend of Hyrule "NA_BGM_HIRAL_DEMO"
|
||||
/* 0x4E */ NA_BGM_MINI_GAME, // Shooting Gallery
|
||||
/* 0x4F */ NA_BGM_SHEIK, // Sheik's Theme "NA_BGM_SEAK"
|
||||
/* 0x50 */ NA_BGM_ZORA_DOMAIN, // Zora's Domain "NA_BGM_ZORA"
|
||||
/* 0x51 */ NA_BGM_APPEAR, // Enter Zelda
|
||||
/* 0x52 */ NA_BGM_ADULT_LINK, // Goodbye to Zelda
|
||||
/* 0x53 */ NA_BGM_MASTER_SWORD, // Master Sword
|
||||
/* 0x54 */ NA_BGM_INTRO_GANON,
|
||||
/* 0x55 */ NA_BGM_SHOP, // Shop
|
||||
/* 0x56 */ NA_BGM_CHAMBER_OF_SAGES, // Chamber of the Sages "NA_BGM_KENJA"
|
||||
/* 0x57 */ NA_BGM_FILE_SELECT, // File Select
|
||||
/* 0x58 */ NA_BGM_ICE_CAVERN, // Ice Cavern "NA_BGM_ICE_DUNGEON"
|
||||
/* 0x59 */ NA_BGM_DOOR_OF_TIME, // Open Door of Temple of Time "NA_BGM_GATE_OPEN"
|
||||
/* 0x5A */ NA_BGM_OWL, // Kaepora Gaebora's Theme
|
||||
/* 0x5B */ NA_BGM_SHADOW_TEMPLE, // Shadow Temple "NA_BGM_DARKNESS_DUNGEON"
|
||||
/* 0x5C */ NA_BGM_WATER_TEMPLE, // Water Temple "NA_BGM_AQUA_DUNGEON"
|
||||
/* 0x5D */ NA_BGM_BRIDGE_TO_GANONS, // Ganon's Castle Bridge "NA_BGM_BRIDGE"
|
||||
/* 0x5E */ NA_BGM_OCARINA_OF_TIME, // Ocarina of Time "NA_BGM_SARIA"
|
||||
/* 0x5F */ NA_BGM_GERUDO_VALLEY, // Gerudo Valley "NA_BGM_GERUDO"
|
||||
/* 0x60 */ NA_BGM_POTION_SHOP, // Potion Shop "NA_BGM_DRUGSTORE"
|
||||
/* 0x61 */ NA_BGM_KOTAKE_KOUME, // Kotake & Koume's Theme
|
||||
/* 0x62 */ NA_BGM_ESCAPE, // Escape from Ganon's Castle
|
||||
/* 0x63 */ NA_BGM_UNDERGROUND, // Ganon's Castle Under Ground
|
||||
/* 0x64 */ NA_BGM_GANONDORF_BOSS, // Ganondorf Battle
|
||||
/* 0x65 */ NA_BGM_GANON_BOSS, // Ganon Battle
|
||||
/* 0x66 */ NA_BGM_END_DEMO, // Seal of Six Sages
|
||||
/* 0x67 */ NA_BGM_STAFF_1, // End Credits I
|
||||
/* 0x68 */ NA_BGM_STAFF_2, // End Credits II
|
||||
/* 0x69 */ NA_BGM_STAFF_3, // End Credits III
|
||||
/* 0x6A */ NA_BGM_STAFF_4, // End Credits IV
|
||||
/* 0x6B */ NA_BGM_FIRE_BOSS, // King Dodongo & Volvagia Boss Battle "NA_BGM_BOSS01"
|
||||
/* 0x6C */ NA_BGM_TIMED_MINI_GAME, // Mini-Game
|
||||
/* 0x6D */ NA_BGM_CUTSCENE_EFFECTS, // A small collection of various cutscene sounds
|
||||
/* 0x7F */ NA_BGM_NO_MUSIC = 0x7F, // No bgm music is played
|
||||
/* 0x80 */ NA_BGM_NATURE_SFX_RAIN = 0x80, // Related to rain
|
||||
/* 0xFFFF */ NA_BGM_DISABLED = 0xFFFF
|
||||
} SeqId;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SEQ_PLAYER_BGM_MAIN,
|
||||
|
@ -161,6 +161,53 @@ typedef enum {
|
|||
/* 0x7 */ CHANNEL_IO_PORT_7
|
||||
} ChannelIOPort;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ VOL_SCALE_INDEX_BGM_MAIN,
|
||||
/* 1 */ VOL_SCALE_INDEX_FANFARE,
|
||||
/* 2 */ VOL_SCALE_INDEX_SFX,
|
||||
/* 3 */ VOL_SCALE_INDEX_BGM_SUB,
|
||||
/* 4 */ VOL_SCALE_INDEX_MAX
|
||||
} VolumeScaleIndex; // May be worth using SequencePlayerId instead
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 volCur;
|
||||
/* 0x04 */ f32 volTarget;
|
||||
/* 0x08 */ f32 volStep;
|
||||
/* 0x0C */ u16 volTimer;
|
||||
/* 0x10 */ f32 freqScaleCur;
|
||||
/* 0x14 */ f32 freqScaleTarget;
|
||||
/* 0x18 */ f32 freqScaleStep;
|
||||
/* 0x1C */ u16 freqScaleTimer;
|
||||
} ActiveSequenceChannelData; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ f32 volCur;
|
||||
/* 0x004 */ f32 volTarget;
|
||||
/* 0x008 */ f32 volStep;
|
||||
/* 0x00C */ u16 volTimer;
|
||||
/* 0x00E */ u8 volScales[VOL_SCALE_INDEX_MAX];
|
||||
/* 0x012 */ u8 volFadeTimer;
|
||||
/* 0x013 */ u8 fadeVolUpdate;
|
||||
/* 0x014 */ u32 tempoCmd;
|
||||
/* 0x018 */ u16 tempoOriginal; // stores the original tempo before modifying it (to reset back to)
|
||||
/* 0x01C */ f32 tempoCur;
|
||||
/* 0x020 */ f32 tempoTarget;
|
||||
/* 0x024 */ f32 tempoStep;
|
||||
/* 0x028 */ u16 tempoTimer;
|
||||
/* 0x02C */ u32 setupCmd[8]; // a queue of cmds to execute once the player is disabled
|
||||
/* 0x04C */ u8 setupCmdTimer; // only execute setup commands when the timer is at 0.
|
||||
/* 0x04D */ u8 setupCmdNum; // number of setup commands requested once the player is disabled
|
||||
/* 0x04E */ u8 setupFadeTimer;
|
||||
/* 0x050 */ ActiveSequenceChannelData channelData[16];
|
||||
/* 0x250 */ u16 freqScaleChannelFlags;
|
||||
/* 0x252 */ u16 volChannelFlags;
|
||||
/* 0x254 */ u16 seqId; // active seqId currently playing. Resets when sequence stops
|
||||
/* 0x256 */ u16 prevSeqId; // last seqId played on a player. Does not reset when sequence stops
|
||||
/* 0x258 */ u16 channelPortMask;
|
||||
/* 0x25C */ u32 startSeqCmd; // This name comes from MM
|
||||
/* 0x260 */ u8 isWaitingForFonts; // This name comes from MM
|
||||
} ActiveSequence; // size = 0x264
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ NATURE_CHANNEL_STREAM_0,
|
||||
/* 0x1 */ NATURE_CHANNEL_CRITTER_0,
|
||||
|
@ -175,7 +222,7 @@ typedef enum {
|
|||
/* 0xD */ NATURE_CHANNEL_UNK,
|
||||
/* 0xE */ NATURE_CHANNEL_RAIN,
|
||||
/* 0xF */ NATURE_CHANNEL_LIGHTNING
|
||||
} NatureChannelIdx; // playerIdx = 0 (Overlaps with main bgm)
|
||||
} NatureChannelIndex; // seqPlayerIndex = 0 (Overlaps with main bgm)
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ NATURE_ID_GENERAL_NIGHT,
|
||||
|
|
|
@ -150,10 +150,10 @@ extern s8 gSfxDefaultReverb;
|
|||
extern u8 D_801333F0;
|
||||
extern u8 gAudioSfxSwapOff;
|
||||
extern u8 D_801333F8;
|
||||
extern u8 gSeqCmdWrPos;
|
||||
extern u8 gSeqCmdRdPos;
|
||||
extern u8 D_80133408;
|
||||
extern u8 D_8013340C;
|
||||
extern u8 gSeqCmdWritePos;
|
||||
extern u8 gSeqCmdReadPos;
|
||||
extern u8 gStartSeqDisabled;
|
||||
extern u8 gAudioDebugPrintSeqCmd;
|
||||
extern u8 gSoundModeList[];
|
||||
extern u8 gAudioSpecId;
|
||||
extern u8 D_80133418;
|
||||
|
@ -217,7 +217,7 @@ extern u8 gSfxBankMuted[];
|
|||
extern u16 gAudioSfxSwapSource[10];
|
||||
extern u16 gAudioSfxSwapTarget[10];
|
||||
extern u8 gAudioSfxSwapMode[10];
|
||||
extern unk_D_8016E750 D_8016E750[4];
|
||||
extern ActiveSequence gActiveSeqs[4];
|
||||
extern AudioContext gAudioContext;
|
||||
extern void(*D_801755D0)(void);
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "z64transition.h"
|
||||
#include "z64interface.h"
|
||||
#include "alignment.h"
|
||||
#include "seqcmd.h"
|
||||
#include "sequence.h"
|
||||
#include "sfx.h"
|
||||
#include "color.h"
|
||||
|
|
|
@ -975,43 +975,4 @@ typedef struct {
|
|||
/* 0x08 */ u32 permanentPoolSize;
|
||||
} AudioHeapInitSizes; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 unk_00;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ u16 unk_0C;
|
||||
/* 0x10 */ f32 unk_10;
|
||||
/* 0x14 */ f32 unk_14;
|
||||
/* 0x18 */ f32 unk_18;
|
||||
/* 0x1C */ u16 unk_1C;
|
||||
} unk_50_s; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ f32 volCur;
|
||||
/* 0x004 */ f32 volTarget;
|
||||
/* 0x008 */ f32 unk_08;
|
||||
/* 0x00C */ u16 unk_0C;
|
||||
/* 0x00E */ u8 volScales[0x4];
|
||||
/* 0x012 */ u8 volFadeTimer;
|
||||
/* 0x013 */ u8 fadeVolUpdate;
|
||||
/* 0x014 */ u32 unk_14;
|
||||
/* 0x018 */ u16 unk_18;
|
||||
/* 0x01C */ f32 unk_1C;
|
||||
/* 0x020 */ f32 unk_20;
|
||||
/* 0x024 */ f32 unk_24;
|
||||
/* 0x028 */ u16 unk_28;
|
||||
/* 0x02C */ u32 unk_2C[8];
|
||||
/* 0x04C */ u8 unk_4C;
|
||||
/* 0x04D */ u8 unk_4D;
|
||||
/* 0x04E */ u8 unk_4E;
|
||||
/* 0x050 */ unk_50_s unk_50[0x10];
|
||||
/* 0x250 */ u16 unk_250;
|
||||
/* 0x252 */ u16 unk_252;
|
||||
/* 0x254 */ u16 unk_254;
|
||||
/* 0x256 */ u16 unk_256;
|
||||
/* 0x258 */ u16 unk_258;
|
||||
/* 0x25C */ u32 unk_25C;
|
||||
/* 0x260 */ u8 unk_260;
|
||||
} unk_D_8016E750; // size = 0x264
|
||||
|
||||
#endif
|
||||
|
|
|
@ -52,10 +52,10 @@ u8 D_801333F8 = 0;
|
|||
|
||||
s32 D_801333FC = 0; // unused
|
||||
|
||||
u8 gSeqCmdWrPos = 0;
|
||||
u8 gSeqCmdRdPos = 0;
|
||||
u8 D_80133408 = 0;
|
||||
u8 D_8013340C = 1;
|
||||
u8 gSeqCmdWritePos = 0;
|
||||
u8 gSeqCmdReadPos = 0;
|
||||
u8 gStartSeqDisabled = false;
|
||||
u8 gAudioDebugPrintSeqCmd = true;
|
||||
|
||||
u8 gSoundModeList[] = {
|
||||
SOUNDMODE_STEREO,
|
||||
|
|
|
@ -1,27 +1,7 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
// TODO: can these macros be shared between files? code_800F9280 seems to use
|
||||
// versions without any casts...
|
||||
#define Audio_DisableSeq(playerIdx, fadeOut) Audio_QueueCmdS32(0x83000000 | ((u8)playerIdx << 16), fadeOut)
|
||||
#define Audio_StartSeq(playerIdx, fadeTimer, seqId) \
|
||||
Audio_QueueSeqCmd(0x00000000 | ((u8)playerIdx << 24) | ((u8)(fadeTimer) << 0x10) | (u16)seqId)
|
||||
#define Audio_SeqCmd7(playerIdx, a, b) \
|
||||
Audio_QueueSeqCmd(0x70000000 | ((u8)playerIdx << 0x18) | ((u8)a << 0x10) | (u8)(b))
|
||||
#define Audio_SeqCmdC(playerIdx, a, b, c) \
|
||||
Audio_QueueSeqCmd(0xC0000000 | ((u8)playerIdx << 24) | ((u8)a << 16) | ((u8)b << 8) | ((u8)(c)))
|
||||
#define Audio_SeqCmdA(playerIdx, a) Audio_QueueSeqCmd(0xA0000000 | ((u8)playerIdx << 24) | ((u16)(a)))
|
||||
#define Audio_SeqCmd1(playerIdx, a) Audio_QueueSeqCmd(0x100000FF | ((u8)playerIdx << 24) | ((u8)(a) << 16))
|
||||
#define Audio_SeqCmdB(playerIdx, a, b, c) \
|
||||
Audio_QueueSeqCmd(0xB0000000 | ((u8)playerIdx << 24) | ((u8)a << 16) | ((u8)b << 8) | ((u8)c))
|
||||
#define Audio_SeqCmdB40(playerIdx, a, b) Audio_QueueSeqCmd(0xB0004000 | ((u8)playerIdx << 24) | ((u8)a << 16) | ((u8)b))
|
||||
#define Audio_SeqCmd6(playerIdx, a, b, c) \
|
||||
Audio_QueueSeqCmd(0x60000000 | ((u8)playerIdx << 24) | ((u8)(a) << 16) | ((u8)b << 8) | ((u8)c))
|
||||
#define Audio_SeqCmdE0(playerIdx, a) Audio_QueueSeqCmd(0xE0000000 | ((u8)playerIdx << 24) | ((u8)a))
|
||||
#define Audio_SeqCmdE01(playerIdx, a) Audio_QueueSeqCmd(0xE0000100 | ((u8)playerIdx << 24) | ((u16)a))
|
||||
#define Audio_SeqCmd8(playerIdx, a, b, c) \
|
||||
Audio_QueueSeqCmd(0x80000000 | ((u8)playerIdx << 24) | ((u8)a << 16) | ((u8)b << 8) | ((u8)c))
|
||||
#define Audio_SeqCmdF(playerIdx, a) Audio_QueueSeqCmd(0xF0000000 | ((u8)playerIdx << 24) | ((u8)a))
|
||||
#define Audio_DisableSeq(seqPlayerIndex, fadeOut) Audio_QueueCmdS32(0x83000000 | ((u8)seqPlayerIndex << 16), fadeOut)
|
||||
|
||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
||||
|
||||
|
@ -1768,7 +1748,7 @@ void AudioOcarina_SetInstrument(u8 ocarinaInstrumentId) {
|
|||
return;
|
||||
}
|
||||
|
||||
Audio_SeqCmd8(SEQ_PLAYER_SFX, 1, SFX_CHANNEL_OCARINA, ocarinaInstrumentId);
|
||||
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 1, ocarinaInstrumentId);
|
||||
sOcarinaInstrumentId = ocarinaInstrumentId;
|
||||
if (ocarinaInstrumentId == OCARINA_INSTRUMENT_OFF) {
|
||||
sOcarinaInputButtonCur = 0;
|
||||
|
@ -3158,7 +3138,7 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
|||
switch (sAudioSndContSel) {
|
||||
case 0:
|
||||
case 1:
|
||||
Audio_StartSeq(sAudioSndContSel, 0, sAudioSndContWork[sAudioSndContSel]);
|
||||
SEQCMD_PLAY_SEQUENCE(sAudioSndContSel, 0, 0, sAudioSndContWork[sAudioSndContSel]);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
|
@ -3170,10 +3150,10 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
|||
func_800F6700(sAudioSndContWork[sAudioSndContSel]);
|
||||
break;
|
||||
case 5:
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, sAudioSndContWork[sAudioSndContSel]);
|
||||
SEQCMD_DISABLE_PLAY_SEQUENCES(sAudioSndContWork[sAudioSndContSel]);
|
||||
break;
|
||||
case 6:
|
||||
Audio_SeqCmdF(SEQ_PLAYER_BGM_MAIN, sAudioSndContWork[sAudioSndContSel]);
|
||||
SEQCMD_RESET_AUDIO_HEAP(0, sAudioSndContWork[sAudioSndContSel]);
|
||||
sAudioSubTrackInfoSpec = sAudioSndContWork[6];
|
||||
if (sAudioSubTrackInfoPlayerSel > gAudioSpecs[sAudioSubTrackInfoSpec].numSequencePlayers - 1) {
|
||||
sAudioSubTrackInfoPlayerSel = gAudioSpecs[sAudioSubTrackInfoSpec].numSequencePlayers - 1;
|
||||
|
@ -3195,10 +3175,10 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
|||
switch (sAudioSndContSel) {
|
||||
case 0:
|
||||
case 1:
|
||||
Audio_SeqCmd1(sAudioSndContSel, 0);
|
||||
SEQCMD_STOP_SEQUENCE(sAudioSndContSel, 0);
|
||||
break;
|
||||
case 7:
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
|
@ -3488,11 +3468,11 @@ void AudioDebug_ProcessInput_BlkChgBgm(void) {
|
|||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
|
||||
Audio_QueueCmdS8(MK_CMD(0x46, SEQ_PLAYER_BGM_MAIN, 0x00, 0x00), sAudioBlkChgBgmWork[1]);
|
||||
Audio_QueueSeqCmd(sAudioBlkChgBgmWork[0] | 0x10000);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1, 0, sAudioBlkChgBgmWork[0]);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3644,12 +3624,12 @@ void AudioDebug_ProcessInput(void) {
|
|||
case PAGE_NON:
|
||||
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_AMBIENCE) {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
SEQCMD_DISABLE_PLAY_SEQUENCES(sAudioSndContWork[5]);
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_AMBIENCE) {
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_SUB, 0);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
|
||||
|
@ -3691,7 +3671,7 @@ void AudioDebug_ProcessInput(void) {
|
|||
break;
|
||||
}
|
||||
|
||||
D_8013340C = sAudioScrPrtWork[10];
|
||||
gAudioDebugPrintSeqCmd = sAudioScrPrtWork[10];
|
||||
}
|
||||
|
||||
void Audio_UpdateRiverSoundVolumes(void);
|
||||
|
@ -3716,7 +3696,7 @@ void func_800F3054(void) {
|
|||
Audio_ProcessSfxRequests();
|
||||
Audio_ProcessSeqCmds();
|
||||
func_800F8F88();
|
||||
func_800FA3DC();
|
||||
Audio_UpdateActiveSequences();
|
||||
AudioDebug_SetInput();
|
||||
AudioDebug_ProcessInput();
|
||||
Audio_ScheduleProcessCmds();
|
||||
|
@ -4094,8 +4074,8 @@ void Audio_ResetSfxChannelState(void) {
|
|||
|
||||
void Audio_PlayCutsceneEffectsSequence(u8 csEffectType) {
|
||||
if (gSfxBankMuted[0] != 1) {
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_SUB, 0, NA_BGM_CUTSCENE_EFFECTS);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_SUB, 0, 0, csEffectType);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 0, 0, NA_BGM_CUTSCENE_EFFECTS);
|
||||
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_SUB, 0, 0, csEffectType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4263,17 +4243,17 @@ void Audio_StepFreqLerp(FreqLerp* lerp) {
|
|||
}
|
||||
|
||||
void func_800F47BC(void) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0, 10);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0, 10);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_FANFARE, 0, 10);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_FANFARE, 0, 10);
|
||||
}
|
||||
|
||||
void func_800F47FC(void) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0x7F, 3);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0x7F, 3);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_FANFARE, 0x7F, 3);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_FANFARE, 0x7F, 3);
|
||||
}
|
||||
|
||||
void func_800F483C(u8 targetVol, u8 volFadeTimer) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, targetVol, volFadeTimer);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_MAIN, targetVol, volFadeTimer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4315,7 +4295,7 @@ s32 Audio_SetGanonsTowerBgmVolume(u8 targetVol) {
|
|||
|
||||
if (sGanonsTowerVol != targetVol) {
|
||||
// Sets the volume
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, targetVol, 2);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_MAIN, targetVol, 2);
|
||||
|
||||
// Sets the filter cutoff of the form (lowPassFilterCutoff << 4) | (highPassFilter & 0xF). highPassFilter is
|
||||
// always set to 0
|
||||
|
@ -4327,7 +4307,7 @@ s32 Audio_SetGanonsTowerBgmVolume(u8 targetVol) {
|
|||
lowPassFilterCutoff = (((targetVol - 0x40) >> 2) + 1) << 4;
|
||||
}
|
||||
// Set lowPassFilterCutoff to io port 4 from channel 15
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, 4, 15, lowPassFilterCutoff);
|
||||
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, 15, 4, lowPassFilterCutoff);
|
||||
|
||||
// Sets the reverb
|
||||
for (channelIdx = 0; channelIdx < 16; channelIdx++) {
|
||||
|
@ -4369,14 +4349,14 @@ void Audio_UpdateRiverSoundVolumes(void) {
|
|||
if (sRiverSoundMainBgmLower == true) {
|
||||
if (sRiverSoundMainBgmCurrentVol != sRiverSoundMainBgmVol) {
|
||||
// lowers the volume for 1 frame
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, sRiverSoundMainBgmVol, 0xA);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_MAIN, sRiverSoundMainBgmVol, 10);
|
||||
sRiverSoundMainBgmCurrentVol = sRiverSoundMainBgmVol;
|
||||
sRiverSoundMainBgmRestore = true;
|
||||
}
|
||||
sRiverSoundMainBgmLower = false;
|
||||
} else if (sRiverSoundMainBgmRestore == true && D_80130608 == 0) {
|
||||
// restores the volume every frame
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, 0x7F, 0xA);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_MAIN, 0x7F, 10);
|
||||
sRiverSoundMainBgmCurrentVol = 0x7F;
|
||||
sRiverSoundMainBgmRestore = false;
|
||||
}
|
||||
|
@ -4464,7 +4444,7 @@ void func_800F4E30(Vec3f* pos, f32 arg1) {
|
|||
|
||||
for (i = 0; i < 0x10; i++) {
|
||||
if (i != 9) {
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 2, i, (127.0f * phi_f22));
|
||||
SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_BGM_MAIN, i, 2, (127.0f * phi_f22));
|
||||
Audio_QueueCmdS8(0x3 << 24 | SEQ_PLAYER_BGM_MAIN << 16 | ((u8)((u32)i) << 8), phi_s4);
|
||||
}
|
||||
}
|
||||
|
@ -4494,8 +4474,8 @@ void Audio_SplitBgmChannels(s8 volSplit) {
|
|||
u8 channelIdx;
|
||||
u8 i;
|
||||
|
||||
if ((func_800FA0B4(SEQ_PLAYER_FANFARE) == NA_BGM_DISABLED) &&
|
||||
(func_800FA0B4(SEQ_PLAYER_BGM_SUB) != NA_BGM_LONLON)) {
|
||||
if ((Audio_GetActiveSeqId(SEQ_PLAYER_FANFARE) == NA_BGM_DISABLED) &&
|
||||
(Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) != NA_BGM_LONLON)) {
|
||||
for (i = 0; i < ARRAY_COUNT(bgmPlayers); i++) {
|
||||
if (i == 0) {
|
||||
// Main Bgm SeqPlayer
|
||||
|
@ -4523,7 +4503,7 @@ void Audio_SplitBgmChannels(s8 volSplit) {
|
|||
}
|
||||
}
|
||||
|
||||
Audio_SeqCmdA(bgmPlayers[i], channelBits);
|
||||
SEQCMD_SET_CHANNEL_DISABLE_MASK(bgmPlayers[i], channelBits);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4570,8 +4550,8 @@ void Audio_PlaySariaBgm(Vec3f* pos, u16 seqId, u16 distMax) {
|
|||
Audio_SplitBgmChannels(vol);
|
||||
}
|
||||
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, vol, 0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, 0x7F - vol, 0);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_BGM_SUB, vol, 0);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB, 0x7F - vol, 0);
|
||||
}
|
||||
|
||||
void Audio_ClearSariaBgm2(void) {
|
||||
|
@ -4587,9 +4567,9 @@ void func_800F5550(u16 seqId) {
|
|||
u8 sp27 = 0;
|
||||
u16 nv;
|
||||
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_WINDMILL) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_SUB) == NA_BGM_LONLON) {
|
||||
func_800F9474(SEQ_PLAYER_BGM_SUB, 0);
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_WINDMILL) {
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_LONLON) {
|
||||
Audio_StopSequence(SEQ_PLAYER_BGM_SUB, 0);
|
||||
Audio_QueueCmdS32(0xF8000000, 0);
|
||||
}
|
||||
|
||||
|
@ -4617,7 +4597,7 @@ void func_800F56A8(void) {
|
|||
u16 temp_v0;
|
||||
u8 bvar;
|
||||
|
||||
temp_v0 = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
temp_v0 = Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN);
|
||||
bvar = temp_v0 & 0xFF;
|
||||
if ((temp_v0 != NA_BGM_DISABLED) && (sSeqFlags[bvar] & SEQ_FLAG_4)) {
|
||||
if (D_8013062C != 0xC0) {
|
||||
|
@ -4629,23 +4609,25 @@ void func_800F56A8(void) {
|
|||
}
|
||||
|
||||
void func_800F5718(void) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_WINDMILL) {
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_WINDMILL);
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_WINDMILL) {
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_WINDMILL);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F574C(f32 arg0, u8 arg2) {
|
||||
if (arg0 == 1.0f) {
|
||||
Audio_SeqCmdB40(SEQ_PLAYER_BGM_MAIN, arg2, 0);
|
||||
void func_800F574C(f32 scaleTempoAndFreq, u8 duration) {
|
||||
if (scaleTempoAndFreq == 1.0f) {
|
||||
SEQCMD_RESET_TEMPO(SEQ_PLAYER_BGM_MAIN, duration);
|
||||
} else {
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x30, arg2, arg0 * 100.0f);
|
||||
SEQCMD_SETUP_SCALE_TEMPO(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM_MAIN, duration, scaleTempoAndFreq * 100.0f);
|
||||
}
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0xA0, arg2, arg0 * 100.0f);
|
||||
|
||||
SEQCMD_SETUP_SET_PLAYER_FREQ(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM_MAIN, duration, scaleTempoAndFreq * 100.0f);
|
||||
}
|
||||
|
||||
void func_800F5918(void) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_TIMED_MINI_GAME && func_800FA11C(0, 0xF0000000)) {
|
||||
Audio_SeqCmdB(SEQ_PLAYER_BGM_MAIN, 5, 0, 0xD2);
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_TIMED_MINI_GAME &&
|
||||
Audio_IsSeqCmdNotQueued(SEQCMD_OP_PLAY_SEQUENCE << 28, SEQCMD_OP_MASK)) {
|
||||
SEQCMD_SET_TEMPO(SEQ_PLAYER_BGM_MAIN, 5, 210);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4655,11 +4637,11 @@ void func_800F595C(u16 arg0) {
|
|||
if (sSeqFlags[arg0b] & SEQ_FLAG_FANFARE) {
|
||||
Audio_PlayFanfare(arg0);
|
||||
} else if (sSeqFlags[arg0b] & SEQ_FLAG_FANFARE_GANON) {
|
||||
Audio_StartSeq(SEQ_PLAYER_FANFARE, 0, arg0);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, arg0);
|
||||
|
||||
} else {
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, arg0, 0, 7, -1);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4667,11 +4649,11 @@ void func_800F59E8(u16 arg0) {
|
|||
u8 arg0b = arg0 & 0xFF;
|
||||
|
||||
if (sSeqFlags[arg0b] & SEQ_FLAG_FANFARE) {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
} else if (sSeqFlags[arg0b] & SEQ_FLAG_FANFARE_GANON) {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
} else {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4684,7 +4666,7 @@ s32 func_800F5A58(u8 arg0) {
|
|||
phi_a1 = 1;
|
||||
}
|
||||
|
||||
if (arg0 == (u8)func_800FA0B4(phi_a1)) {
|
||||
if (arg0 == (u8)Audio_GetActiveSeqId(phi_a1)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -4696,7 +4678,7 @@ s32 func_800F5A58(u8 arg0) {
|
|||
* Designed for the mini-boss sequence, but also used by mini-game 2 sequence
|
||||
*/
|
||||
void func_800F5ACC(u16 seqId) {
|
||||
u16 curSeqId = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
u16 curSeqId = Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN);
|
||||
|
||||
if ((curSeqId & 0xFF) != NA_BGM_GANON_TOWER && (curSeqId & 0xFF) != NA_BGM_ESCAPE && curSeqId != seqId) {
|
||||
Audio_SetSequenceMode(SEQ_MODE_IGNORE);
|
||||
|
@ -4706,7 +4688,7 @@ void func_800F5ACC(u16 seqId) {
|
|||
osSyncPrintf("Middle Boss BGM Start not stack \n");
|
||||
}
|
||||
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, seqId);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, seqId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4714,12 +4696,12 @@ void func_800F5ACC(u16 seqId) {
|
|||
* Restores the previous sequence to the main bgm player before func_800F5ACC was called
|
||||
*/
|
||||
void func_800F5B58(void) {
|
||||
if ((func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) && (sPrevMainBgmSeqId != NA_BGM_DISABLED) &&
|
||||
(sSeqFlags[func_800FA0B4(SEQ_PLAYER_BGM_MAIN) & 0xFF] & SEQ_FLAG_RESTORE)) {
|
||||
if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) && (sPrevMainBgmSeqId != NA_BGM_DISABLED) &&
|
||||
(sSeqFlags[Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) & 0xFF] & SEQ_FLAG_RESTORE)) {
|
||||
if (sPrevMainBgmSeqId == NA_BGM_DISABLED) {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
} else {
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, sPrevMainBgmSeqId);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, sPrevMainBgmSeqId);
|
||||
}
|
||||
|
||||
sPrevMainBgmSeqId = NA_BGM_DISABLED;
|
||||
|
@ -4730,7 +4712,7 @@ void func_800F5B58(void) {
|
|||
* Plays the nature ambience sequence on the main bgm player, but stores the previous sequence to return to later
|
||||
*/
|
||||
void func_800F5BF0(u8 natureAmbienceId) {
|
||||
u16 curSeqId = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
u16 curSeqId = Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN);
|
||||
|
||||
if (curSeqId != NA_BGM_NATURE_AMBIENCE) {
|
||||
sPrevMainBgmSeqId = curSeqId;
|
||||
|
@ -4744,7 +4726,7 @@ void func_800F5BF0(u8 natureAmbienceId) {
|
|||
*/
|
||||
void func_800F5C2C(void) {
|
||||
if (sPrevMainBgmSeqId != NA_BGM_DISABLED) {
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, sPrevMainBgmSeqId);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, sPrevMainBgmSeqId);
|
||||
}
|
||||
sPrevMainBgmSeqId = NA_BGM_DISABLED;
|
||||
}
|
||||
|
@ -4755,53 +4737,58 @@ void Audio_PlayFanfare(u16 seqId) {
|
|||
u8* sp1C;
|
||||
u8* sp18;
|
||||
|
||||
sp26 = func_800FA0B4(SEQ_PLAYER_FANFARE);
|
||||
sp26 = Audio_GetActiveSeqId(SEQ_PLAYER_FANFARE);
|
||||
sp1C = func_800E5E84(sp26 & 0xFF, &sp20);
|
||||
sp18 = func_800E5E84(seqId & 0xFF, &sp20);
|
||||
if ((sp26 == NA_BGM_DISABLED) || (*sp1C == *sp18)) {
|
||||
D_8016B9F4 = 1;
|
||||
} else {
|
||||
D_8016B9F4 = 5;
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
}
|
||||
D_8016B9F6 = seqId;
|
||||
}
|
||||
|
||||
void func_800F5CF8(void) {
|
||||
u16 sp26;
|
||||
u16 pad;
|
||||
u16 sp22;
|
||||
u16 seqIdFanfare;
|
||||
u16 seqIdBgmMain;
|
||||
u16 seqIdBgmSub;
|
||||
|
||||
if (D_8016B9F4 != 0) {
|
||||
D_8016B9F4--;
|
||||
if (D_8016B9F4 == 0) {
|
||||
Audio_QueueCmdS32(0xE3000000, SEQUENCE_TABLE);
|
||||
Audio_QueueCmdS32(0xE3000000, FONT_TABLE);
|
||||
func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
sp26 = func_800FA0B4(SEQ_PLAYER_FANFARE);
|
||||
sp22 = func_800FA0B4(SEQ_PLAYER_BGM_SUB);
|
||||
if (sp26 == NA_BGM_DISABLED) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0, 5);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0, 5);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x80, 1, 0xA);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x83, 1, 0xA);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x90, 0, 0);
|
||||
if (sp22 != NA_BGM_LONLON) {
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x93, 0, 0);
|
||||
|
||||
seqIdBgmMain = Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN);
|
||||
seqIdFanfare = Audio_GetActiveSeqId(SEQ_PLAYER_FANFARE);
|
||||
seqIdBgmSub = Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB);
|
||||
|
||||
(void)seqIdBgmMain; // suppresses set but unused warning
|
||||
if (seqIdFanfare == NA_BGM_DISABLED) {
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_FANFARE, 0, 5);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_FANFARE, 0, 5);
|
||||
SEQCMD_SETUP_RESTORE_PLAYER_VOLUME_WITH_SCALE_INDEX(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM_MAIN,
|
||||
VOL_SCALE_INDEX_FANFARE, 10);
|
||||
SEQCMD_SETUP_RESTORE_PLAYER_VOLUME_WITH_SCALE_INDEX(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM_SUB,
|
||||
VOL_SCALE_INDEX_FANFARE, 10);
|
||||
SEQCMD_SETUP_SET_CHANNEL_DISABLE_MASK(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM_MAIN, 0);
|
||||
if (seqIdBgmSub != NA_BGM_LONLON) {
|
||||
SEQCMD_SETUP_SET_CHANNEL_DISABLE_MASK(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM_SUB, 0);
|
||||
}
|
||||
}
|
||||
Audio_StartSeq(SEQ_PLAYER_FANFARE, 1, D_8016B9F6);
|
||||
Audio_SeqCmdA(0, 0xFFFF);
|
||||
if (sp22 != NA_BGM_LONLON) {
|
||||
Audio_SeqCmdA(SEQ_PLAYER_BGM_SUB, 0xFFFF);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 1, 0, D_8016B9F6);
|
||||
SEQCMD_SET_CHANNEL_DISABLE_MASK(SEQ_PLAYER_BGM_MAIN, 0xFFFF);
|
||||
if (seqIdBgmSub != NA_BGM_LONLON) {
|
||||
SEQCMD_SET_CHANNEL_DISABLE_MASK(SEQ_PLAYER_BGM_SUB, 0xFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F5E18(u8 playerIdx, u16 seqId, u8 fadeTimer, s8 arg3, s8 arg4) {
|
||||
Audio_SeqCmd7(playerIdx, arg3, arg4);
|
||||
Audio_StartSeq(playerIdx, fadeTimer, seqId);
|
||||
void func_800F5E18(u8 seqPlayerIndex, u16 seqId, u8 fadeTimer, s8 ioPort, s8 ioData) {
|
||||
SEQCMD_SET_PLAYER_IO(seqPlayerIndex, ioPort, ioData);
|
||||
SEQCMD_PLAY_SEQUENCE(seqPlayerIndex, fadeTimer, 0, seqId);
|
||||
}
|
||||
|
||||
void Audio_SetSequenceMode(u8 seqMode) {
|
||||
|
@ -4815,9 +4802,9 @@ void Audio_SetSequenceMode(u8 seqMode) {
|
|||
seqMode = SEQ_MODE_IGNORE;
|
||||
}
|
||||
|
||||
seqId = D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254;
|
||||
seqId = gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId;
|
||||
|
||||
if (seqId == NA_BGM_FIELD_LOGIC && func_800FA0B4(SEQ_PLAYER_BGM_SUB) == (NA_BGM_ENEMY | 0x800)) {
|
||||
if (seqId == NA_BGM_FIELD_LOGIC && Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == (NA_BGM_ENEMY | 0x800)) {
|
||||
seqMode = SEQ_MODE_IGNORE;
|
||||
}
|
||||
|
||||
|
@ -4826,29 +4813,33 @@ void Audio_SetSequenceMode(u8 seqMode) {
|
|||
if (seqMode != (sPrevSeqMode & 0x7F)) {
|
||||
if (seqMode == SEQ_MODE_ENEMY) {
|
||||
// Start playing enemy bgm
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol < 0) {
|
||||
volumeFadeInTimer = -(D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol);
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_SUB].volScales[VOL_SCALE_INDEX_FANFARE] - sAudioEnemyVol < 0) {
|
||||
volumeFadeInTimer =
|
||||
-(gActiveSeqs[SEQ_PLAYER_BGM_SUB].volScales[VOL_SCALE_INDEX_FANFARE] - sAudioEnemyVol);
|
||||
} else {
|
||||
volumeFadeInTimer = D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol;
|
||||
volumeFadeInTimer =
|
||||
gActiveSeqs[SEQ_PLAYER_BGM_SUB].volScales[VOL_SCALE_INDEX_FANFARE] - sAudioEnemyVol;
|
||||
}
|
||||
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, volumeFadeInTimer);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_SUB, 10, NA_BGM_ENEMY | 0x800);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_BGM_SUB, sAudioEnemyVol,
|
||||
volumeFadeInTimer);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
|
||||
|
||||
if (seqId != NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, (0x7F - sAudioEnemyVol) & 0xFF, 0xA);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB,
|
||||
(0x7F - sAudioEnemyVol) & 0xFF, 0xA);
|
||||
Audio_SplitBgmChannels(sAudioEnemyVol);
|
||||
}
|
||||
} else if ((sPrevSeqMode & 0x7F) == SEQ_MODE_ENEMY) {
|
||||
// Stop playing enemy bgm
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, 10);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10);
|
||||
if (seqMode == SEQ_MODE_IGNORE) {
|
||||
volumeFadeOutTimer = 0;
|
||||
} else {
|
||||
volumeFadeOutTimer = 10;
|
||||
}
|
||||
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, 0x7F, volumeFadeOutTimer);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB, 0x7F, volumeFadeOutTimer);
|
||||
Audio_SplitBgmChannels(0);
|
||||
}
|
||||
|
||||
|
@ -4872,7 +4863,7 @@ void Audio_SetSequenceMode(u8 seqMode) {
|
|||
}
|
||||
|
||||
sPrevSeqMode = seqMode;
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 2, seqMode);
|
||||
SEQCMD_SET_PLAYER_IO(SEQ_PLAYER_BGM_MAIN, 2, seqMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4891,12 +4882,12 @@ void Audio_SetBgmEnemyVolume(f32 dist) {
|
|||
}
|
||||
|
||||
sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f;
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, 10);
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, (0x7F - sAudioEnemyVol), 10);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_BGM_SUB, sAudioEnemyVol, 10);
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB, (0x7F - sAudioEnemyVol), 10);
|
||||
}
|
||||
}
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) {
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SplitBgmChannels(sAudioEnemyVol);
|
||||
}
|
||||
}
|
||||
|
@ -4911,7 +4902,7 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
sAudioHasMalonBgm = true;
|
||||
sAudioMalonBgmDist = dist;
|
||||
if (D_8016B9F2 == 0) {
|
||||
temp_a0 = (s8)(func_800FA0B4(SEQ_PLAYER_BGM_MAIN) & 0xFF);
|
||||
temp_a0 = (s8)(Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) & 0xFF);
|
||||
if (temp_a0 == (arg1 & 0xFF)) {
|
||||
if ((arg1 & 0xFF) == NA_BGM_LONLON) {
|
||||
|
||||
|
@ -4923,18 +4914,18 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
phi_v1 = (s8)(((dist - 200.0f) * 127.0f) / 1800.0f);
|
||||
}
|
||||
// Transition volume of channels 0, 1 and 13 on seq player 0 over 3 frames
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 3, 0, 127 - phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 3, 1, 127 - phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 3, 13, phi_v1);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_BGM_MAIN, 0, 3, 127 - phi_v1);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_BGM_MAIN, 1, 3, 127 - phi_v1);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_BGM_MAIN, 13, 3, phi_v1);
|
||||
if (D_8016B9D8 == 0) {
|
||||
D_8016B9D8++;
|
||||
}
|
||||
}
|
||||
} else if ((temp_a0 == NA_BGM_NATURE_AMBIENCE) && ((arg1 & 0xFF) == NA_BGM_LONLON)) {
|
||||
temp_a0 = (s8)(func_800FA0B4(SEQ_PLAYER_BGM_SUB) & 0xFF);
|
||||
temp_a0 = (s8)(Audio_GetActiveSeqId(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);
|
||||
Audio_SeqCmdA(SEQ_PLAYER_BGM_SUB, 0xFFFC);
|
||||
SEQCMD_SET_CHANNEL_DISABLE_MASK(SEQ_PLAYER_BGM_SUB, 0xFFFC);
|
||||
D_8016B9D8 = 10;
|
||||
}
|
||||
|
||||
|
@ -4946,8 +4937,8 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
phi_v1 = (s8)(((dist - 200.0f) * 127.0f) / 1800.0f);
|
||||
}
|
||||
// Transition volume of channels 0 and 1 on seq player 0 over 3 frames
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_SUB, 3, 0, 127 - phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_SUB, 3, 1, 127 - phi_v1);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_BGM_SUB, 0, 3, 127 - phi_v1);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_BGM_SUB, 1, 3, 127 - phi_v1);
|
||||
}
|
||||
|
||||
if (D_8016B9D8 < 10) {
|
||||
|
@ -4970,34 +4961,34 @@ void func_800F64E0(u8 arg0) {
|
|||
}
|
||||
|
||||
void func_800F6584(u8 arg0) {
|
||||
u8 playerIdx;
|
||||
u8 seqPlayerIndex;
|
||||
u16 sp34;
|
||||
|
||||
D_8016B9F2 = arg0;
|
||||
if ((func_800FA0B4(SEQ_PLAYER_BGM_MAIN) & 0xFF) == NA_BGM_LONLON) {
|
||||
playerIdx = SEQ_PLAYER_BGM_MAIN;
|
||||
if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) & 0xFF) == NA_BGM_LONLON) {
|
||||
seqPlayerIndex = SEQ_PLAYER_BGM_MAIN;
|
||||
sp34 = 0;
|
||||
} else if ((func_800FA0B4(SEQ_PLAYER_BGM_SUB) & 0xFF) == NA_BGM_LONLON) {
|
||||
playerIdx = SEQ_PLAYER_BGM_SUB;
|
||||
} else if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) & 0xFF) == NA_BGM_LONLON) {
|
||||
seqPlayerIndex = SEQ_PLAYER_BGM_SUB;
|
||||
sp34 = 0xFFFC;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg0 != 0) {
|
||||
Audio_SeqCmd6(playerIdx, 1, 0, 0);
|
||||
Audio_SeqCmd6(playerIdx, 1, 1, 0);
|
||||
if (playerIdx == SEQ_PLAYER_BGM_SUB) {
|
||||
Audio_SeqCmdA(playerIdx, sp34 | 3);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(seqPlayerIndex, 0, 1, 0);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(seqPlayerIndex, 1, 1, 0);
|
||||
if (seqPlayerIndex == SEQ_PLAYER_BGM_SUB) {
|
||||
SEQCMD_SET_CHANNEL_DISABLE_MASK(seqPlayerIndex, sp34 | 3);
|
||||
}
|
||||
} else {
|
||||
if (playerIdx == SEQ_PLAYER_BGM_SUB) {
|
||||
if (seqPlayerIndex == SEQ_PLAYER_BGM_SUB) {
|
||||
func_800F5E18(SEQ_PLAYER_BGM_SUB, NA_BGM_LONLON, 0, 0, 0);
|
||||
}
|
||||
Audio_SeqCmd6(playerIdx, 1, 0, 0x7F);
|
||||
Audio_SeqCmd6(playerIdx, 1, 1, 0x7F);
|
||||
if (playerIdx == SEQ_PLAYER_BGM_SUB) {
|
||||
Audio_SeqCmdA(playerIdx, sp34);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(seqPlayerIndex, 0, 1, 0x7F);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(seqPlayerIndex, 1, 1, 0x7F);
|
||||
if (seqPlayerIndex == SEQ_PLAYER_BGM_SUB) {
|
||||
SEQCMD_SET_CHANNEL_DISABLE_MASK(seqPlayerIndex, sp34);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5037,7 +5028,7 @@ void func_800F6700(s8 audioSetting) {
|
|||
break;
|
||||
}
|
||||
|
||||
Audio_SeqCmdE0(SEQ_PLAYER_BGM_MAIN, soundModeIndex);
|
||||
SEQCMD_SET_SOUND_MODE(soundModeIndex);
|
||||
}
|
||||
|
||||
void Audio_SetBaseFilter(u8 filter) {
|
||||
|
@ -5059,7 +5050,7 @@ void Audio_SetExtraFilter(u8 filter) {
|
|||
|
||||
sAudioExtraFilter2 = filter;
|
||||
sAudioExtraFilter = filter;
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 == NA_BGM_NATURE_AMBIENCE) {
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_NATURE_AMBIENCE) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
t = i;
|
||||
// CHAN_UPD_SCRIPT_IO (seq player 0, all channels, slot 6)
|
||||
|
@ -5087,8 +5078,8 @@ void func_800F6964(u16 arg0) {
|
|||
s32 skip;
|
||||
u8 channelIdx;
|
||||
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, (arg0 * 3) / 2);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, (arg0 * 3) / 2);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, (arg0 * 3) / 2);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, (arg0 * 3) / 2);
|
||||
for (channelIdx = 0; channelIdx < 16; channelIdx++) {
|
||||
skip = false;
|
||||
switch (channelIdx) {
|
||||
|
@ -5104,23 +5095,23 @@ void func_800F6964(u16 arg0) {
|
|||
}
|
||||
|
||||
if (!skip) {
|
||||
Audio_SeqCmd6(SEQ_PLAYER_SFX, arg0 >> 1, channelIdx, 0);
|
||||
SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_SFX, channelIdx, arg0 >> 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, (arg0 * 3) / 2);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_SUB, (arg0 * 3) / 2);
|
||||
}
|
||||
|
||||
void func_800F6AB0(u16 arg0) {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, arg0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, arg0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, arg0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, 0x7F, 0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0x7F, 0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, arg0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, arg0);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_SUB, arg0);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB, 0x7F, 0);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_FANFARE, 0x7F, 0);
|
||||
}
|
||||
|
||||
void func_800F6B3C(void) {
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0xFF, 5);
|
||||
Audio_StartSequence(SEQ_PLAYER_SFX, 0, 0xFF, 5);
|
||||
}
|
||||
|
||||
void Audio_DisableAllSeq(void) {
|
||||
|
@ -5179,19 +5170,20 @@ void func_800F6C34(void) {
|
|||
D_8016B9F2 = 0;
|
||||
}
|
||||
|
||||
void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 port, u8 val) {
|
||||
void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 ioPort, u8 ioData) {
|
||||
u8 firstChannelIdx;
|
||||
u8 lastChannelIdx;
|
||||
u8 channelIdx;
|
||||
|
||||
if ((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) && func_800FA11C(1, 0xF00000FF)) {
|
||||
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) &&
|
||||
Audio_IsSeqCmdNotQueued(SEQCMD_OP_PLAY_SEQUENCE << 28 | NA_BGM_NATURE_AMBIENCE, SEQCMD_OP_MASK | 0xFF)) {
|
||||
sAudioNatureFailed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// channelIdxRange = 01 on port 1
|
||||
if (((channelIdxRange << 8) + port) == ((NATURE_CHANNEL_CRITTER_0 << 8) + CHANNEL_IO_PORT_1)) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_SUB) != NA_BGM_LONLON) {
|
||||
// channelIdxRange = 01 on ioPort 1
|
||||
if (((channelIdxRange << 8) + ioPort) == ((NATURE_CHANNEL_CRITTER_0 << 8) + CHANNEL_IO_PORT_1)) {
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) != NA_BGM_LONLON) {
|
||||
D_8016B9D8 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -5204,38 +5196,38 @@ void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 port, u8 val) {
|
|||
}
|
||||
|
||||
for (channelIdx = firstChannelIdx; channelIdx <= lastChannelIdx; channelIdx++) {
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, port, channelIdx, val);
|
||||
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, channelIdx, ioPort, ioData);
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_StartNatureAmbienceSequence(u16 playerIO, u16 channelMask) {
|
||||
u8 channelIdx;
|
||||
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_WINDMILL) {
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_WINDMILL) {
|
||||
Audio_PlayCutsceneEffectsSequence(SEQ_CS_EFFECTS_RAINFALL);
|
||||
return;
|
||||
}
|
||||
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 0, 1);
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 4, playerIO >> 8);
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 5, playerIO & 0xFF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, 0x7F, 1);
|
||||
SEQCMD_SET_PLAYER_IO(SEQ_PLAYER_BGM_MAIN, 0, 1);
|
||||
SEQCMD_SET_PLAYER_IO(SEQ_PLAYER_BGM_MAIN, 4, playerIO >> 8);
|
||||
SEQCMD_SET_PLAYER_IO(SEQ_PLAYER_BGM_MAIN, 5, playerIO & 0xFF);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_MAIN, 0x7F, 1);
|
||||
|
||||
channelIdx = false;
|
||||
if (D_80133408 != 0) {
|
||||
if (gStartSeqDisabled) {
|
||||
channelIdx = true;
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
SEQCMD_DISABLE_PLAY_SEQUENCES(false);
|
||||
}
|
||||
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_NATURE_AMBIENCE);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_NATURE_AMBIENCE);
|
||||
|
||||
if (channelIdx) {
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
SEQCMD_DISABLE_PLAY_SEQUENCES(true);
|
||||
}
|
||||
|
||||
for (channelIdx = 0; channelIdx < 16; channelIdx++) {
|
||||
if (!(channelMask & (1 << channelIdx)) && (playerIO & (1 << channelIdx))) {
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, CHANNEL_IO_PORT_1, channelIdx, 1);
|
||||
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, channelIdx, CHANNEL_IO_PORT_1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5243,24 +5235,23 @@ void Audio_StartNatureAmbienceSequence(u16 playerIO, u16 channelMask) {
|
|||
void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId) {
|
||||
u8 i = 0;
|
||||
u8 channelIdx;
|
||||
u8 port;
|
||||
u8 val;
|
||||
u8 ioPort;
|
||||
u8 ioData;
|
||||
|
||||
if (!((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_DISABLED) &&
|
||||
(sSeqFlags[((u8)D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254) & 0xFF] & SEQ_FLAG_NO_AMBIENCE))) {
|
||||
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_DISABLED) ||
|
||||
!(sSeqFlags[((u8)gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId) & 0xFF] & SEQ_FLAG_NO_AMBIENCE)) {
|
||||
|
||||
Audio_StartNatureAmbienceSequence(sNatureAmbienceDataIO[natureAmbienceId].playerIO,
|
||||
sNatureAmbienceDataIO[natureAmbienceId].channelMask);
|
||||
|
||||
while ((sNatureAmbienceDataIO[natureAmbienceId].channelIO[i] != 0xFF) && (i < 100)) {
|
||||
// Probably a fake match, using Audio_SeqCmd8 doesn't work.
|
||||
channelIdx = sNatureAmbienceDataIO[natureAmbienceId].channelIO[i++];
|
||||
port = sNatureAmbienceDataIO[natureAmbienceId].channelIO[i++];
|
||||
val = sNatureAmbienceDataIO[natureAmbienceId].channelIO[i++];
|
||||
Audio_QueueSeqCmd(0x80000000 | (SEQ_PLAYER_BGM_MAIN << 24) | (port << 0x10) | (channelIdx << 8) | val);
|
||||
ioPort = sNatureAmbienceDataIO[natureAmbienceId].channelIO[i++];
|
||||
ioData = sNatureAmbienceDataIO[natureAmbienceId].channelIO[i++];
|
||||
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, channelIdx, ioPort, ioData);
|
||||
}
|
||||
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, CHANNEL_IO_PORT_7, NATURE_CHANNEL_UNK, sSoundMode);
|
||||
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, NATURE_CHANNEL_UNK, CHANNEL_IO_PORT_7, sSoundMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5272,13 +5263,13 @@ void Audio_InitSound(void) {
|
|||
func_800F6C34();
|
||||
AudioOcarina_ResetStaffs();
|
||||
Audio_ResetSfxChannelState();
|
||||
func_800FAEB4();
|
||||
Audio_ResetActiveSequencesAndVolume();
|
||||
Audio_ResetSfx();
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 10);
|
||||
Audio_StartSequence(SEQ_PLAYER_SFX, 0, 0x70, 10);
|
||||
}
|
||||
|
||||
void func_800F7170(void) {
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 1);
|
||||
Audio_StartSequence(SEQ_PLAYER_SFX, 0, 0x70, 1);
|
||||
Audio_QueueCmdS32(0xF2000000, 1);
|
||||
Audio_ScheduleProcessCmds();
|
||||
Audio_QueueCmdS32(0xF8000000, 0);
|
||||
|
@ -5289,14 +5280,14 @@ void func_800F71BC(s32 arg0) {
|
|||
func_800F6C34();
|
||||
AudioOcarina_ResetStaffs();
|
||||
Audio_ResetSfxChannelState();
|
||||
func_800FADF8();
|
||||
Audio_ResetActiveSequences();
|
||||
Audio_ResetSfx();
|
||||
}
|
||||
|
||||
void func_800F7208(void) {
|
||||
func_800FADF8();
|
||||
Audio_ResetActiveSequences();
|
||||
Audio_QueueCmdS32(0xF2000000, 1);
|
||||
func_800F6C34();
|
||||
Audio_ResetSfxChannelState();
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 1);
|
||||
Audio_StartSequence(SEQ_PLAYER_SFX, 0, 0x70, 1);
|
||||
}
|
||||
|
|
|
@ -52,15 +52,15 @@ void Audio_SetSfxBanksMute(u16 muteMask) {
|
|||
|
||||
void Audio_QueueSeqCmdMute(u8 channelIdx) {
|
||||
D_801333D0 |= (1 << channelIdx);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 2, 0x40, 0xF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 2, 0x40, 0xF);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_SFX, 0x40, 0xF);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_SFX, 0x40, 0xF);
|
||||
}
|
||||
|
||||
void Audio_ClearBGMMute(u8 channelIdx) {
|
||||
D_801333D0 &= ((1 << channelIdx) ^ 0xFFFF);
|
||||
if (D_801333D0 == 0) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 2, 0x7F, 0xF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 2, 0x7F, 0xF);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_SFX, 0x7F, 0xF);
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_SFX, 0x7F, 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -449,15 +449,15 @@ void Cutscene_Command_StopBGM(PlayState* play, CutsceneContext* csCtx, CsCmdMusi
|
|||
|
||||
// Command 0x7C: Fade Background Music over duration
|
||||
void Cutscene_Command_FadeBGM(PlayState* play, CutsceneContext* csCtx, CsCmdMusicFade* cmd) {
|
||||
u8 var1;
|
||||
u8 fadeTimer;
|
||||
|
||||
if ((csCtx->frames == cmd->startFrame) && (csCtx->frames < cmd->endFrame)) {
|
||||
var1 = cmd->endFrame - cmd->startFrame;
|
||||
fadeTimer = cmd->endFrame - cmd->startFrame;
|
||||
|
||||
if (cmd->type == 3) {
|
||||
Audio_QueueSeqCmd(var1 << 0x10 | (0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF));
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, fadeTimer);
|
||||
} else {
|
||||
Audio_QueueSeqCmd(var1 << 0x10 | (0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xFF));
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, fadeTimer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2035,7 +2035,7 @@ void Environment_PlaySceneSequence(PlayState* play) {
|
|||
Audio_PlayNatureAmbienceSequence(NATURE_ID_KOKIRI_REGION);
|
||||
} 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));
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, ((void)0, gSaveContext.forcedSeqId));
|
||||
}
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
} else if (play->sequenceCtx.seqId == NA_BGM_NO_MUSIC) {
|
||||
|
@ -2102,7 +2102,7 @@ void Environment_PlayTimeBasedSequence(PlayState* play) {
|
|||
if (gSaveContext.dayTime > CLOCK_TIME(17, 10)) {
|
||||
if (play->envCtx.precipitation[PRECIP_RAIN_MAX] == 0 &&
|
||||
play->envCtx.precipitation[PRECIP_SOS_MAX] == 0) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xF000FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 240);
|
||||
}
|
||||
|
||||
play->envCtx.timeSeqState++;
|
||||
|
@ -2570,7 +2570,7 @@ void Environment_StopStormNatureAmbience(PlayState* play) {
|
|||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_RAIN, CHANNEL_IO_PORT_1, 0);
|
||||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_LIGHTNING, CHANNEL_IO_PORT_1, 0);
|
||||
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_AMBIENCE) {
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_AMBIENCE) {
|
||||
gSaveContext.seqId = NA_BGM_NATURE_SFX_RAIN;
|
||||
Environment_PlaySceneSequence(play);
|
||||
}
|
||||
|
|
|
@ -397,7 +397,7 @@ void Scene_CommandSoundSettings(PlayState* play, SceneCmd* cmd) {
|
|||
play->sequenceCtx.natureAmbienceId = cmd->soundSettings.natureAmbienceId;
|
||||
|
||||
if (gSaveContext.seqId == (u8)NA_BGM_DISABLED) {
|
||||
Audio_QueueSeqCmd(cmd->soundSettings.specId | 0xF0000000);
|
||||
SEQCMD_RESET_AUDIO_HEAP(0, cmd->soundSettings.specId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,8 +107,8 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
|||
} else {
|
||||
play->csCtx.segment = D_808BB7A0;
|
||||
}
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_MASTER_SWORD);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_MASTER_SWORD);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
this->actor.parent = NULL;
|
||||
BgTokiSwd_SetupAction(this, func_808BB0AC);
|
||||
|
|
|
@ -319,7 +319,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
|
|||
BossDodongo_Walk(this, play);
|
||||
|
||||
if (this->unk_196 == 1) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
}
|
||||
|
||||
if (this->unk_196 == 0) {
|
||||
|
@ -407,7 +407,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
|
|||
SEGMENTED_TO_VIRTUAL(&object_kingdodongo_Blob_017410), 0xA0, 0xB4, 0x80,
|
||||
0x28);
|
||||
}
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_FIRE_BOSS);
|
||||
}
|
||||
|
||||
if (this->unk_198 == 0) {
|
||||
|
@ -1284,7 +1284,7 @@ void BossDodongo_SetupDeathCutscene(BossDodongo* this) {
|
|||
this->csState = 0;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2);
|
||||
this->unk_1BC = 1;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
}
|
||||
|
||||
void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
|
||||
|
@ -1598,7 +1598,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->unk_1DA == 820) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART,
|
||||
Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x,
|
||||
this->actor.world.pos.y,
|
||||
|
|
|
@ -185,7 +185,7 @@ void BossFd_Init(Actor* thisx, PlayState* play) {
|
|||
SkelAnime_Init(play, &this->skelAnimeLeftArm, &gVolvagiaLeftArmSkel, &gVolvagiaLeftArmEmergeAnim, NULL, NULL, 0);
|
||||
this->introState = BFD_CS_WAIT;
|
||||
if (this->introState == BFD_CS_NONE) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_FIRE_BOSS);
|
||||
}
|
||||
|
||||
this->actor.world.pos.x = this->actor.world.pos.z = 0.0f;
|
||||
|
@ -486,7 +486,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
|||
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
|
||||
}
|
||||
if (this->timers[3] == 160) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_FIRE_BOSS);
|
||||
}
|
||||
if ((this->timers[3] == 130) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||
|
@ -743,7 +743,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
|||
if (this->skinSegments != 0) {
|
||||
this->skinSegments--;
|
||||
if (this->skinSegments == 0) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
}
|
||||
} else {
|
||||
this->work[BFD_ACTION_STATE] = BOSSFD_BONES_FALL;
|
||||
|
|
|
@ -884,7 +884,7 @@ void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) {
|
|||
BossFd2_SetupDeath(this, play);
|
||||
this->work[FD2_DAMAGE_FLASH_TIMER] = 10;
|
||||
this->work[FD2_INVINC_TIMER] = 30000;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_VALVAISA_DEAD);
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
} else if (damage) {
|
||||
|
|
|
@ -575,7 +575,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||
this->unk_198 = 2;
|
||||
this->timers[2] = 110;
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
} else {
|
||||
this->useOpenHand = true;
|
||||
BossGanon_SetIntroCsCamera(this, 0);
|
||||
|
@ -807,7 +807,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||
BossGanon_SetIntroCsCamera(this, 9);
|
||||
|
||||
if (this->csTimer == 30) {
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfStopPlayingOrganAnim);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfStopPlayingOrganAnim, -5.0f);
|
||||
}
|
||||
|
@ -1074,7 +1074,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||
sCape->attachShouldersTimer = 18.0f;
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GANON_MANTLE);
|
||||
this->unk_198 = 0;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_GANONDORF_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_GANONDORF_BOSS);
|
||||
}
|
||||
|
||||
if (this->csTimer == 50) {
|
||||
|
@ -2738,7 +2738,7 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
|
|||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_DEAD);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_DD_THUNDER);
|
||||
func_80078914(&sZeroVec, NA_SE_EN_LAST_DAMAGE);
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
this->screenFlashTimer = 4;
|
||||
} else {
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_DAMAGE2);
|
||||
|
|
|
@ -296,7 +296,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
|
|||
this->unk_339 = 4;
|
||||
if (this->unk_398 == 10) {
|
||||
func_80078914(&D_80906D6C, NA_SE_EV_STONE_BOUND);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
if (this->unk_398 == 20) {
|
||||
sZelda->unk_3C8 = 3;
|
||||
|
@ -447,7 +447,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
|
|||
this->actor.world.pos.x = -200.0f;
|
||||
this->actor.world.pos.y = this->actor.world.pos.y - 30.0f;
|
||||
this->actor.world.pos.z = -200.0f;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_OPENING_GANON);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_OPENING_GANON);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
|
|||
case 18:
|
||||
this->unk_339 = 6;
|
||||
if (this->unk_398 == 30) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_GANON_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_GANON_BOSS);
|
||||
}
|
||||
Math_ApproachF(&this->unk_30C, 7.0f, 1.0f, 0.1f);
|
||||
Math_ApproachF(&this->subCamEye.x, (this->actor.world.pos.x + 500.0f) - 350.0f, 0.1f, 1.0f);
|
||||
|
@ -1694,7 +1694,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
|
|||
this->subCamAt.z = D_80907050[phi_a1].z + player->actor.world.pos.z;
|
||||
}
|
||||
if (this->unk_398 > 80) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
this->unk_39C = 75;
|
||||
this->unk_398 = 0;
|
||||
this->subCamEye.x = 112.0f;
|
||||
|
|
|
@ -928,7 +928,7 @@ void BossGanondrof_SetupDeath(BossGanondrof* this, PlayState* play) {
|
|||
Animation_PlayOnce(&this->skelAnime, &gPhantomGanonDeathBlowAnim);
|
||||
this->fwork[GND_END_FRAME] = Animation_GetLastFrame(&gPhantomGanonDeathBlowAnim);
|
||||
this->actionFunc = BossGanondrof_Death;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FANTOM_DEAD);
|
||||
this->deathState = DEATH_START;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
|
@ -1101,7 +1101,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
|
|||
holdCamera = true;
|
||||
bodyDecayLevel = 10;
|
||||
if (this->timers[0] == 150) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
|
||||
GND_BOSSROOM_CENTER_Z, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ void BossGoma_SetupDefeated(BossGoma* this, PlayState* play) {
|
|||
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.shape.shadowScale = 0.0f;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_DEAD);
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, PlayState* play) {
|
|||
this->subCamAt.y = this->actor.world.pos.y;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -924,7 +924,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
|
|||
0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_70);
|
||||
}
|
||||
|
||||
|
@ -1108,7 +1108,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
|
|||
Math_SmoothStepToF(&this->subCamAt.z, this->firstTailLimbWorldPos.z, 0.2f, 50.0f, 0.1f);
|
||||
|
||||
if (this->timer == 80) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
|
|
|
@ -360,7 +360,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
|
|||
return;
|
||||
}
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_74)) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
this->tentMaxAngle = 5.0f;
|
||||
this->timers[0] = 50;
|
||||
} else {
|
||||
|
@ -1101,7 +1101,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
-280.0f, this->actor.world.pos.z, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 200.0f, -280.0f,
|
||||
this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
Flags_SetClear(play, play->roomCtx.curRoom.num);
|
||||
}
|
||||
}
|
||||
|
@ -1236,7 +1236,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
|
|||
this->actor.world.rot.y = 0x721A;
|
||||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_READY;
|
||||
sMorphaTent1->timers[0] = 30000;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x3200FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 50);
|
||||
Message_CloseTextbox(play);
|
||||
} else {
|
||||
break;
|
||||
|
@ -1417,7 +1417,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
|
|||
this->subCamAccel = 0.01f;
|
||||
}
|
||||
if (this->timers[2] == 150) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
}
|
||||
if (this->timers[2] == 130) {
|
||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 0xA0,
|
||||
|
@ -1775,7 +1775,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
|
|||
((sMorphaTent1->subCamId == SUB_CAM_ID_DONE) && (sMorphaTent2 != NULL) &&
|
||||
(sMorphaTent2->subCamId == SUB_CAM_ID_DONE))) {
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
this->csState = MO_DEATH_START;
|
||||
sMorphaTent1->drawActor = false;
|
||||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_DEATH_START;
|
||||
|
@ -3576,11 +3576,11 @@ void BossMo_Unknown(void) {
|
|||
|
||||
if (BREG(32) != 0) {
|
||||
BREG(32)--;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
func_80078914(&zeroVec, unkSfx[BREG(33)]);
|
||||
}
|
||||
if (BREG(34) != 0) {
|
||||
BREG(34) = 0;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | (u16)BREG(35));
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, BREG(35));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
|
|||
}
|
||||
|
||||
Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
this->actionFunc = BossSst_HeadIntro;
|
||||
}
|
||||
|
||||
|
@ -601,7 +601,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
|||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex),
|
||||
160, 180, 128, 40);
|
||||
}
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f);
|
||||
BossSst_HeadSfx(this, NA_SE_EN_SHADEST_DISAPPEAR);
|
||||
}
|
||||
|
@ -1015,7 +1015,7 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) {
|
|||
this->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
sHands[LEFT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
sHands[RIGHT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
sSubCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE);
|
||||
|
@ -1160,7 +1160,7 @@ void BossSst_HeadMelt(BossSst* this, PlayState* play) {
|
|||
void BossSst_HeadSetupFinish(BossSst* this) {
|
||||
this->actor.draw = BossSst_DrawEffects;
|
||||
this->timer = 40;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
BossSst_SetCameraTargets(1.0 / 40, 6);
|
||||
this->actionFunc = BossSst_HeadFinish;
|
||||
}
|
||||
|
|
|
@ -519,7 +519,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
|
|||
this->actor.world.pos.x = -600.0f;
|
||||
this->actor.world.pos.y = 400.0f;
|
||||
this->actor.world.pos.z = 0.0f;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
} else {
|
||||
BossTw_SetupCSWait(this, play);
|
||||
}
|
||||
|
@ -1512,7 +1512,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) {
|
|||
this->workf[UNK_F9] = 0.0f;
|
||||
this->workf[UNK_F10] = 0.0f;
|
||||
this->workf[UNK_F11] = 600.0f;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xC800FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 200);
|
||||
this->work[CS_TIMER_2] = 0;
|
||||
FALLTHROUGH;
|
||||
case 1:
|
||||
|
@ -1641,7 +1641,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) {
|
|||
this->timers[0] = 50;
|
||||
func_8002DF54(play, &this->actor, 2);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_TWINROBA_TRANSFORM);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1782,7 +1782,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
|
|||
if (this->csSfxTimer == 180) {
|
||||
func_80078914(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH);
|
||||
func_80078914(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH2);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KOTAKE_KOUME);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_KOTAKE_KOUME);
|
||||
}
|
||||
|
||||
this->csSfxTimer++;
|
||||
|
@ -2206,7 +2206,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] == 90) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x5A00FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 90);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] == 120) {
|
||||
|
@ -2217,7 +2217,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
|
|||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(object_tw_Blob_02E170),
|
||||
0xA0, 0xB4, 0x80, 0x28);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_75);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] >= 160) {
|
||||
|
@ -2512,7 +2512,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
|
|||
|
||||
if (this->work[CS_TIMER_2] == 820) {
|
||||
msgId1 = 0x6057;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x5000FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 80);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_2] == 860) {
|
||||
|
@ -2688,7 +2688,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
|
|||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->subCamEye = mainCam->eye;
|
||||
this->subCamAt = mainCam->at;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
break;
|
||||
case 1:
|
||||
spD0.x = Math_SinS(this->actor.world.rot.y) * 200.0f;
|
||||
|
@ -2763,7 +2763,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
|
|||
sKoumePtr->visible = 1;
|
||||
sKotakePtr->visible = 1;
|
||||
func_80078884(NA_SE_EN_TWINROBA_TRANSFORM);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KOTAKE_KOUME);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_KOTAKE_KOUME);
|
||||
this->csState2 = 3;
|
||||
this->work[CS_TIMER_2] = 0;
|
||||
this->subCamYaw = this->subCamYawStep = this->actor.speedXZ = this->subCamDistStep = 0.0f;
|
||||
|
@ -2811,7 +2811,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
|
|||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(play, &play->csCtx);
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0, 0, 0,
|
||||
WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0);
|
||||
|
|
|
@ -957,7 +957,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
|
|||
play->envCtx.lightSettingOverride = 1;
|
||||
func_8002DF54(play, &this->actor, 8);
|
||||
} else if (this->timer >= 35000) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
}
|
||||
|
||||
this->timer += this->unk_1F2;
|
||||
|
@ -1512,7 +1512,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
|
|||
void BossVa_SetupBodyDeath(BossVa* this, PlayState* play) {
|
||||
func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, 1.0f);
|
||||
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
this->vaCamRotMod = 0xC31;
|
||||
sCsState = DEATH_START;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
@ -1597,7 +1597,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
|
|||
break;
|
||||
case DEATH_CORE_BURST:
|
||||
if (this->timer == 13) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
}
|
||||
|
||||
this->timer--;
|
||||
|
|
|
@ -376,7 +376,7 @@ void DoorWarp1_ChooseInitialAction(DoorWarp1* this, PlayState* play) {
|
|||
void DoorWarp1_AwaitClearFlag(DoorWarp1* this, PlayState* play) {
|
||||
if (Flags_GetTempClear(play, this->actor.room)) {
|
||||
this->warpTimer = 200;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR);
|
||||
DoorWarp1_SetupAction(this, func_809995D4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
|
|||
if (!GET_ITEMGETINF(ITEMGETINF_1E)) {
|
||||
reaction = DNT_SIGNAL_CELEBRATE;
|
||||
this->prize = DNT_PRIZE_STICK;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SARIA_THEME);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_SARIA_THEME);
|
||||
break;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
|
@ -208,17 +208,17 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
|
|||
this->action = sResultValues[resultIdx][1];
|
||||
switch (this->action) {
|
||||
case DNT_ACTION_LOW_RUPEES:
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_COURTYARD);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_COURTYARD);
|
||||
break;
|
||||
case DNT_ACTION_ATTACK:
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
OnePointCutscene_Init(play, 2350, -99, &this->scrubs[3]->actor, CAM_ID_MAIN);
|
||||
}
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ENEMY | 0x800);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 8, NA_BGM_ENEMY);
|
||||
break;
|
||||
case DNT_ACTION_DANCE:
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SHOP);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_SHOP);
|
||||
break;
|
||||
}
|
||||
osSyncPrintf("\n\n");
|
||||
|
|
|
@ -358,7 +358,7 @@ void EnDntJiji_Return(EnDntJiji* this, PlayState* play) {
|
|||
if ((this->stage->actor.update != NULL) && (this->stage->leaderSignal == DNT_SIGNAL_NONE)) {
|
||||
this->stage->leaderSignal = DNT_SIGNAL_HIDE;
|
||||
this->stage->action = DNT_ACTION_ATTACK;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ENEMY | 0x800);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 8, NA_BGM_ENEMY);
|
||||
}
|
||||
}
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
|
|
@ -52,7 +52,7 @@ void func_809FFDC8(EnEg* this, PlayState* play) {
|
|||
// Void the player out
|
||||
Play_TriggerRespawn(play);
|
||||
gSaveContext.respawnFlag = -2;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
EnEg_PlayVoidOutSFX();
|
||||
voided = true;
|
||||
|
|
|
@ -2548,7 +2548,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) {
|
|||
if ((play->interfaceCtx.hbaAmmo == 0) || (this->hbaFlags & 2)) {
|
||||
if (this->hbaFlags & 4) {
|
||||
this->hbaFlags &= ~4;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
|
|||
if (this->playerFinish > 0) {
|
||||
this->result = INGORACE_PLAYER_WIN;
|
||||
this->finishTimer = 55;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
|
|||
this->result = INGORACE_INGO_WIN;
|
||||
this->finishTimer = 70;
|
||||
ingoHorse->stateFlags |= ENHORSE_INGO_WON;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
@ -207,12 +207,12 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
|
|||
}
|
||||
}
|
||||
if (((player2->rideActor != NULL) && AT_RANCH_EXIT(player2->rideActor)) || AT_RANCH_EXIT(&player2->actor)) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
|
||||
this->result = INGORACE_INGO_WIN;
|
||||
this->finishTimer = 20;
|
||||
}
|
||||
if ((gSaveContext.timer1Value >= 180) && (this->startFlags & 2)) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
|
||||
this->result = INGORACE_TIME_UP;
|
||||
this->finishTimer = 20;
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, PlayState* play
|
|||
this->finishTimer = 30;
|
||||
} else if (this->fenceCheck[15] == 1) {
|
||||
this->lapCount = 2;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->result = MALONRACE_SUCCESS;
|
||||
|
|
|
@ -93,7 +93,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, PlayState* play) {
|
|||
play->envCtx.precipitation[PRECIP_SOS_MAX] = 0;
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
Environment_StopStormNatureAmbience(play);
|
||||
} else if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_AMBIENCE) {
|
||||
} else if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_AMBIENCE) {
|
||||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_LIGHTNING, CHANNEL_IO_PORT_1, 0);
|
||||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_RAIN, CHANNEL_IO_PORT_1, 0);
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
|
|||
case 2:
|
||||
play->csCtx.segment = D_80ABF9D0;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
func_800F574C(1.18921f, 0x5A);
|
||||
func_800F574C(1.18921f, 90);
|
||||
break;
|
||||
case 4:
|
||||
play->csCtx.segment = D_80ABFB40;
|
||||
|
|
|
@ -340,7 +340,7 @@ void func_80ACA76C(EnOwl* this, PlayState* play) {
|
|||
func_8002DF54(play, &this->actor, 8);
|
||||
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
func_80ACA62C(this, play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ void func_80ACA7E0(EnOwl* this, PlayState* play) {
|
|||
func_8002DF54(play, &this->actor, 8);
|
||||
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
if ((this->unk_3EE & 0x3F) == 0) {
|
||||
func_80ACA62C(this, play);
|
||||
} else {
|
||||
|
@ -550,7 +550,7 @@ void func_80ACB03C(EnOwl* this, PlayState* play) {
|
|||
func_8002DF54(play, &this->actor, 8);
|
||||
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
func_80ACA62C(this, play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ void EnOwl_WaitZoraRiver(EnOwl* this, PlayState* play) {
|
|||
|
||||
void func_80ACB148(EnOwl* this, PlayState* play) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
Flags_SetSwitch(play, 0x23);
|
||||
|
@ -600,7 +600,7 @@ void EnOwl_WaitHyliaShortcut(EnOwl* this, PlayState* play) {
|
|||
|
||||
void func_80ACB22C(EnOwl* this, PlayState* play) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
}
|
||||
|
@ -608,7 +608,7 @@ void func_80ACB22C(EnOwl* this, PlayState* play) {
|
|||
|
||||
void func_80ACB274(EnOwl* this, PlayState* play) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
|
||||
this->actionFunc = EnOwl_WaitDeathMountainShortcut;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -505,6 +505,6 @@ void EnSyatekiMan_Draw(Actor* thisx, PlayState* play) {
|
|||
void EnSyatekiMan_SetBgm(void) {
|
||||
if (BREG(80)) {
|
||||
BREG(80) = false;
|
||||
Audio_QueueSeqCmd(sBgmList[BREG(81)]);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, sBgmList[BREG(81)]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -708,7 +708,7 @@ void func_80B154FC(EnTa* this, PlayState* play) {
|
|||
this->unk_2E0 &= ~0x10;
|
||||
this->unk_2E0 &= ~0x100;
|
||||
SET_EVENTINF(EVENTINF_HORSES_08);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
this->unk_2E0 &= ~0x200;
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
return;
|
||||
|
@ -737,7 +737,7 @@ void func_80B154FC(EnTa* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (gSaveContext.timer1Value == 0 && !Play_InCsMode(play)) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
this->unk_2E0 &= ~0x200;
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
gSaveContext.timer1State = 0;
|
||||
|
|
|
@ -241,7 +241,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if (play->csCtx.frames == 1020) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_FANFARE << 24 | NA_BGM_OPENING_GANON);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, NA_BGM_OPENING_GANON);
|
||||
}
|
||||
if (play->csCtx.frames == 960) {
|
||||
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
|
|
@ -86,7 +86,7 @@ void EnZl3_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B53468(void) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ESCAPE);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_ESCAPE);
|
||||
}
|
||||
|
||||
BossGanon2* func_80B53488(EnZl3* this, PlayState* play) {
|
||||
|
|
|
@ -142,7 +142,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
|
|||
}
|
||||
if (this->timers[0] == 51) {
|
||||
Audio_PlayActorSfx2(this->actor.child, NA_SE_EV_SPEAR_FENCE);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
}
|
||||
if (this->timers[0] == 0) {
|
||||
EnfHG_SetupApproach(this, play, Rand_ZeroOne() * 5.99f);
|
||||
|
@ -158,7 +158,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
|
|||
this->cutsceneState = INTRO_FENCE;
|
||||
this->timers[0] = 60;
|
||||
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y - 7.0f;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_72);
|
||||
Flags_SetSwitch(play, 0x23);
|
||||
FALLTHROUGH;
|
||||
|
@ -195,7 +195,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
|
|||
func_8002DF54(play, &this->actor, 9);
|
||||
}
|
||||
if (this->timers[0] == 1) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_OPENING_GANON);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_OPENING_GANON);
|
||||
}
|
||||
Math_ApproachF(&this->subCamEye.x, GND_BOSSROOM_CENTER_X + 40.0f, 0.05f, this->subCamVelFactor * 20.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, GND_BOSSROOM_CENTER_Y + 37.0f, 0.05f, this->subCamVelFactor * 20.0f);
|
||||
|
@ -284,7 +284,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
|
|||
this->bossGndSignal = FHG_RIDE;
|
||||
}
|
||||
if (this->timers[0] == 130) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x5000FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 80);
|
||||
}
|
||||
if (this->timers[0] == 30) {
|
||||
bossGnd->work[GND_EYE_STATE] = GND_EYESTATE_BRIGHTEN;
|
||||
|
@ -297,7 +297,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
|
|||
func_80078914(&audioVec, NA_SE_EN_FANTOM_ST_LAUGH);
|
||||
}
|
||||
if (this->timers[0] == 20) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
|
||||
}
|
||||
if (this->timers[0] == 2) {
|
||||
this->subCamVelFactor = 0.0f;
|
||||
|
|
|
@ -867,7 +867,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
|
|||
D_80B7E0AC = 0;
|
||||
D_80B7E0A6 = 10;
|
||||
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x0100FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
if ((HIGH_SCORE(HS_FISHING) & 0x7F) != 0) {
|
||||
|
@ -3586,7 +3586,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
|||
this->unk_198 = 1.7f;
|
||||
this->unk_19C = 7000.0f;
|
||||
D_80B7E124 = 1;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ENEMY | 0x800);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 8, NA_BGM_ENEMY);
|
||||
D_80B7E0A6 = 0;
|
||||
|
||||
if (this->unk_150 == 1) {
|
||||
|
@ -3791,7 +3791,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
|||
} else {
|
||||
D_80B7E086 = 0x4082;
|
||||
Rumble_Override(0.0f, 1, 3, 1);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x0A00FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 10);
|
||||
}
|
||||
|
||||
this->unk_158 = this->unk_15A = 0;
|
||||
|
@ -3859,7 +3859,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
|||
}
|
||||
|
||||
if (this->unk_17A[0] == 90) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HEART_GET | 0x900);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 9, NA_BGM_HEART_GET);
|
||||
D_80B7A67C = 40;
|
||||
|
||||
if (this->unk_150 == 0) {
|
||||
|
@ -3974,7 +3974,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
|||
|
||||
D_80B7E148 = 520.0f;
|
||||
D_80B7E144 = 195.0f;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA00FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 10);
|
||||
D_80B7E0A6 = 20;
|
||||
D_80B7A6CC = 3;
|
||||
}
|
||||
|
@ -5207,7 +5207,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
D_80B7A6CC = 20;
|
||||
Rumble_Override(0.0f, 150, 10, 10);
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x1400FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 20);
|
||||
}
|
||||
|
||||
if (KREG(0) != 0) {
|
||||
|
@ -5216,7 +5216,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
D_80B7A6CC = 20;
|
||||
Rumble_Override(0.0f, 150, 10, 10);
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x1400FF);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 20);
|
||||
}
|
||||
|
||||
if (D_80B7A6D0 != 0) {
|
||||
|
@ -5432,7 +5432,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
|
||||
case 22:
|
||||
if (D_80B7A6D0 == 30) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ITEM_GET | 0x900);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 9, NA_BGM_ITEM_GET);
|
||||
}
|
||||
|
||||
D_80B7A6D4 = 1;
|
||||
|
@ -5741,15 +5741,15 @@ void Fishing_DrawOwner(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (D_80B7E0A6 == 0) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_ADULT);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_KAKARIKO_ADULT);
|
||||
} else {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_KID);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_KAKARIKO_KID);
|
||||
}
|
||||
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_ADULT);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_KAKARIKO_ADULT);
|
||||
} else {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_KID);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_KAKARIKO_KID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1894,6 +1894,6 @@ void FileSelect_Init(GameState* thisx) {
|
|||
this->state.destroy = FileSelect_Destroy;
|
||||
FileSelect_InitContext(&this->state);
|
||||
Font_LoadOrderedFont(&this->font);
|
||||
Audio_QueueSeqCmd(0xF << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA);
|
||||
SEQCMD_RESET_AUDIO_HEAP(0, 10);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, NA_BGM_FILE_SELECT, 0, 7, 1);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ void MapSelect_LoadGame(MapSelectState* this, s32 entranceIndex) {
|
|||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
gSaveContext.entranceIndex = entranceIndex;
|
||||
gSaveContext.respawnFlag = 0;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = ENTR_LOAD_OPENING;
|
||||
|
|
|
@ -3410,7 +3410,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
gSaveContext.respawnFlag = -2;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.health = 0x30;
|
||||
Audio_QueueSeqCmd(0xF << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA);
|
||||
SEQCMD_RESET_AUDIO_HEAP(0, 10);
|
||||
gSaveContext.healthAccumulator = 0;
|
||||
gSaveContext.magicState = MAGIC_STATE_IDLE;
|
||||
gSaveContext.prevMagicState = MAGIC_STATE_IDLE;
|
||||
|
|
Loading…
Reference in a new issue