mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 15:31:15 +00:00
Merge branch 'master' into fix_misc_17
This commit is contained in:
commit
9bf406561f
83 changed files with 3320 additions and 2524 deletions
|
@ -1013,13 +1013,13 @@ s32 Player_InBlockingCsMode(PlayState* play, Player* this);
|
|||
s32 Player_InCsMode(PlayState* play);
|
||||
s32 func_8008E9C4(Player* this);
|
||||
s32 Player_IsChildWithHylianShield(Player* this);
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 itemAction);
|
||||
void Player_SetModelsForHoldingShield(Player* this);
|
||||
void Player_SetModels(Player* this, s32 modelGroup);
|
||||
void Player_SetModelGroup(Player* this, s32 modelGroup);
|
||||
void func_8008EC70(Player* this);
|
||||
void Player_SetEquipmentData(PlayState* play, Player* this);
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 actionParam);
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 itemAction);
|
||||
void func_8008EDF0(Player* this);
|
||||
void func_8008EE08(Player* this);
|
||||
void func_8008EEAC(PlayState* play, Actor* actor);
|
||||
|
@ -1030,18 +1030,18 @@ u8 Player_GetMask(PlayState* play);
|
|||
Player* Player_UnsetMask(PlayState* play);
|
||||
s32 Player_HasMirrorShieldEquipped(PlayState* play);
|
||||
s32 Player_HasMirrorShieldSetToDraw(PlayState* play);
|
||||
s32 Player_ActionToMagicSpell(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToMagicSpell(Player* this, s32 itemAction);
|
||||
s32 Player_HoldsHookshot(Player* this);
|
||||
s32 func_8008F128(Player* this);
|
||||
s32 Player_ActionToMeleeWeapon(s32 actionParam);
|
||||
s32 Player_ActionToMeleeWeapon(s32 itemAction);
|
||||
s32 Player_GetMeleeWeaponHeld(Player* this);
|
||||
s32 Player_HoldsTwoHandedWeapon(Player* this);
|
||||
s32 Player_HoldsBrokenKnife(Player* this);
|
||||
s32 Player_ActionToBottle(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToBottle(Player* this, s32 itemAction);
|
||||
s32 Player_GetBottleHeld(Player* this);
|
||||
s32 Player_ActionToExplosive(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToExplosive(Player* this, s32 itemAction);
|
||||
s32 Player_GetExplosiveHeld(Player* this);
|
||||
s32 func_8008F2BC(Player* this, s32 actionParam);
|
||||
s32 func_8008F2BC(Player* this, s32 itemAction);
|
||||
s32 func_8008F2F8(PlayState* play);
|
||||
void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
|
||||
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
|
||||
|
@ -1866,9 +1866,9 @@ void Audio_ClearSariaBgm(void);
|
|||
void Audio_ClearSariaBgmAtPos(Vec3f* pos);
|
||||
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 Audio_PlayMorningSceneSequence(u16 seqId);
|
||||
void Audio_PlaySceneSequence(u16 seqId);
|
||||
void func_800F574C(f32 scaleTempoAndFreq, u8 duration);
|
||||
void func_800F5718(void);
|
||||
void func_800F5918(void);
|
||||
void func_800F595C(u16);
|
||||
|
@ -1879,12 +1879,12 @@ 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 Audio_PlaySequenceWithSeqPlayerIO(u8 seqPlayerIndex, u16 seqId, u8 fadeInDuration, s8 ioPort, s8 ioData);
|
||||
void Audio_SetSequenceMode(u8 seqMode);
|
||||
void Audio_SetBgmEnemyVolume(f32 dist);
|
||||
void func_800F6268(f32 dist, u16);
|
||||
void Audio_UpdateMalonSinging(f32 dist, u16 seqId);
|
||||
void func_800F64E0(u8 arg0);
|
||||
void func_800F6584(u8 arg0);
|
||||
void Audio_ToggleMalonSinging(u8 malonSingingDisabled);
|
||||
void Audio_SetEnvReverb(s8 reverb);
|
||||
void Audio_SetCodeReverb(s8 reverb);
|
||||
void func_800F6700(s8 audioSetting);
|
||||
|
@ -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);
|
||||
|
|
|
@ -106,6 +106,8 @@
|
|||
#define R_TRANS_DBG_TYPE CREG(12)
|
||||
#define R_ENV_WIND_DIR(i) CREG(16 + (i))
|
||||
#define R_ENV_WIND_SPEED CREG(19)
|
||||
#define R_PAUSE_STICK_REPEAT_DELAY XREG(6)
|
||||
#define R_PAUSE_STICK_REPEAT_DELAY_FIRST XREG(8)
|
||||
#define R_A_BTN_Y XREG(16)
|
||||
#define R_A_BTN_X XREG(17)
|
||||
#define R_A_ICON_Y XREG(19)
|
||||
|
|
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,8 +217,8 @@ extern u8 gSfxBankMuted[];
|
|||
extern u16 gAudioSfxSwapSource[10];
|
||||
extern u16 gAudioSfxSwapTarget[10];
|
||||
extern u8 gAudioSfxSwapMode[10];
|
||||
extern unk_D_8016E750 D_8016E750[4];
|
||||
extern AudioContext gAudioContext;
|
||||
extern ActiveSequence gActiveSeqs[4];
|
||||
extern AudioContext gAudioCtx;
|
||||
extern void(*D_801755D0)(void);
|
||||
|
||||
extern u32 __osMalloc_FreeBlockTest_Enable;
|
||||
|
|
|
@ -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"
|
||||
|
@ -786,7 +787,7 @@ typedef struct {
|
|||
/* 0x022C */ s16 cursorY[5]; // "cur_ypt"
|
||||
/* 0x0236 */ s16 dungeonMapSlot;
|
||||
/* 0x0238 */ s16 cursorSpecialPos; // "key_angle"
|
||||
/* 0x023A */ s16 pageSwitchTimer;
|
||||
/* 0x023A */ s16 pageSwitchInputTimer; // Used to introduce a delay before switching page when arriving on the "scroll left/right" positions while holding stick left/right.
|
||||
/* 0x023C */ u16 namedItem; // "zoom_name"
|
||||
/* 0x023E */ u16 cursorItem[4]; // "select_name"
|
||||
/* 0x0246 */ u16 cursorSlot[4];
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
#define TATUMS_PER_BEAT 48
|
||||
|
||||
#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((u32)(ptr) != (u32)&gAudioContext.sequenceChannelNone)
|
||||
#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((u32)(ptr) != (u32)&gAudioCtx.sequenceChannelNone)
|
||||
#define SEQ_NUM_CHANNELS 16
|
||||
#define SEQ_IO_VAL_NONE -1
|
||||
|
||||
#define MAX_CHANNELS_PER_BANK 3
|
||||
|
||||
|
@ -975,43 +976,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
|
||||
|
|
|
@ -62,75 +62,75 @@ typedef enum {
|
|||
} PlayerMask;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_AP_NONE,
|
||||
/* 0x01 */ PLAYER_AP_LAST_USED,
|
||||
/* 0x02 */ PLAYER_AP_FISHING_POLE,
|
||||
/* 0x03 */ PLAYER_AP_SWORD_MASTER,
|
||||
/* 0x04 */ PLAYER_AP_SWORD_KOKIRI,
|
||||
/* 0x05 */ PLAYER_AP_SWORD_BGS,
|
||||
/* 0x06 */ PLAYER_AP_STICK,
|
||||
/* 0x07 */ PLAYER_AP_HAMMER,
|
||||
/* 0x08 */ PLAYER_AP_BOW,
|
||||
/* 0x09 */ PLAYER_AP_BOW_FIRE,
|
||||
/* 0x0A */ PLAYER_AP_BOW_ICE,
|
||||
/* 0x0B */ PLAYER_AP_BOW_LIGHT,
|
||||
/* 0x0C */ PLAYER_AP_BOW_0C,
|
||||
/* 0x0D */ PLAYER_AP_BOW_0D,
|
||||
/* 0x0E */ PLAYER_AP_BOW_0E,
|
||||
/* 0x0F */ PLAYER_AP_SLINGSHOT,
|
||||
/* 0x10 */ PLAYER_AP_HOOKSHOT,
|
||||
/* 0x11 */ PLAYER_AP_LONGSHOT,
|
||||
/* 0x12 */ PLAYER_AP_BOMB,
|
||||
/* 0x13 */ PLAYER_AP_BOMBCHU,
|
||||
/* 0x14 */ PLAYER_AP_BOOMERANG,
|
||||
/* 0x15 */ PLAYER_AP_MAGIC_SPELL_15,
|
||||
/* 0x16 */ PLAYER_AP_MAGIC_SPELL_16,
|
||||
/* 0x17 */ PLAYER_AP_MAGIC_SPELL_17,
|
||||
/* 0x18 */ PLAYER_AP_FARORES_WIND,
|
||||
/* 0x19 */ PLAYER_AP_NAYRUS_LOVE,
|
||||
/* 0x1A */ PLAYER_AP_DINS_FIRE,
|
||||
/* 0x1B */ PLAYER_AP_NUT,
|
||||
/* 0x1C */ PLAYER_AP_OCARINA_FAIRY,
|
||||
/* 0x1D */ PLAYER_AP_OCARINA_TIME,
|
||||
/* 0x1E */ PLAYER_AP_BOTTLE,
|
||||
/* 0x1F */ PLAYER_AP_BOTTLE_FISH,
|
||||
/* 0x20 */ PLAYER_AP_BOTTLE_FIRE,
|
||||
/* 0x21 */ PLAYER_AP_BOTTLE_BUG,
|
||||
/* 0x22 */ PLAYER_AP_BOTTLE_POE,
|
||||
/* 0x23 */ PLAYER_AP_BOTTLE_BIG_POE,
|
||||
/* 0x24 */ PLAYER_AP_BOTTLE_LETTER,
|
||||
/* 0x25 */ PLAYER_AP_BOTTLE_POTION_RED,
|
||||
/* 0x26 */ PLAYER_AP_BOTTLE_POTION_BLUE,
|
||||
/* 0x27 */ PLAYER_AP_BOTTLE_POTION_GREEN,
|
||||
/* 0x28 */ PLAYER_AP_BOTTLE_MILK,
|
||||
/* 0x29 */ PLAYER_AP_BOTTLE_MILK_HALF,
|
||||
/* 0x2A */ PLAYER_AP_BOTTLE_FAIRY,
|
||||
/* 0x2B */ PLAYER_AP_LETTER_ZELDA,
|
||||
/* 0x2C */ PLAYER_AP_WEIRD_EGG,
|
||||
/* 0x2D */ PLAYER_AP_CHICKEN,
|
||||
/* 0x2E */ PLAYER_AP_BEAN,
|
||||
/* 0x2F */ PLAYER_AP_POCKET_EGG,
|
||||
/* 0x30 */ PLAYER_AP_POCKET_CUCCO,
|
||||
/* 0x31 */ PLAYER_AP_COJIRO,
|
||||
/* 0x32 */ PLAYER_AP_ODD_MUSHROOM,
|
||||
/* 0x33 */ PLAYER_AP_ODD_POTION,
|
||||
/* 0x34 */ PLAYER_AP_SAW,
|
||||
/* 0x35 */ PLAYER_AP_SWORD_BROKEN,
|
||||
/* 0x36 */ PLAYER_AP_PRESCRIPTION,
|
||||
/* 0x37 */ PLAYER_AP_FROG,
|
||||
/* 0x38 */ PLAYER_AP_EYEDROPS,
|
||||
/* 0x39 */ PLAYER_AP_CLAIM_CHECK,
|
||||
/* 0x3A */ PLAYER_AP_MASK_KEATON,
|
||||
/* 0x3B */ PLAYER_AP_MASK_SKULL,
|
||||
/* 0x3C */ PLAYER_AP_MASK_SPOOKY,
|
||||
/* 0x3D */ PLAYER_AP_MASK_BUNNY,
|
||||
/* 0x3E */ PLAYER_AP_MASK_GORON,
|
||||
/* 0x3F */ PLAYER_AP_MASK_ZORA,
|
||||
/* 0x40 */ PLAYER_AP_MASK_GERUDO,
|
||||
/* 0x41 */ PLAYER_AP_MASK_TRUTH,
|
||||
/* 0x42 */ PLAYER_AP_LENS,
|
||||
/* 0x43 */ PLAYER_AP_MAX
|
||||
} PlayerActionParam;
|
||||
/* 0x00 */ PLAYER_IA_NONE,
|
||||
/* 0x01 */ PLAYER_IA_LAST_USED,
|
||||
/* 0x02 */ PLAYER_IA_FISHING_POLE,
|
||||
/* 0x03 */ PLAYER_IA_SWORD_MASTER,
|
||||
/* 0x04 */ PLAYER_IA_SWORD_KOKIRI,
|
||||
/* 0x05 */ PLAYER_IA_SWORD_BGS,
|
||||
/* 0x06 */ PLAYER_IA_STICK,
|
||||
/* 0x07 */ PLAYER_IA_HAMMER,
|
||||
/* 0x08 */ PLAYER_IA_BOW,
|
||||
/* 0x09 */ PLAYER_IA_BOW_FIRE,
|
||||
/* 0x0A */ PLAYER_IA_BOW_ICE,
|
||||
/* 0x0B */ PLAYER_IA_BOW_LIGHT,
|
||||
/* 0x0C */ PLAYER_IA_BOW_0C,
|
||||
/* 0x0D */ PLAYER_IA_BOW_0D,
|
||||
/* 0x0E */ PLAYER_IA_BOW_0E,
|
||||
/* 0x0F */ PLAYER_IA_SLINGSHOT,
|
||||
/* 0x10 */ PLAYER_IA_HOOKSHOT,
|
||||
/* 0x11 */ PLAYER_IA_LONGSHOT,
|
||||
/* 0x12 */ PLAYER_IA_BOMB,
|
||||
/* 0x13 */ PLAYER_IA_BOMBCHU,
|
||||
/* 0x14 */ PLAYER_IA_BOOMERANG,
|
||||
/* 0x15 */ PLAYER_IA_MAGIC_SPELL_15,
|
||||
/* 0x16 */ PLAYER_IA_MAGIC_SPELL_16,
|
||||
/* 0x17 */ PLAYER_IA_MAGIC_SPELL_17,
|
||||
/* 0x18 */ PLAYER_IA_FARORES_WIND,
|
||||
/* 0x19 */ PLAYER_IA_NAYRUS_LOVE,
|
||||
/* 0x1A */ PLAYER_IA_DINS_FIRE,
|
||||
/* 0x1B */ PLAYER_IA_NUT,
|
||||
/* 0x1C */ PLAYER_IA_OCARINA_FAIRY,
|
||||
/* 0x1D */ PLAYER_IA_OCARINA_TIME,
|
||||
/* 0x1E */ PLAYER_IA_BOTTLE,
|
||||
/* 0x1F */ PLAYER_IA_BOTTLE_FISH,
|
||||
/* 0x20 */ PLAYER_IA_BOTTLE_FIRE,
|
||||
/* 0x21 */ PLAYER_IA_BOTTLE_BUG,
|
||||
/* 0x22 */ PLAYER_IA_BOTTLE_POE,
|
||||
/* 0x23 */ PLAYER_IA_BOTTLE_BIG_POE,
|
||||
/* 0x24 */ PLAYER_IA_BOTTLE_LETTER,
|
||||
/* 0x25 */ PLAYER_IA_BOTTLE_POTION_RED,
|
||||
/* 0x26 */ PLAYER_IA_BOTTLE_POTION_BLUE,
|
||||
/* 0x27 */ PLAYER_IA_BOTTLE_POTION_GREEN,
|
||||
/* 0x28 */ PLAYER_IA_BOTTLE_MILK,
|
||||
/* 0x29 */ PLAYER_IA_BOTTLE_MILK_HALF,
|
||||
/* 0x2A */ PLAYER_IA_BOTTLE_FAIRY,
|
||||
/* 0x2B */ PLAYER_IA_LETTER_ZELDA,
|
||||
/* 0x2C */ PLAYER_IA_WEIRD_EGG,
|
||||
/* 0x2D */ PLAYER_IA_CHICKEN,
|
||||
/* 0x2E */ PLAYER_IA_BEAN,
|
||||
/* 0x2F */ PLAYER_IA_POCKET_EGG,
|
||||
/* 0x30 */ PLAYER_IA_POCKET_CUCCO,
|
||||
/* 0x31 */ PLAYER_IA_COJIRO,
|
||||
/* 0x32 */ PLAYER_IA_ODD_MUSHROOM,
|
||||
/* 0x33 */ PLAYER_IA_ODD_POTION,
|
||||
/* 0x34 */ PLAYER_IA_SAW,
|
||||
/* 0x35 */ PLAYER_IA_SWORD_BROKEN,
|
||||
/* 0x36 */ PLAYER_IA_PRESCRIPTION,
|
||||
/* 0x37 */ PLAYER_IA_FROG,
|
||||
/* 0x38 */ PLAYER_IA_EYEDROPS,
|
||||
/* 0x39 */ PLAYER_IA_CLAIM_CHECK,
|
||||
/* 0x3A */ PLAYER_IA_MASK_KEATON,
|
||||
/* 0x3B */ PLAYER_IA_MASK_SKULL,
|
||||
/* 0x3C */ PLAYER_IA_MASK_SPOOKY,
|
||||
/* 0x3D */ PLAYER_IA_MASK_BUNNY,
|
||||
/* 0x3E */ PLAYER_IA_MASK_GORON,
|
||||
/* 0x3F */ PLAYER_IA_MASK_ZORA,
|
||||
/* 0x40 */ PLAYER_IA_MASK_GERUDO,
|
||||
/* 0x41 */ PLAYER_IA_MASK_TRUTH,
|
||||
/* 0x42 */ PLAYER_IA_LENS,
|
||||
/* 0x43 */ PLAYER_IA_MAX
|
||||
} PlayerItemAction;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_LIMB_NONE,
|
||||
|
@ -469,10 +469,10 @@ typedef struct Player {
|
|||
/* 0x014E */ s8 currentShield; // current shield from `PlayerShield`
|
||||
/* 0x014F */ s8 currentBoots; // current boots from `PlayerBoots`
|
||||
/* 0x0150 */ s8 heldItemButton; // Button index for the item currently used
|
||||
/* 0x0151 */ s8 heldItemActionParam; // Action param for the item currently used
|
||||
/* 0x0151 */ s8 heldItemAction; // Item action for the item currently used
|
||||
/* 0x0152 */ u8 heldItemId; // Item id for the item currently used
|
||||
/* 0x0153 */ s8 prevBoots; // previous boots from `PlayerBoots`
|
||||
/* 0x0154 */ s8 itemActionParam; // the difference between this and heldItemActionParam is unclear
|
||||
/* 0x0154 */ s8 itemAction; // the difference between this and heldItemAction is unclear
|
||||
/* 0x0155 */ char unk_155[0x003];
|
||||
/* 0x0158 */ u8 modelGroup;
|
||||
/* 0x0159 */ u8 nextModelGroup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue