1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-10 02:54:24 +00:00

Rename "Sound" to "Sfx" (#1292)

* First attempt

* More

* rename

* more sound -> sfx / sound effect (#7)

* PR Suggestions

* PR Suggestions

* Small fix

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
engineer124 2022-07-30 07:05:27 -06:00 committed by GitHub
parent 1652b7e5d7
commit 1d19f37b26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
321 changed files with 2879 additions and 2904 deletions

View file

@ -502,7 +502,7 @@ void EnJj_Update(EnJj *this, PlayState *play) {
} else {
this->actionFunc(this);
if (this->skelAnime.curFrame == 41.0f) {
Audio_PlayActorSound2((Actor *) this, (u16)0x28B6U);
Audio_PlayActorSfx2((Actor *) this, (u16)0x28B6U);
}
}
func_80A87B1C(this);
@ -526,7 +526,7 @@ void EnJj_Update(Actor *thisx, PlayState *play) {
} else {
this->actionFunc(this, play);
if (this->skelAnime.curFrame == 41.0f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_JABJAB_GROAN);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_GROAN);
}
}
func_80A87B1C(this);
@ -687,7 +687,7 @@ void func_80A87D94(EnJj *this, PlayState *play) {
}
}
if ((phi_v1 & 1) != 0) {
Audio_PlayActorSound2((Actor *) this, (u16)0x206DU);
Audio_PlayActorSfx2((Actor *) this, (u16)0x206DU);
temp_v0_2 = this->unk_308;
if ((s32) temp_v0_2 >= -0x1450) {
this->unk_308 = temp_v0_2 - 0x66;
@ -763,7 +763,7 @@ void func_80A87D94(EnJj *this, PlayState *play) {
break;
}
if ((phi_v1 & 1) != 0) {
Audio_PlayActorSound2((Actor *) this, (u16)0x206DU);
Audio_PlayActorSfx2((Actor *) this, (u16)0x206DU);
temp_v0_2 = this->unk_308;
if ((s32) temp_v0_2 >= -0x1450) {
this->unk_308 = temp_v0_2 - 0x66;
@ -771,9 +771,9 @@ void func_80A87D94(EnJj *this, PlayState *play) {
}
}
```
(notice that this time we need a `default` to deal with the innermost if contents). If you try to replace `0x206D` in the `Audio_PlayActorSound2`, you will find there is no such sfxId in the list: this is because some sound effects have an extra offset of `0x800` to do with setting flags. Adding `0x800` to the sfxId shows that this sound effect is `NA_SE_EV_JABJAB_BREATHE`. To correct this to the id in the function, we have a macro `SFX_FLAG`, and it should therefore be
(notice that this time we need a `default` to deal with the innermost if contents). If you try to replace `0x206D` in the `Audio_PlayActorSfx2`, you will find there is no such sfxId in the list: this is because some sound effects have an extra offset of `0x800` to do with setting flags. Adding `0x800` to the sfxId shows that this sound effect is `NA_SE_EV_JABJAB_BREATHE`. To correct this to the id in the function, we have a macro `SFX_FLAG`, and it should therefore be
```C
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG);
```
As usual, most of the remaining temps look fake. The only one that does not is possibly `phi_v1`. However, the way in which they are used here makes it hard to tell if they are fake, and if so, how to replace them. I encourage you to try this yourself, with the aid of the diff script; the final, matching result, with other cleanup, is hidden below
@ -814,7 +814,7 @@ void func_80A87D94(EnJj* this, PlayState* play) {
break;
}
if ((this->unk_30A & 1) != 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG);
if (this->unk_308 >= -5200) {
this->unk_308 -= 102;
}

View file

@ -320,7 +320,7 @@ void EffectSsExtra_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* ac
void EffectSsFCircle_Spawn(PlayState* play, Actor* actor, Vec3f* pos, s16 radius, s16 height);
void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused,
s32 arg14, s16 playSound);
s32 arg14, s16 playSfx);
void EffectSsDeadDd_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 primR, s16 primG, s16 primB, s16 alpha, s16 envR, s16 envG, s16 envB, s16 alphaStep,
s32 life);
@ -443,7 +443,7 @@ void func_8002F71C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void func_8002F7DC(Actor* actor, u16 sfxId);
void Audio_PlayActorSound2(Actor* actor, u16 sfxId);
void Audio_PlayActorSfx2(Actor* actor, u16 sfxId);
void func_8002F850(PlayState* play, Actor* actor);
void func_8002F8F0(Actor* actor, u16 sfxId);
void func_8002F91C(Actor* actor, u16 sfxId);
@ -795,7 +795,7 @@ void CollisionCheck_SpawnRedBlood(PlayState* play, Vec3f* v);
void CollisionCheck_SpawnWaterDroplets(PlayState* play, Vec3f* v);
void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos);
void CollisionCheck_SpawnShieldParticlesMetalSfx(PlayState* play, Vec3f* v, Vec3f* pos);
void CollisionCheck_SpawnShieldParticlesMetal2(PlayState* play, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* actorPos);
s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* actorPos, Vec3f* itemPos,
@ -825,9 +825,9 @@ void Cutscene_HandleConditionalTriggers(PlayState* play);
void Cutscene_SetSegment(PlayState* play, void* segment);
void* MemCpy(void* dest, const void* src, s32 len);
void GetItem_Draw(PlayState* play, s16 drawId);
void SoundSource_InitAll(PlayState* play);
void SoundSource_UpdateAll(PlayState* play);
void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 duration, u16 sfxId);
void SfxSource_InitAll(PlayState* play);
void SfxSource_UpdateAll(PlayState* play);
void SfxSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 duration, u16 sfxId);
u16 ElfMessage_GetSariaText(PlayState* play);
u16 ElfMessage_GetCUpText(PlayState* play);
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet);
@ -1901,10 +1901,10 @@ void AudioOcarina_PlayLongScarecrowAfterCredits(void);
void AudioDebug_Draw(GfxPrint* printer);
void AudioDebug_ScrPrt(const char* str, u16 num);
void func_800F3054(void);
void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx);
void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIdx);
void Audio_PlayCutsceneEffectsSequence(u8 csEffectType);
void func_800F4010(Vec3f* pos, u16 sfxId, f32);
void Audio_PlaySoundRandom(Vec3f* pos, u16 baseSfxId, u8 randLim);
void Audio_PlaySfxRandom(Vec3f* pos, u16 baseSfxId, u8 randLim);
void func_800F4138(Vec3f* pos, u16 sfxId, f32);
void func_800F4190(Vec3f* pos, u16 sfxId);
void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2);
@ -1912,16 +1912,16 @@ void func_800F4414(Vec3f* pos, u16 sfxId, f32);
void func_800F44EC(s8 arg0, s8 arg1);
void func_800F4524(Vec3f* pos, u16 sfxId, s8 arg2);
void func_800F4254(Vec3f* pos, u8 level);
void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale);
void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale);
void Audio_PlaySfxRiver(Vec3f* pos, f32 freqScale);
void Audio_PlaySfxWaterfall(Vec3f* pos, f32 freqScale);
void func_800F47BC(void);
void func_800F47FC(void);
void func_800F483C(u8 targetVol, u8 volFadeTimer);
void Audio_SetGanonsTowerBgmVolumeLevel(u8 ganonsTowerLevel);
void Audio_LowerMainBgmVolume(u8 volume);
void Audio_PlaySoundIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones);
void Audio_PlaySfxIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones);
void Audio_ResetIncreasingTranspose(void);
void Audio_PlaySoundTransposed(Vec3f* pos, u16 sfxId, s8 semitone);
void Audio_PlaySfxTransposed(Vec3f* pos, u16 sfxId, s8 semitone);
void func_800F4C58(Vec3f* pos, u16 sfxId, u8);
void func_800F4E30(Vec3f* pos, f32);
void Audio_ClearSariaBgm(void);
@ -1953,7 +1953,7 @@ void func_800F6700(s8 audioSetting);
void Audio_SetBaseFilter(u8);
void Audio_SetExtraFilter(u8);
void Audio_SetCutsceneFlag(s8 flag);
void Audio_PlaySoundIfNotInCutscene(u16 sfxId);
void Audio_PlaySfxIfNotInCutscene(u16 sfxId);
void func_800F6964(u16);
void func_800F6AB0(u16);
// ? Audio_DisableAllSeq(?);
@ -1966,13 +1966,13 @@ void Audio_Init(void);
void Audio_InitSound(void);
void func_800F7170(void);
void func_800F71BC(s32 arg0);
void Audio_SetSoundBanksMute(u16 muteMask);
void Audio_SetSfxBanksMute(u16 muteMask);
void Audio_QueueSeqCmdMute(u8 channelIdx);
void Audio_ClearBGMMute(u8 channelIdx);
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd);
void Audio_ProcessSoundRequest(void);
void Audio_ChooseActiveSounds(u8 bankId);
void Audio_PlayActiveSounds(u8 bankId);
void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd);
void Audio_ProcessSfxRequest(void);
void Audio_ChooseActiveSfx(u8 bankId);
void Audio_PlayActiveSfx(u8 bankId);
void Audio_StopSfxByBank(u8 bankId);
void func_800F8884(u8 bankId, Vec3f* pos);
void Audio_StopSfxByPosAndBank(u8 bankId, Vec3f* pos);
@ -1982,10 +1982,10 @@ void Audio_QueueSeqCmd(u32 cmd);
void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId);
void Audio_StopSfxByTokenAndId(u8 token, u16 sfxId);
void Audio_StopSfxById(u32 sfxId);
void Audio_ProcessSoundRequests(void);
void Audio_ProcessSfxRequests(void);
void func_800F8F88(void);
u8 Audio_IsSfxPlaying(u32 sfxId);
void Audio_ResetSounds(void);
void Audio_ResetSfx(void);
void func_800F9474(u8, u16);
void func_800F94FC(u32);
void Audio_ProcessSeqCmd(u32);

View file

@ -9,7 +9,7 @@ typedef enum {
/* 4 */ BANK_SYSTEM,
/* 5 */ BANK_OCARINA,
/* 6 */ BANK_VOICE
} SoundBankType;
} SfxBankType;
typedef enum {
/* 0 */ SFX_STATE_EMPTY,
@ -39,7 +39,7 @@ typedef struct {
/* 0x2D */ u8 next;
/* 0x2E */ u8 channelIdx;
/* 0x2F */ u8 unk_2F;
} SoundBankEntry; // size = 0x30
} SfxBankEntry; // size = 0x30
/*
* SFX IDs
@ -89,9 +89,9 @@ typedef enum {
typedef struct {
u32 priority; // lower is more prioritized
u8 entryIndex;
} ActiveSound;
} ActiveSfx;
// SoundParams bit-packing
// SfxParams bit-packing
#define SFX_PARAM_01_SHIFT 0
#define SFX_PARAM_01_MASK (3 << SFX_PARAM_01_SHIFT)
@ -116,6 +116,6 @@ typedef struct {
typedef struct {
u8 importance;
u16 params;
} SoundParams;
} SfxParams;
#endif

View file

@ -129,7 +129,7 @@ extern f32 gDefaultPanVolume[128];
extern s16 gLowPassFilterData[16 * 8];
extern s16 gHighPassFilterData[15 * 8];
extern s32 gAudioContextInitalized;
extern u8 gIsLargeSoundBank[7];
extern u8 gIsLargeSfxBank[7];
extern u8 gChannelsPerBank[4][7];
extern u8 gUsedChannelsPerBank[4][7];
extern u8 gMorphaTransposeTable[16];
@ -137,13 +137,13 @@ extern u8* gFrogsSongPtr;
extern OcarinaNote* gScarecrowLongSongPtr;
extern u8* gScarecrowSpawnSongPtr;
extern OcarinaSongButtons gOcarinaSongButtons[];
extern SoundParams* gSoundParams[7];
extern SfxParams* gSfxParams[7];
extern char D_80133390[];
extern char D_80133398[];
extern u8 gSoundRequestWriteIndex;
extern u8 gSoundRequestReadIndex;
extern SoundBankEntry* gSoundBanks[7];
extern u8 gSoundBankSizes[];
extern u8 gSfxRequestWriteIndex;
extern u8 gSfxRequestReadIndex;
extern SfxBankEntry* gSfxBanks[7];
extern u8 gSfxBankSizes[];
extern u8 gSfxChannelLayout;
extern u16 D_801333D0;
extern Vec3f gSfxDefaultPos;
@ -208,15 +208,15 @@ extern volatile OSTime gRSPGFXTotalTime;
extern volatile OSTime gRSPOtherTotalTime;
extern volatile OSTime gRDPTotalTime;
extern SoundBankEntry D_8016BAD0[9];
extern SoundBankEntry D_8016BC80[12];
extern SoundBankEntry D_8016BEC0[22];
extern SoundBankEntry D_8016C2E0[20];
extern SoundBankEntry D_8016C6A0[8];
extern SoundBankEntry D_8016C820[3];
extern SoundBankEntry D_8016C8B0[5];
extern ActiveSound gActiveSounds[7][MAX_CHANNELS_PER_BANK]; // total size = 0xA8
extern u8 gSoundBankMuted[];
extern SfxBankEntry D_8016BAD0[9];
extern SfxBankEntry D_8016BC80[12];
extern SfxBankEntry D_8016BEC0[22];
extern SfxBankEntry D_8016C2E0[20];
extern SfxBankEntry D_8016C6A0[8];
extern SfxBankEntry D_8016C820[3];
extern SfxBankEntry D_8016C8B0[5];
extern ActiveSfx gActiveSfx[7][MAX_CHANNELS_PER_BANK]; // total size = 0xA8
extern u8 gSfxBankMuted[];
extern u16 gAudioSfxSwapSource[10];
extern u16 gAudioSfxSwapTarget[10];
extern u8 gAudioSfxSwapMode[10];

View file

@ -365,7 +365,7 @@ typedef struct {
/* 0x00 */ u16 countdown;
/* 0x04 */ Vec3f worldPos;
/* 0x10 */ Vec3f projectedPos;
} SoundSource; // size = 0x1C
} SfxSource; // size = 0x1C
typedef enum {
/* 0x00 */ SKYBOX_NONE,
@ -1151,7 +1151,7 @@ typedef struct PlayState {
/* 0x007C0 */ CollisionContext colCtx;
/* 0x01C24 */ ActorContext actorCtx;
/* 0x01D64 */ CutsceneContext csCtx; // "demo_play"
/* 0x01DB4 */ SoundSource soundSources[16];
/* 0x01DB4 */ SfxSource sfxSources[16];
/* 0x01F74 */ SramContext sramCtx;
/* 0x01F78 */ SkyboxContext skyboxCtx;
/* 0x020D8 */ MessageContext msgCtx; // "message"

View file

@ -189,7 +189,7 @@ typedef struct Actor {
/* 0x01C */ s16 params; // Configurable variable set by the actor's spawn data; original name: "args_data"
/* 0x01E */ s8 objBankIndex; // Object bank index of the actor's object dependency; original name: "bank"
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
/* 0x020 */ u16 sfx; // SFX ID to play. Sound plays when value is set, then is cleared the following update cycle
/* 0x020 */ u16 sfx; // SFX ID to play. Sfx plays when value is set, then is cleared the following update cycle
/* 0x024 */ PosRot world; // Position/rotation in the world
/* 0x038 */ PosRot focus; // Target reticle focuses on this position. For player this represents head pos and rot
/* 0x04C */ f32 targetArrowOffset; // Height offset of the target arrow relative to `focus` position

View file

@ -332,7 +332,7 @@ typedef enum {
#define BUMP_HOOKABLE (1 << 2) // Can be hooked if actor has hookability flags set.
#define BUMP_NO_AT_INFO (1 << 3) // Does not give its info to the AT collider that hit it.
#define BUMP_NO_DAMAGE (1 << 4) // Does not take damage.
#define BUMP_NO_SWORD_SFX (1 << 5) // Does not have a sound when hit by player-attached AT colliders.
#define BUMP_NO_SWORD_SFX (1 << 5) // Does not have a sound effect when hit by player-attached AT colliders.
#define BUMP_NO_HITMARK (1 << 6) // Skips hit effects.
#define BUMP_DRAW_HITMARK (1 << 7) // Draw hitmark for AC collision this frame.

4
spec
View file

@ -318,7 +318,7 @@ beginseg
include "build/src/code/z_demo.o"
include "build/src/code/code_80069420.o"
include "build/src/code/z_draw.o"
include "build/src/code/z_sound_source.o"
include "build/src/code/z_sfx_source.o"
include "build/src/code/z_elf_message.o"
include "build/src/code/z_face_reaction.o"
include "build/src/code/code_8006C3A0.o"
@ -423,7 +423,7 @@ beginseg
include "build/src/code/audio_effects.o"
include "build/src/code/audio_seqplayer.o"
include "build/src/code/code_800EC960.o"
include "build/src/code/audio_sound_params.o"
include "build/src/code/audio_sfx_params.o"
include "build/src/code/code_800F7260.o"
include "build/src/code/code_800F9280.o"
include "build/src/code/audio_external_data.o"

View file

@ -1,12 +1,12 @@
#include "ultra64.h"
#include "global.h"
// sSoundRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
u8 gSoundRequestWriteIndex = 0;
u8 gSoundRequestReadIndex = 0;
// sSfxRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
u8 gSfxRequestWriteIndex = 0;
u8 gSfxRequestReadIndex = 0;
/**
* Array of pointers to arrays of SoundBankEntry of sizes: 9, 12, 22, 20, 8, 3, 5
* Array of pointers to arrays of SfxBankEntry of sizes: 9, 12, 22, 20, 8, 3, 5
*
* 0 : Player Bank size 9
* 1 : Item Bank size 12
@ -16,11 +16,11 @@ u8 gSoundRequestReadIndex = 0;
* 5 : Ocarina Bank size 3
* 6 : Voice Bank size 5
*/
SoundBankEntry* gSoundBanks[7] = {
SfxBankEntry* gSfxBanks[7] = {
D_8016BAD0, D_8016BC80, D_8016BEC0, D_8016C2E0, D_8016C6A0, D_8016C820, D_8016C8B0,
};
u8 gSoundBankSizes[ARRAY_COUNT(gSoundBanks)] = {
u8 gSfxBankSizes[ARRAY_COUNT(gSfxBanks)] = {
ARRAY_COUNT(D_8016BAD0), ARRAY_COUNT(D_8016BC80), ARRAY_COUNT(D_8016BEC0), ARRAY_COUNT(D_8016C2E0),
ARRAY_COUNT(D_8016C6A0), ARRAY_COUNT(D_8016C820), ARRAY_COUNT(D_8016C8B0),
};

View file

@ -5,37 +5,37 @@
{ importance, ((((distParam) << SFX_PARAM_01_SHIFT) & SFX_PARAM_01_MASK) | \
(((randParam) << SFX_PARAM_67_SHIFT) & SFX_PARAM_67_MASK) | (flags)) },
SoundParams sEnemyBankParams[] = {
SfxParams sEnemyBankParams[] = {
#include "tables/sfx/enemybank_table.h"
};
SoundParams sPlayerBankParams[] = {
SfxParams sPlayerBankParams[] = {
#include "tables/sfx/playerbank_table.h"
};
SoundParams sItemBankParams[] = {
SfxParams sItemBankParams[] = {
#include "tables/sfx/itembank_table.h"
};
SoundParams sEnvBankParams[] = {
SfxParams sEnvBankParams[] = {
#include "tables/sfx/environmentbank_table.h"
};
SoundParams sSystemBankParams[] = {
SfxParams sSystemBankParams[] = {
#include "tables/sfx/systembank_table.h"
};
SoundParams sOcarinaBankParams[] = {
SfxParams sOcarinaBankParams[] = {
#include "tables/sfx/ocarinabank_table.h"
};
SoundParams sVoiceBankParams[] = {
SfxParams sVoiceBankParams[] = {
#include "tables/sfx/voicebank_table.h"
};
#undef DEFINE_SFX
SoundParams* gSoundParams[7] = {
SfxParams* gSfxParams[7] = {
sPlayerBankParams, sItemBankParams, sEnvBankParams, sEnemyBankParams,
sSystemBankParams, sOcarinaBankParams, sVoiceBankParams,
};

View file

@ -93,7 +93,7 @@ typedef struct {
s8 y;
} OcarinaStick;
u8 gIsLargeSoundBank[7] = { 0, 0, 0, 1, 0, 0, 0 };
u8 gIsLargeSfxBank[7] = { 0, 0, 0, 1, 0, 0, 0 };
// Only the first row of these is supported by sequence 0. (gSfxChannelLayout is always 0.)
u8 gChannelsPerBank[4][7] = {
@ -1739,8 +1739,8 @@ void AudioOcarina_PlayControllerInput(u8 unused) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 7, sOcarinaInstrumentId - 1);
// Sets pitch to io port 5
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5, sCurOcarinaPitch);
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sCurOcarinaBendFreq, &sRelativeOcarinaVolume,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sCurOcarinaBendFreq, &sRelativeOcarinaVolume,
&gSfxDefaultReverb);
} else if ((sPrevOcarinaPitch != OCARINA_PITCH_NONE) && (sCurOcarinaPitch == OCARINA_PITCH_NONE)) {
// Stops ocarina sound when transitioning from playing to not playing a note
Audio_StopSfxById(NA_SE_OC_OCARINA);
@ -1778,7 +1778,7 @@ void AudioOcarina_SetInstrument(u8 ocarinaInstrumentId) {
AudioOcarina_PlayControllerInput(false);
Audio_StopSfxById(NA_SE_OC_OCARINA);
Audio_SetSoundBanksMute(0);
Audio_SetSfxBanksMute(0);
sPlaybackState = 0;
sPlaybackStaffPos = 0;
sIsOcarinaInputEnabled = false;
@ -1912,8 +1912,8 @@ void AudioOcarina_PlaybackSong(void) {
// Sets sPlaybackPitch to channelIdx io port 5
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5,
sPlaybackPitch & 0x3F);
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sRelativeNotePlaybackBend,
&sRelativeNotePlaybackVolume, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sRelativeNotePlaybackBend,
&sRelativeNotePlaybackVolume, &gSfxDefaultReverb);
} else {
Audio_StopSfxById(NA_SE_OC_OCARINA);
}
@ -2276,7 +2276,7 @@ void AudioOcarina_PlayLongScarecrowAfterCredits(void) {
}
break;
case 1:
Audio_SetSoundBanksMute(0);
Audio_SetSfxBanksMute(0);
AudioOcarina_SetInstrument(sScarecrowAfterCreditsIntrumentId);
AudioOcarina_SetPlaybackSong(OCARINA_SONG_SCARECROW_LONG + 1, 1);
sScarecrowAfterCreditsIntrumentId++;
@ -2339,7 +2339,7 @@ char sAudioDebugPageNames[15][23] = {
};
u16 sAudioSndContWork[11] = { 0 };
u16 sAudioSndContWorkLims[11] = { 128, 128, 7, 512, 4, 2, 16, 32, 2, 2, 2 };
char sSoundBankNames[7][11] = { "PLAYER", "ITEM", "ENVIROMENT", "ENEMY", "SYSTEM", "OCARINA", "VOICE" };
char sSfxBankNames[7][11] = { "PLAYER", "ITEM", "ENVIROMENT", "ENEMY", "SYSTEM", "OCARINA", "VOICE" };
char sSoundModeNames[5][10] = { "W-STEREO", "HEADPHONE", "3D SOUND", "MONO", "" };
s8 sAudioIntInfoX = 0;
s8 sAudioIntInfoY = 0;
@ -2480,17 +2480,17 @@ void AudioDebug_Draw(GfxPrint* printer) {
GfxPrint_Printf(printer, "PUSH CONT-4 A-BTN");
ind = (s8)sAudioSndContWork[2];
i = gSoundBanks[ind][0].next;
i = gSfxBanks[ind][0].next;
j = 0;
SETCOL(255, 255, 255);
GfxPrint_SetPos(printer, 3, 6);
GfxPrint_Printf(printer, "SE HANDLE:%s", sSoundBankNames[ind]);
GfxPrint_Printf(printer, "SE HANDLE:%s", sSfxBankNames[ind]);
while (i != 0xFF) {
GfxPrint_SetPos(printer, 3, 7 + j++);
GfxPrint_Printf(printer, "%02x %04x %02x %08x", i, gSoundBanks[ind][i].sfxId, gSoundBanks[ind][i].state,
gSoundBanks[ind][i].priority);
i = gSoundBanks[ind][i].next;
GfxPrint_Printf(printer, "%02x %04x %02x %08x", i, gSfxBanks[ind][i].sfxId, gSfxBanks[ind][i].state,
gSfxBanks[ind][i].priority);
i = gSfxBanks[ind][i].next;
}
break;
@ -2507,7 +2507,7 @@ void AudioDebug_Draw(GfxPrint* printer) {
GfxPrint_Printf(printer, "Seq 1 : %2x", sAudioSndContWork[1]);
GfxPrint_SetPos(printer, 3, 6);
GfxPrint_Printf(printer, "SE HD : %2x %s", sAudioSndContWork[2], sSoundBankNames[sAudioSndContWork[2]]);
GfxPrint_Printf(printer, "SE HD : %2x %s", sAudioSndContWork[2], sSfxBankNames[sAudioSndContWork[2]]);
GfxPrint_SetPos(printer, 3, 7);
GfxPrint_Printf(printer, "SE No. :%3x", sAudioSndContWork[3]);
@ -2543,11 +2543,11 @@ void AudioDebug_Draw(GfxPrint* printer) {
SETCOL(255, 255, 255);
}
GfxPrint_SetPos(printer, 2 + sAudioIntInfoX, 4 + ind + sAudioIntInfoY);
GfxPrint_Printf(printer, "%s <%d>", sSoundBankNames[k], sAudioIntInfoBankPage[k]);
GfxPrint_Printf(printer, "%s <%d>", sSfxBankNames[k], sAudioIntInfoBankPage[k]);
for (k2 = 0; k2 < gChannelsPerBank[gSfxChannelLayout][k]; k2++) {
#define entryIndex (gActiveSounds[k][k2].entryIndex)
#define entry (&gSoundBanks[k][entryIndex])
#define entryIndex (gActiveSfx[k][k2].entryIndex)
#define entry (&gSfxBanks[k][entryIndex])
#define chan (gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[entry->channelIdx])
GfxPrint_SetPos(printer, 2 + sAudioIntInfoX, 5 + ind + sAudioIntInfoY);
if (sAudioIntInfoBankPage[k] == 1) {
@ -2613,25 +2613,25 @@ void AudioDebug_Draw(GfxPrint* printer) {
GfxPrint_Printf(printer, "Color : %d", sAudioScrPrtWork[2]);
GfxPrint_SetPos(printer, 3, 7);
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[0], sAudioScrPrtWork[3]);
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[0], sAudioScrPrtWork[3]);
GfxPrint_SetPos(printer, 3, 8);
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[1], sAudioScrPrtWork[4]);
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[1], sAudioScrPrtWork[4]);
GfxPrint_SetPos(printer, 3, 9);
GfxPrint_Printf(printer, "ENVRONM : %d", sAudioScrPrtWork[5]);
GfxPrint_SetPos(printer, 3, 10);
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[3], sAudioScrPrtWork[6]);
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[3], sAudioScrPrtWork[6]);
GfxPrint_SetPos(printer, 3, 11);
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[4], sAudioScrPrtWork[7]);
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[4], sAudioScrPrtWork[7]);
GfxPrint_SetPos(printer, 3, 12);
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[5], sAudioScrPrtWork[8]);
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[5], sAudioScrPrtWork[8]);
GfxPrint_SetPos(printer, 3, 13);
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[6], sAudioScrPrtWork[9]);
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[6], sAudioScrPrtWork[9]);
GfxPrint_SetPos(printer, 3, 14);
GfxPrint_Printf(printer, "SEQ ENT : %d", sAudioScrPrtWork[10]);
@ -3000,22 +3000,22 @@ void AudioDebug_Draw(GfxPrint* printer) {
SETCOL(255, 255, 255);
GfxPrint_SetPos(printer, 3, 4);
GfxPrint_Printf(printer, "SE HD : %02x %s", sAudioSfxParamChgWork[0],
sSoundBankNames[sAudioSfxParamChgWork[0]]);
sSfxBankNames[sAudioSfxParamChgWork[0]]);
GfxPrint_SetPos(printer, 3, 5);
GfxPrint_Printf(printer, "SE No. : %02x", sAudioSfxParamChgWork[1]);
GfxPrint_SetPos(printer, 20, 6);
GfxPrint_Printf(printer, " : %04x",
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params);
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params);
GfxPrint_SetPos(printer, 3, 6);
GfxPrint_Printf(
printer, "SE SW %s",
AudioDebug_ToStringBinary(gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params, 16));
AudioDebug_ToStringBinary(gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params, 16));
SETCOL(127, 255, 127);
digitStr[0] = (char)('0' + ((gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params >>
digitStr[0] = (char)('0' + ((gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params >>
(15 - sAudioSfxParamChgBitSel)) &
1));
GfxPrint_SetPos(printer, 12 + sAudioSfxParamChgBitSel, 6);
@ -3024,7 +3024,7 @@ void AudioDebug_Draw(GfxPrint* printer) {
SETCOL(255, 255, 255);
GfxPrint_SetPos(printer, 3, 7);
GfxPrint_Printf(printer, "SE PR : %02x",
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance);
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance);
break;
case PAGE_FREE_AREA:
@ -3161,9 +3161,9 @@ void AudioDebug_ProcessInput_SndCont(void) {
break;
case 2:
case 3:
Audio_PlaySoundGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG,
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG,
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
break;
case 4:
func_800F6700(sAudioSndContWork[sAudioSndContSel]);
@ -3185,7 +3185,7 @@ void AudioDebug_ProcessInput_SndCont(void) {
case 9:
break;
case 10:
Audio_SetSoundBanksMute(sAudioSndContWork[sAudioSndContSel] * 0x7F);
Audio_SetSfxBanksMute(sAudioSndContWork[sAudioSndContSel] * 0x7F);
break;
}
}
@ -3537,7 +3537,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
sAudioSfxParamChgWork[sAudioSfxParamChgSel] &= 0x1FF;
}
} else if (sAudioSfxParamChgSel == 3) {
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance -= step;
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance -= step;
} else {
sAudioSfxParamChgBitSel = (sAudioSfxParamChgBitSel - 1) & 0xF;
}
@ -3556,7 +3556,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
sAudioSfxParamChgWork[sAudioSfxParamChgSel] &= 0x1FF;
}
} else if (sAudioSfxParamChgSel == 3) {
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance += step;
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance += step;
} else {
sAudioSfxParamChgBitSel = (sAudioSfxParamChgBitSel + 1) & 0xF;
}
@ -3564,8 +3564,8 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
sfx = (u16)(sAudioSfxParamChgWork[0] << 12) + sAudioSfxParamChgWork[1] + SFX_FLAG;
Audio_PlaySoundGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
@ -3574,7 +3574,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
if (CHECK_BTN_ANY(sDebugPadPress, BTN_CDOWN)) {
if (sAudioSfxParamChgSel == 2) {
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params ^=
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params ^=
(1 << (0xF - sAudioSfxParamChgBitSel));
}
}
@ -3615,7 +3615,7 @@ void AudioDebug_ProcessInput(void) {
}
if (sAudioSfxMuted) {
Audio_SetSoundBanksMute(0x6F);
Audio_SetSfxBanksMute(0x6F);
}
if (CHECK_BTN_ANY(sDebugPadPress, BTN_L)) {
@ -3654,7 +3654,7 @@ void AudioDebug_ProcessInput(void) {
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
sAudioSfxMuted ^= 1;
if (!sAudioSfxMuted) {
Audio_SetSoundBanksMute(0);
Audio_SetSfxBanksMute(0);
}
}
break;
@ -3712,7 +3712,7 @@ void func_800F3054(void) {
if (gAudioSpecId == 7) {
Audio_ClearSariaBgm();
}
Audio_ProcessSoundRequests();
Audio_ProcessSfxRequests();
Audio_ProcessSeqCmds();
func_800F8F88();
func_800FA3DC();
@ -3734,8 +3734,8 @@ void func_800F314C(s8 arg0) {
Audio_QueueCmdS32(0x82 << 24 | SEQ_PLAYER_BGM_MAIN << 16 | (((u8)arg0 & 0xFF) << 8), 1);
}
f32 Audio_ComputeSoundVolume(u8 bankId, u8 entryIdx) {
SoundBankEntry* bankEntry = &gSoundBanks[bankId][entryIdx];
f32 Audio_ComputeSfxVolume(u8 bankId, u8 entryIdx) {
SfxBankEntry* bankEntry = &gSfxBanks[bankId][entryIdx];
f32 minDist;
f32 baseDist;
f32 ret;
@ -3779,10 +3779,10 @@ f32 Audio_ComputeSoundVolume(u8 bankId, u8 entryIdx) {
return ret;
}
s8 Audio_ComputeSoundReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
s8 Audio_ComputeSfxReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
s8 distAdd = 0;
s32 scriptAdd = 0;
SoundBankEntry* entry = &gSoundBanks[bankId][entryIdx];
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
s32 reverb;
if (!(entry->sfxParams & SFX_FLAG_12)) {
@ -3812,7 +3812,7 @@ s8 Audio_ComputeSoundReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
return reverb;
}
s8 Audio_ComputeSoundPanSigned(f32 x, f32 z, u8 token) {
s8 Audio_ComputeSfxPanSigned(f32 x, f32 z, u8 token) {
f32 absX;
f32 absZ;
f32 pan;
@ -3855,9 +3855,9 @@ s8 Audio_ComputeSoundPanSigned(f32 x, f32 z, u8 token) {
return (s8)((pan * 127.0f) + 0.5f);
}
f32 Audio_ComputeSoundFreqScale(u8 bankId, u8 entryIdx) {
f32 Audio_ComputeSfxFreqScale(u8 bankId, u8 entryIdx) {
s32 phi_v0 = 0;
SoundBankEntry* entry = &gSoundBanks[bankId][entryIdx];
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
f32 unk1C;
f32 freq = 1.0f;
@ -3908,7 +3908,7 @@ f32 Audio_ComputeSoundFreqScale(u8 bankId, u8 entryIdx) {
return freq;
}
u8 func_800F37B8(f32 behindScreenZ, SoundBankEntry* arg1, s8 arg2) {
u8 func_800F37B8(f32 behindScreenZ, SfxBankEntry* arg1, s8 arg2) {
s8 phi_v0;
u8 phi_v1;
f32 phi_f0;
@ -3968,7 +3968,7 @@ s8 func_800F3990(f32 arg0, u16 sfxParams) {
return ret | 1;
}
void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
f32 vol = 1.0f;
s8 volS8;
s8 reverb = 0;
@ -3979,7 +3979,7 @@ void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
s8 sp38 = 0;
f32 behindScreenZ;
u8 baseFilter = 0;
SoundBankEntry* entry = &gSoundBanks[bankId][entryIdx];
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
switch (bankId) {
case BANK_PLAYER:
@ -3993,10 +3993,10 @@ void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
FALLTHROUGH;
case BANK_OCARINA:
entry->dist = sqrtf(entry->dist);
vol = Audio_ComputeSoundVolume(bankId, entryIdx) * *entry->vol;
reverb = Audio_ComputeSoundReverb(bankId, entryIdx, channelIdx);
panSigned = Audio_ComputeSoundPanSigned(*entry->posX, *entry->posZ, entry->token);
freqScale = Audio_ComputeSoundFreqScale(bankId, entryIdx) * *entry->freqScale;
vol = Audio_ComputeSfxVolume(bankId, entryIdx) * *entry->vol;
reverb = Audio_ComputeSfxReverb(bankId, entryIdx, channelIdx);
panSigned = Audio_ComputeSfxPanSigned(*entry->posX, *entry->posZ, entry->token);
freqScale = Audio_ComputeSfxFreqScale(bankId, entryIdx) * *entry->freqScale;
if (sSoundMode == SOUNDMODE_SURROUND) {
behindScreenZ = sBehindScreenZ[(entry->sfxParams & SFX_FLAG_10) >> SFX_FLAG_10_SHIFT];
@ -4092,7 +4092,7 @@ void Audio_ResetSfxChannelState(void) {
}
void Audio_PlayCutsceneEffectsSequence(u8 csEffectType) {
if (gSoundBankMuted[0] != 1) {
if (gSfxBankMuted[0] != 1) {
Audio_StartSeq(SEQ_PLAYER_BGM_SUB, 0, NA_BGM_CUTSCENE_EFFECTS);
Audio_SeqCmd8(SEQ_PLAYER_BGM_SUB, 0, 0, csEffectType);
}
@ -4120,7 +4120,7 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
D_80131C8C = arg2;
sp24 = func_800F3F84(arg2);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
if ((sfxId & 0xF0) == 0xB0) {
phi_f0 = 0.3f;
@ -4138,23 +4138,23 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
sfxId2 = NA_SE_PL_METALEFFECT_KID;
}
D_8016B7AC = (sp24 * 0.7) + 0.3;
Audio_PlaySoundGeneral(sfxId2, pos, 4, &D_8016B7B0, &D_8016B7AC, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId2, pos, 4, &D_8016B7B0, &D_8016B7AC, &gSfxDefaultReverb);
}
}
void func_800F4138(Vec3f* pos, u16 sfxId, f32 arg2) {
func_800F3F84(arg2);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
}
void func_800F4190(Vec3f* pos, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801305B0, &gSfxDefaultFreqAndVolScale, &D_801305B4);
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_801305B0, &gSfxDefaultFreqAndVolScale, &D_801305B4);
}
void Audio_PlaySoundRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) {
void Audio_PlaySfxRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) {
u8 offset = Audio_NextRandom() % randLim;
Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void func_800F4254(Vec3f* pos, u8 level) {
@ -4163,12 +4163,12 @@ void func_800F4254(Vec3f* pos, u8 level) {
D_801305F4 = D_801305E4[level];
switch (level) {
case 1:
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
break;
case 2:
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
break;
}
@ -4176,8 +4176,8 @@ void func_800F4254(Vec3f* pos, u8 level) {
}
if (level != 0) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
@ -4189,14 +4189,14 @@ void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2) {
}
if (D_8016B7D8 > 0.5f) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
void func_800F4414(Vec3f* pos, u16 sfxId, f32 arg2) {
D_801305B8--;
if (D_801305B8 == 0) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (arg2 > 2.0f) {
arg2 = 2.0f;
@ -4213,12 +4213,12 @@ void func_800F44EC(s8 arg0, s8 arg1) {
void func_800F4524(Vec3f* pos, u16 sfxId, s8 arg2) {
D_8016B7DC = arg2;
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &D_8016B7DC);
Audio_PlaySfxGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &D_8016B7DC);
}
void func_800F4578(Vec3f* pos, u16 sfxId, f32 arg2) {
D_8016B7E0 = arg2;
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &D_8016B7E0, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &D_8016B7E0, &gSfxDefaultReverb);
}
void func_800F45D0(f32 arg0) {
@ -4226,7 +4226,7 @@ void func_800F45D0(f32 arg0) {
func_800F436C(&gSfxDefaultPos, 0, (0.15f * arg0) + 1.4f);
}
void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) {
void Audio_PlaySfxRiver(Vec3f* pos, f32 freqScale) {
if (!Audio_IsSfxPlaying(NA_SE_EV_RIVER_STREAM - SFX_FLAG)) {
sRiverFreqScaleLerp.value = freqScale;
} else if (freqScale != sRiverFreqScaleLerp.value) {
@ -4234,11 +4234,11 @@ void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) {
sRiverFreqScaleLerp.remainingFrames = 40;
sRiverFreqScaleLerp.step = (sRiverFreqScaleLerp.target - sRiverFreqScaleLerp.value) / 40;
}
Audio_PlaySoundGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) {
void Audio_PlaySfxWaterfall(Vec3f* pos, f32 freqScale) {
if (!Audio_IsSfxPlaying(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG)) {
sWaterfallFreqScaleLerp.value = freqScale;
} else if (freqScale != sWaterfallFreqScaleLerp.value) {
@ -4246,8 +4246,8 @@ void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) {
sWaterfallFreqScaleLerp.remainingFrames = 40;
sWaterfallFreqScaleLerp.step = (sWaterfallFreqScaleLerp.target - sWaterfallFreqScaleLerp.value) / 40;
}
Audio_PlaySoundGeneral(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value,
&sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value,
&sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb);
}
void Audio_StepFreqLerp(FreqLerp* lerp) {
@ -4389,9 +4389,9 @@ void Audio_UpdateRiverSoundVolumes(void) {
}
}
void Audio_PlaySoundIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &gPitchFrequencies[semitones[sAudioIncreasingTranspose] + 39],
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
void Audio_PlaySfxIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) {
Audio_PlaySfxGeneral(sfxId, pos, 4, &gPitchFrequencies[semitones[sAudioIncreasingTranspose] + 39],
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sAudioIncreasingTranspose < 15) {
sAudioIncreasingTranspose++;
@ -4402,9 +4402,9 @@ void Audio_ResetIncreasingTranspose(void) {
sAudioIncreasingTranspose = 0;
}
void Audio_PlaySoundTransposed(Vec3f* pos, u16 sfxId, s8 semitone) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &gPitchFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
void Audio_PlaySfxTransposed(Vec3f* pos, u16 sfxId, s8 semitone) {
Audio_PlaySfxGeneral(sfxId, pos, 4, &gPitchFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) {
@ -4418,14 +4418,14 @@ void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) {
}
for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) {
if ((gActiveSounds[bankId][i].entryIndex != 0xFF) &&
(sfxId == gSoundBanks[bankId][gActiveSounds[bankId][i].entryIndex].sfxId)) {
if ((gActiveSfx[bankId][i].entryIndex != 0xFF) &&
(sfxId == gSfxBanks[bankId][gActiveSfx[bankId][i].entryIndex].sfxId)) {
Audio_QueueCmdS8(
_SHIFTL(0x6, 24, 8) | _SHIFTL(SEQ_PLAYER_SFX, 16, 8) | _SHIFTL(phi_s1, 8, 8) | _SHIFTL(6, 0, 8), arg2);
}
phi_s1++;
}
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void func_800F4E30(Vec3f* pos, f32 arg1) {
@ -4958,12 +4958,12 @@ void func_800F6268(f32 dist, u16 arg1) {
void func_800F64E0(u8 arg0) {
D_80130608 = arg0;
if (arg0 != 0) {
Audio_PlaySoundGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_QueueCmdS32(0xF1000000, 0);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_QueueCmdS32(0xF2000000, 0);
}
}
@ -5044,8 +5044,8 @@ void Audio_SetBaseFilter(u8 filter) {
if (filter == 0) {
Audio_StopSfxById(NA_SE_PL_IN_BUBBLE);
} else if (sAudioBaseFilter == 0) {
Audio_PlaySoundGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
sAudioBaseFilter = filter;
@ -5071,15 +5071,15 @@ void Audio_SetCutsceneFlag(s8 flag) {
sAudioCutsceneFlag = flag;
}
void Audio_PlaySoundGeneralIfNotInCutscene(u16 sfxId, Vec3f* pos, u8 arg2, f32* freqScale, f32* arg4, s8* reverbAdd) {
void Audio_PlaySfxGeneralIfNotInCutscene(u16 sfxId, Vec3f* pos, u8 arg2, f32* freqScale, f32* arg4, s8* reverbAdd) {
if (!sAudioCutsceneFlag) {
Audio_PlaySoundGeneral(sfxId, pos, arg2, freqScale, arg4, reverbAdd);
Audio_PlaySfxGeneral(sfxId, pos, arg2, freqScale, arg4, reverbAdd);
}
}
void Audio_PlaySoundIfNotInCutscene(u16 sfxId) {
Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
void Audio_PlaySfxIfNotInCutscene(u16 sfxId) {
Audio_PlaySfxGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void func_800F6964(u16 arg0) {
@ -5272,7 +5272,7 @@ void Audio_InitSound(void) {
AudioOcarina_ResetStaffs();
Audio_ResetSfxChannelState();
func_800FAEB4();
Audio_ResetSounds();
Audio_ResetSfx();
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 10);
}
@ -5289,7 +5289,7 @@ void func_800F71BC(s32 arg0) {
AudioOcarina_ResetStaffs();
Audio_ResetSfxChannelState();
func_800FADF8();
Audio_ResetSounds();
Audio_ResetSfx();
}
void func_800F7208(void) {

View file

@ -9,7 +9,7 @@ typedef struct {
/* 0x0C */ f32* freqScale;
/* 0x10 */ f32* vol;
/* 0x14 */ s8* reverbAdd;
} SoundRequest; // size = 0x18
} SfxRequest; // size = 0x18
typedef struct {
/* 0x00 */ f32 value;
@ -18,33 +18,33 @@ typedef struct {
/* 0x0C */ u16 remainingFrames;
} UnusedBankLerp; // size = 0x10
SoundBankEntry D_8016BAD0[9];
SoundBankEntry D_8016BC80[12];
SoundBankEntry D_8016BEC0[22];
SoundBankEntry D_8016C2E0[20];
SoundBankEntry D_8016C6A0[8];
SoundBankEntry D_8016C820[3];
SoundBankEntry D_8016C8B0[5];
SoundRequest sSoundRequests[0x100];
u8 sSoundBankListEnd[7];
u8 sSoundBankFreeListStart[7];
u8 sSoundBankUnused[7];
ActiveSound gActiveSounds[7][3];
SfxBankEntry D_8016BAD0[9];
SfxBankEntry D_8016BC80[12];
SfxBankEntry D_8016BEC0[22];
SfxBankEntry D_8016C2E0[20];
SfxBankEntry D_8016C6A0[8];
SfxBankEntry D_8016C820[3];
SfxBankEntry D_8016C8B0[5];
SfxRequest sSfxRequests[0x100];
u8 sSfxBankListEnd[7];
u8 sSfxBankFreeListStart[7];
u8 sSfxBankUnused[7];
ActiveSfx gActiveSfx[7][3];
u8 sCurSfxPlayerChannelIdx;
u8 gSoundBankMuted[7];
u8 gSfxBankMuted[7];
UnusedBankLerp sUnusedBankLerp[7];
u16 gAudioSfxSwapSource[10];
u16 gAudioSfxSwapTarget[10];
u8 gAudioSfxSwapMode[10];
void Audio_SetSoundBanksMute(u16 muteMask) {
void Audio_SetSfxBanksMute(u16 muteMask) {
u8 bankId;
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
if (muteMask & 1) {
gSoundBankMuted[bankId] = true;
gSfxBankMuted[bankId] = true;
} else {
gSoundBankMuted[bankId] = false;
gSfxBankMuted[bankId] = false;
}
muteMask = muteMask >> 1;
}
@ -64,12 +64,12 @@ void Audio_ClearBGMMute(u8 channelIdx) {
}
}
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd) {
void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd) {
u8 i;
SoundRequest* req;
SfxRequest* req;
if (!gSoundBankMuted[SFX_BANK_SHIFT(sfxId)]) {
req = &sSoundRequests[gSoundRequestWriteIndex];
if (!gSfxBankMuted[SFX_BANK_SHIFT(sfxId)]) {
req = &sSfxRequests[gSfxRequestWriteIndex];
if (!gAudioSfxSwapOff) {
for (i = 0; i < 10; i++) {
if (sfxId == gAudioSfxSwapSource[i]) {
@ -82,8 +82,8 @@ void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32
req->freqScale = freqScale;
req->vol = vol;
req->reverbAdd = reverbAdd;
gSoundRequestWriteIndex++;
req = &sSoundRequests[gSoundRequestWriteIndex];
gSfxRequestWriteIndex++;
req = &sSfxRequests[gSfxRequestWriteIndex];
}
i = 10; // "break;"
}
@ -95,18 +95,18 @@ void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32
req->freqScale = freqScale;
req->vol = vol;
req->reverbAdd = reverbAdd;
gSoundRequestWriteIndex++;
gSfxRequestWriteIndex++;
}
}
void Audio_RemoveMatchingSoundRequests(u8 aspect, SoundBankEntry* cmp) {
SoundRequest* req;
void Audio_RemoveMatchingSfxRequests(u8 aspect, SfxBankEntry* cmp) {
SfxRequest* req;
s32 remove;
u8 i = gSoundRequestReadIndex;
u8 i = gSfxRequestReadIndex;
for (; i != gSoundRequestWriteIndex; i++) {
for (; i != gSfxRequestWriteIndex; i++) {
remove = false;
req = &sSoundRequests[i];
req = &sSfxRequests[i];
switch (aspect) {
case 0:
if (SFX_BANK_MASK(req->sfxId) == SFX_BANK_MASK(cmp->sfxId)) {
@ -145,18 +145,18 @@ void Audio_RemoveMatchingSoundRequests(u8 aspect, SoundBankEntry* cmp) {
}
}
void Audio_ProcessSoundRequest(void) {
void Audio_ProcessSfxRequest(void) {
u16 sfxId;
u8 count;
u8 index;
SoundRequest* req;
SoundBankEntry* entry;
SoundParams* soundParams;
SfxRequest* req;
SfxBankEntry* entry;
SfxParams* sfxParams;
s32 bankId;
u8 evictImportance;
u8 evictIndex;
req = &sSoundRequests[gSoundRequestReadIndex];
req = &sSfxRequests[gSfxRequestReadIndex];
evictIndex = 0x80;
if (req->sfxId == 0) {
return;
@ -167,29 +167,29 @@ void Audio_ProcessSoundRequest(void) {
bankId = SFX_BANK(req->sfxId);
}
count = 0;
index = gSoundBanks[bankId][0].next;
index = gSfxBanks[bankId][0].next;
while (index != 0xFF && index != 0) {
if (gSoundBanks[bankId][index].posX == &req->pos->x) {
if ((gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].params & SFX_FLAG_5) &&
gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance ==
gSoundBanks[bankId][index].sfxImportance) {
if (gSfxBanks[bankId][index].posX == &req->pos->x) {
if ((gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].params & SFX_FLAG_5) &&
gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance ==
gSfxBanks[bankId][index].sfxImportance) {
return;
}
if (gSoundBanks[bankId][index].sfxId == req->sfxId) {
if (gSfxBanks[bankId][index].sfxId == req->sfxId) {
count = gUsedChannelsPerBank[gSfxChannelLayout][bankId];
} else {
if (count == 0) {
evictIndex = index;
sfxId = gSoundBanks[bankId][index].sfxId & 0xFFFF;
evictImportance = gSoundParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
} else if (gSoundBanks[bankId][index].sfxImportance < evictImportance) {
sfxId = gSfxBanks[bankId][index].sfxId & 0xFFFF;
evictImportance = gSfxParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
} else if (gSfxBanks[bankId][index].sfxImportance < evictImportance) {
evictIndex = index;
sfxId = gSoundBanks[bankId][index].sfxId & 0xFFFF;
evictImportance = gSoundParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
sfxId = gSfxBanks[bankId][index].sfxId & 0xFFFF;
evictImportance = gSfxParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
}
count++;
if (count == gUsedChannelsPerBank[gSfxChannelLayout][bankId]) {
if (gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance >= evictImportance) {
if (gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance >= evictImportance) {
index = evictIndex;
} else {
index = 0;
@ -197,34 +197,34 @@ void Audio_ProcessSoundRequest(void) {
}
}
if (count == gUsedChannelsPerBank[gSfxChannelLayout][bankId]) {
soundParams = &gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
if ((req->sfxId & 0xC00) || (soundParams->params & SFX_FLAG_2) || (index == evictIndex)) {
if ((gSoundBanks[bankId][index].sfxParams & SFX_FLAG_3) &&
gSoundBanks[bankId][index].state != SFX_STATE_QUEUED) {
Audio_ClearBGMMute(gSoundBanks[bankId][index].channelIdx);
sfxParams = &gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
if ((req->sfxId & 0xC00) || (sfxParams->params & SFX_FLAG_2) || (index == evictIndex)) {
if ((gSfxBanks[bankId][index].sfxParams & SFX_FLAG_3) &&
gSfxBanks[bankId][index].state != SFX_STATE_QUEUED) {
Audio_ClearBGMMute(gSfxBanks[bankId][index].channelIdx);
}
gSoundBanks[bankId][index].token = req->token;
gSoundBanks[bankId][index].sfxId = req->sfxId;
gSoundBanks[bankId][index].state = SFX_STATE_QUEUED;
gSoundBanks[bankId][index].freshness = 2;
gSoundBanks[bankId][index].freqScale = req->freqScale;
gSoundBanks[bankId][index].vol = req->vol;
gSoundBanks[bankId][index].reverbAdd = req->reverbAdd;
gSoundBanks[bankId][index].sfxParams = soundParams->params;
gSoundBanks[bankId][index].sfxImportance = soundParams->importance;
} else if (gSoundBanks[bankId][index].state == SFX_STATE_PLAYING_2) {
gSoundBanks[bankId][index].state = SFX_STATE_PLAYING_1;
gSfxBanks[bankId][index].token = req->token;
gSfxBanks[bankId][index].sfxId = req->sfxId;
gSfxBanks[bankId][index].state = SFX_STATE_QUEUED;
gSfxBanks[bankId][index].freshness = 2;
gSfxBanks[bankId][index].freqScale = req->freqScale;
gSfxBanks[bankId][index].vol = req->vol;
gSfxBanks[bankId][index].reverbAdd = req->reverbAdd;
gSfxBanks[bankId][index].sfxParams = sfxParams->params;
gSfxBanks[bankId][index].sfxImportance = sfxParams->importance;
} else if (gSfxBanks[bankId][index].state == SFX_STATE_PLAYING_2) {
gSfxBanks[bankId][index].state = SFX_STATE_PLAYING_1;
}
index = 0;
}
}
if (index != 0) {
index = gSoundBanks[bankId][index].next;
index = gSfxBanks[bankId][index].next;
}
}
if (gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].next != 0xFF && index != 0) {
index = sSoundBankFreeListStart[bankId];
entry = &gSoundBanks[bankId][index];
if (gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next != 0xFF && index != 0) {
index = sSfxBankFreeListStart[bankId];
entry = &gSfxBanks[bankId][index];
entry->posX = &req->pos->x;
entry->posY = &req->pos->y;
entry->posZ = &req->pos->z;
@ -232,85 +232,85 @@ void Audio_ProcessSoundRequest(void) {
entry->freqScale = req->freqScale;
entry->vol = req->vol;
entry->reverbAdd = req->reverbAdd;
soundParams = &gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
entry->sfxParams = soundParams->params;
entry->sfxImportance = soundParams->importance;
sfxParams = &gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
entry->sfxParams = sfxParams->params;
entry->sfxImportance = sfxParams->importance;
entry->sfxId = req->sfxId;
entry->state = SFX_STATE_QUEUED;
entry->freshness = 2;
entry->prev = sSoundBankListEnd[bankId];
gSoundBanks[bankId][sSoundBankListEnd[bankId]].next = sSoundBankFreeListStart[bankId];
sSoundBankListEnd[bankId] = sSoundBankFreeListStart[bankId];
sSoundBankFreeListStart[bankId] = gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].next;
gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].prev = 0xFF;
entry->prev = sSfxBankListEnd[bankId];
gSfxBanks[bankId][sSfxBankListEnd[bankId]].next = sSfxBankFreeListStart[bankId];
sSfxBankListEnd[bankId] = sSfxBankFreeListStart[bankId];
sSfxBankFreeListStart[bankId] = gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next;
gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].prev = 0xFF;
entry->next = 0xFF;
}
}
void Audio_RemoveSoundBankEntry(u8 bankId, u8 entryIndex) {
SoundBankEntry* entry = &gSoundBanks[bankId][entryIndex];
void Audio_RemoveSfxBankEntry(u8 bankId, u8 entryIndex) {
SfxBankEntry* entry = &gSfxBanks[bankId][entryIndex];
u8 i;
if (entry->sfxParams & SFX_FLAG_3) {
Audio_ClearBGMMute(entry->channelIdx);
}
if (entryIndex == sSoundBankListEnd[bankId]) {
sSoundBankListEnd[bankId] = entry->prev;
if (entryIndex == sSfxBankListEnd[bankId]) {
sSfxBankListEnd[bankId] = entry->prev;
} else {
gSoundBanks[bankId][entry->next].prev = entry->prev;
gSfxBanks[bankId][entry->next].prev = entry->prev;
}
gSoundBanks[bankId][entry->prev].next = entry->next;
entry->next = sSoundBankFreeListStart[bankId];
gSfxBanks[bankId][entry->prev].next = entry->next;
entry->next = sSfxBankFreeListStart[bankId];
entry->prev = 0xFF;
gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].prev = entryIndex;
sSoundBankFreeListStart[bankId] = entryIndex;
gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].prev = entryIndex;
sSfxBankFreeListStart[bankId] = entryIndex;
entry->state = SFX_STATE_EMPTY;
for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) {
if (gActiveSounds[bankId][i].entryIndex == entryIndex) {
gActiveSounds[bankId][i].entryIndex = 0xFF;
if (gActiveSfx[bankId][i].entryIndex == entryIndex) {
gActiveSfx[bankId][i].entryIndex = 0xFF;
i = gChannelsPerBank[gSfxChannelLayout][bankId];
}
}
}
void Audio_ChooseActiveSounds(u8 bankId) {
u8 numChosenSounds;
void Audio_ChooseActiveSfx(u8 bankId) {
u8 numChosenSfx;
u8 numChannels;
u8 entryIndex;
u8 i;
u8 j;
u8 k;
u8 sfxImportance;
u8 needNewSound;
u8 needNewSfx;
u8 chosenEntryIndex;
u16 temp3;
f32 tempf1;
SoundBankEntry* entry;
ActiveSound chosenSounds[MAX_CHANNELS_PER_BANK];
ActiveSound* activeSound;
SfxBankEntry* entry;
ActiveSfx chosenSfx[MAX_CHANNELS_PER_BANK];
ActiveSfx* activeSfx;
s32 pad;
numChosenSounds = 0;
numChosenSfx = 0;
for (i = 0; i < MAX_CHANNELS_PER_BANK; i++) {
chosenSounds[i].priority = 0x7FFFFFFF;
chosenSounds[i].entryIndex = 0xFF;
chosenSfx[i].priority = 0x7FFFFFFF;
chosenSfx[i].entryIndex = 0xFF;
}
entryIndex = gSoundBanks[bankId][0].next;
entryIndex = gSfxBanks[bankId][0].next;
k = 0;
while (entryIndex != 0xFF) {
if ((gSoundBanks[bankId][entryIndex].state == SFX_STATE_QUEUED) &&
(gSoundBanks[bankId][entryIndex].sfxId & 0xC00)) {
gSoundBanks[bankId][entryIndex].freshness--;
} else if (!(gSoundBanks[bankId][entryIndex].sfxId & 0xC00) &&
(gSoundBanks[bankId][entryIndex].state == SFX_STATE_PLAYING_2)) {
Audio_QueueCmdS8((gSoundBanks[bankId][entryIndex].channelIdx << 8) | 0x6020000, 0);
Audio_RemoveSoundBankEntry(bankId, entryIndex);
if ((gSfxBanks[bankId][entryIndex].state == SFX_STATE_QUEUED) &&
(gSfxBanks[bankId][entryIndex].sfxId & 0xC00)) {
gSfxBanks[bankId][entryIndex].freshness--;
} else if (!(gSfxBanks[bankId][entryIndex].sfxId & 0xC00) &&
(gSfxBanks[bankId][entryIndex].state == SFX_STATE_PLAYING_2)) {
Audio_QueueCmdS8((gSfxBanks[bankId][entryIndex].channelIdx << 8) | 0x6020000, 0);
Audio_RemoveSfxBankEntry(bankId, entryIndex);
}
if (gSoundBanks[bankId][entryIndex].freshness == 0) {
Audio_RemoveSoundBankEntry(bankId, entryIndex);
} else if (gSoundBanks[bankId][entryIndex].state != SFX_STATE_EMPTY) {
entry = &gSoundBanks[bankId][entryIndex];
if (gSfxBanks[bankId][entryIndex].freshness == 0) {
Audio_RemoveSfxBankEntry(bankId, entryIndex);
} else if (gSfxBanks[bankId][entryIndex].state != SFX_STATE_EMPTY) {
entry = &gSfxBanks[bankId][entryIndex];
if (&gSfxDefaultPos.x == entry[0].posX) {
entry->dist = 0.0f;
@ -338,33 +338,33 @@ void Audio_ChooseActiveSounds(u8 bankId) {
if (entry->state == SFX_STATE_PLAYING_1) {
Audio_QueueCmdS8((entry->channelIdx << 8) | 0x6020000, 0);
if (entry->sfxId & 0xC00) {
Audio_RemoveSoundBankEntry(bankId, entryIndex);
Audio_RemoveSfxBankEntry(bankId, entryIndex);
entryIndex = k;
}
}
} else {
numChannels = gChannelsPerBank[gSfxChannelLayout][bankId];
for (i = 0; i < numChannels; i++) {
if (chosenSounds[i].priority >= entry->priority) {
if (numChosenSounds < gChannelsPerBank[gSfxChannelLayout][bankId]) {
numChosenSounds++;
if (chosenSfx[i].priority >= entry->priority) {
if (numChosenSfx < gChannelsPerBank[gSfxChannelLayout][bankId]) {
numChosenSfx++;
}
for (j = numChannels - 1; j > i; j--) {
chosenSounds[j].priority = chosenSounds[j - 1].priority;
chosenSounds[j].entryIndex = chosenSounds[j - 1].entryIndex;
chosenSfx[j].priority = chosenSfx[j - 1].priority;
chosenSfx[j].entryIndex = chosenSfx[j - 1].entryIndex;
}
chosenSounds[i].priority = entry->priority;
chosenSounds[i].entryIndex = entryIndex;
chosenSfx[i].priority = entry->priority;
chosenSfx[i].entryIndex = entryIndex;
i = numChannels; // "break;"
}
}
}
k = entryIndex;
}
entryIndex = gSoundBanks[bankId][k].next;
entryIndex = gSfxBanks[bankId][k].next;
}
for (i = 0; i < numChosenSounds; i++) {
entry = &gSoundBanks[bankId][chosenSounds[i].entryIndex];
for (i = 0; i < numChosenSfx; i++) {
entry = &gSfxBanks[bankId][chosenSfx[i].entryIndex];
if (entry->state == SFX_STATE_QUEUED) {
entry->state = SFX_STATE_READY;
} else if (entry->state == SFX_STATE_PLAYING_1) {
@ -375,72 +375,72 @@ void Audio_ChooseActiveSounds(u8 bankId) {
// Pick something to play for all channels.
numChannels = gChannelsPerBank[gSfxChannelLayout][bankId];
for (i = 0; i < numChannels; i++) {
needNewSound = false;
activeSound = &gActiveSounds[bankId][i];
needNewSfx = false;
activeSfx = &gActiveSfx[bankId][i];
if (activeSound->entryIndex == 0xFF) {
needNewSound = true;
if (activeSfx->entryIndex == 0xFF) {
needNewSfx = true;
} else {
entry = &gSoundBanks[bankId][activeSound[0].entryIndex];
entry = &gSfxBanks[bankId][activeSfx[0].entryIndex];
if (entry->state == SFX_STATE_PLAYING_1) {
if (entry->sfxId & 0xC00) {
Audio_RemoveSoundBankEntry(bankId, activeSound->entryIndex);
Audio_RemoveSfxBankEntry(bankId, activeSfx->entryIndex);
} else {
entry->state = SFX_STATE_QUEUED;
}
needNewSound = true;
needNewSfx = true;
} else if (entry->state == SFX_STATE_EMPTY) {
activeSound->entryIndex = 0xFF;
needNewSound = true;
activeSfx->entryIndex = 0xFF;
needNewSfx = true;
} else {
// Sound is already playing as it should, nothing to do.
// Sfx is already playing as it should, nothing to do.
for (j = 0; j < numChannels; j++) {
if (activeSound->entryIndex == chosenSounds[j].entryIndex) {
chosenSounds[j].entryIndex = 0xFF;
if (activeSfx->entryIndex == chosenSfx[j].entryIndex) {
chosenSfx[j].entryIndex = 0xFF;
j = numChannels;
}
}
numChosenSounds--;
numChosenSfx--;
}
}
if (needNewSound == true) {
if (needNewSfx == true) {
for (j = 0; j < numChannels; j++) {
chosenEntryIndex = chosenSounds[j].entryIndex;
chosenEntryIndex = chosenSfx[j].entryIndex;
if ((chosenEntryIndex != 0xFF) &&
(gSoundBanks[bankId][chosenEntryIndex].state != SFX_STATE_PLAYING_REFRESH)) {
(gSfxBanks[bankId][chosenEntryIndex].state != SFX_STATE_PLAYING_REFRESH)) {
for (k = 0; k < numChannels; k++) {
if (chosenEntryIndex == gActiveSounds[bankId][k].entryIndex) {
needNewSound = false;
if (chosenEntryIndex == gActiveSfx[bankId][k].entryIndex) {
needNewSfx = false;
k = numChannels; // "break;"
}
}
if (needNewSound == true) {
activeSound->entryIndex = chosenEntryIndex;
chosenSounds[j].entryIndex = 0xFF;
if (needNewSfx == true) {
activeSfx->entryIndex = chosenEntryIndex;
chosenSfx[j].entryIndex = 0xFF;
j = numChannels + 1;
numChosenSounds--;
numChosenSfx--;
}
}
}
if (j == numChannels) {
// nothing found
activeSound->entryIndex = 0xFF;
activeSfx->entryIndex = 0xFF;
}
}
}
}
void Audio_PlayActiveSounds(u8 bankId) {
void Audio_PlayActiveSfx(u8 bankId) {
u8 entryIndex;
SequenceChannel* channel;
SoundBankEntry* entry;
SfxBankEntry* entry;
u8 i;
for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) {
entryIndex = gActiveSounds[bankId][i].entryIndex;
entryIndex = gActiveSfx[bankId][i].entryIndex;
if (entryIndex != 0xFF) {
entry = &gSoundBanks[bankId][entryIndex];
entry = &gSfxBanks[bankId][entryIndex];
channel = gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[sCurSfxPlayerChannelIdx];
if (entry->state == SFX_STATE_READY) {
entry->channelIdx = sCurSfxPlayerChannelIdx;
@ -463,11 +463,11 @@ void Audio_PlayActiveSounds(u8 bankId) {
break;
}
}
Audio_SetSoundProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
Audio_SetSfxProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8), 1);
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8) | 4,
entry->sfxId & 0xFF);
if (gIsLargeSoundBank[bankId]) {
if (gIsLargeSfxBank[bankId]) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8) | 5,
(entry->sfxId & 0x100) >> 8);
}
@ -477,9 +477,9 @@ void Audio_PlayActiveSounds(u8 bankId) {
entry->state = SFX_STATE_PLAYING_2;
}
} else if ((u8)channel->soundScriptIO[1] == 0xFF) {
Audio_RemoveSoundBankEntry(bankId, entryIndex);
Audio_RemoveSfxBankEntry(bankId, entryIndex);
} else if (entry->state == SFX_STATE_PLAYING_REFRESH) {
Audio_SetSoundProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
Audio_SetSfxProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
if (entry->sfxId & 0xC00) {
entry->state = SFX_STATE_PLAYING_1;
} else {
@ -492,149 +492,149 @@ void Audio_PlayActiveSounds(u8 bankId) {
}
void Audio_StopSfxByBank(u8 bankId) {
SoundBankEntry* entry;
SfxBankEntry* entry;
s32 pad;
SoundBankEntry cmp;
u8 entryIndex = gSoundBanks[bankId][0].next;
SfxBankEntry cmp;
u8 entryIndex = gSfxBanks[bankId][0].next;
while (entryIndex != 0xFF) {
entry = &gSoundBanks[bankId][entryIndex];
entry = &gSfxBanks[bankId][entryIndex];
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
}
if (entry->state != SFX_STATE_EMPTY) {
Audio_RemoveSoundBankEntry(bankId, entryIndex);
Audio_RemoveSfxBankEntry(bankId, entryIndex);
}
entryIndex = gSoundBanks[bankId][0].next;
entryIndex = gSfxBanks[bankId][0].next;
}
cmp.sfxId = bankId << 12;
Audio_RemoveMatchingSoundRequests(0, &cmp);
Audio_RemoveMatchingSfxRequests(0, &cmp);
}
void func_800F8884(u8 bankId, Vec3f* pos) {
SoundBankEntry* entry;
u8 entryIndex = gSoundBanks[bankId][0].next;
SfxBankEntry* entry;
u8 entryIndex = gSfxBanks[bankId][0].next;
u8 prevEntryIndex = 0;
while (entryIndex != 0xFF) {
entry = &gSoundBanks[bankId][entryIndex];
entry = &gSfxBanks[bankId][entryIndex];
if (entry->posX == &pos->x) {
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
}
if (entry->state != SFX_STATE_EMPTY) {
Audio_RemoveSoundBankEntry(bankId, entryIndex);
Audio_RemoveSfxBankEntry(bankId, entryIndex);
}
} else {
prevEntryIndex = entryIndex;
}
entryIndex = gSoundBanks[bankId][prevEntryIndex].next;
entryIndex = gSfxBanks[bankId][prevEntryIndex].next;
}
}
void Audio_StopSfxByPosAndBank(u8 bankId, Vec3f* pos) {
SoundBankEntry cmp;
SfxBankEntry cmp;
func_800F8884(bankId, pos);
cmp.sfxId = bankId << 12;
cmp.posX = &pos->x;
Audio_RemoveMatchingSoundRequests(1, &cmp);
Audio_RemoveMatchingSfxRequests(1, &cmp);
}
void Audio_StopSfxByPos(Vec3f* pos) {
u8 i;
SoundBankEntry cmp;
SfxBankEntry cmp;
for (i = 0; i < ARRAY_COUNT(gSoundBanks); i++) {
for (i = 0; i < ARRAY_COUNT(gSfxBanks); i++) {
func_800F8884(i, pos);
}
cmp.posX = &pos->x;
Audio_RemoveMatchingSoundRequests(2, &cmp);
Audio_RemoveMatchingSfxRequests(2, &cmp);
}
void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId) {
SoundBankEntry* entry;
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
SfxBankEntry* entry;
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
u8 prevEntryIndex = 0;
SoundBankEntry cmp;
SfxBankEntry cmp;
while (entryIndex != 0xFF) {
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
if (entry->posX == &pos->x && entry->sfxId == sfxId) {
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
}
if (entry->state != SFX_STATE_EMPTY) {
Audio_RemoveSoundBankEntry(SFX_BANK(sfxId), entryIndex);
Audio_RemoveSfxBankEntry(SFX_BANK(sfxId), entryIndex);
}
entryIndex = 0xFF;
} else {
prevEntryIndex = entryIndex;
}
if (entryIndex != 0xFF) {
entryIndex = gSoundBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
}
}
cmp.posX = &pos->x;
cmp.sfxId = sfxId;
Audio_RemoveMatchingSoundRequests(3, &cmp);
Audio_RemoveMatchingSfxRequests(3, &cmp);
}
void Audio_StopSfxByTokenAndId(u8 token, u16 sfxId) {
SoundBankEntry* entry;
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
SfxBankEntry* entry;
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
u8 prevEntryIndex = 0;
SoundBankEntry cmp;
SfxBankEntry cmp;
while (entryIndex != 0xFF) {
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
if (entry->token == token && entry->sfxId == sfxId) {
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
}
if (entry->state != SFX_STATE_EMPTY) {
Audio_RemoveSoundBankEntry(SFX_BANK(sfxId), entryIndex);
Audio_RemoveSfxBankEntry(SFX_BANK(sfxId), entryIndex);
}
} else {
prevEntryIndex = entryIndex;
}
if (entryIndex != 0xFF) {
entryIndex = gSoundBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
}
}
cmp.token = token;
cmp.sfxId = sfxId;
Audio_RemoveMatchingSoundRequests(4, &cmp);
Audio_RemoveMatchingSfxRequests(4, &cmp);
}
void Audio_StopSfxById(u32 sfxId) {
SoundBankEntry* entry;
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
SfxBankEntry* entry;
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
u8 prevEntryIndex = 0;
SoundBankEntry cmp;
SfxBankEntry cmp;
while (entryIndex != 0xFF) {
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
if (entry->sfxId == sfxId) {
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
}
if (entry->state != SFX_STATE_EMPTY) {
Audio_RemoveSoundBankEntry(SFX_BANK(sfxId), entryIndex);
Audio_RemoveSfxBankEntry(SFX_BANK(sfxId), entryIndex);
}
} else {
prevEntryIndex = entryIndex;
}
entryIndex = gSoundBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
}
cmp.sfxId = sfxId;
Audio_RemoveMatchingSoundRequests(5, &cmp);
Audio_RemoveMatchingSfxRequests(5, &cmp);
}
void Audio_ProcessSoundRequests(void) {
while (gSoundRequestWriteIndex != gSoundRequestReadIndex) {
Audio_ProcessSoundRequest();
gSoundRequestReadIndex++;
void Audio_ProcessSfxRequests(void) {
while (gSfxRequestWriteIndex != gSfxRequestReadIndex) {
Audio_ProcessSfxRequest();
gSfxRequestReadIndex++;
}
}
@ -663,20 +663,20 @@ void func_800F8F88(void) {
if (IS_SEQUENCE_CHANNEL_VALID(gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[0])) {
sCurSfxPlayerChannelIdx = 0;
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
Audio_ChooseActiveSounds(bankId);
Audio_PlayActiveSounds(bankId);
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
Audio_ChooseActiveSfx(bankId);
Audio_PlayActiveSfx(bankId);
Audio_StepUnusedBankLerp(bankId);
}
}
}
u8 Audio_IsSfxPlaying(u32 sfxId) {
SoundBankEntry* entry;
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
SfxBankEntry* entry;
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
while (entryIndex != 0xFF) {
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
if (entry->sfxId == sfxId) {
return true;
}
@ -685,36 +685,36 @@ u8 Audio_IsSfxPlaying(u32 sfxId) {
return false;
}
void Audio_ResetSounds(void) {
void Audio_ResetSfx(void) {
u8 bankId;
u8 i;
u8 entryIndex;
gSoundRequestWriteIndex = 0;
gSoundRequestReadIndex = 0;
gSfxRequestWriteIndex = 0;
gSfxRequestReadIndex = 0;
D_801333D0 = 0;
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
sSoundBankListEnd[bankId] = 0;
sSoundBankFreeListStart[bankId] = 1;
sSoundBankUnused[bankId] = 0;
gSoundBankMuted[bankId] = false;
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
sSfxBankListEnd[bankId] = 0;
sSfxBankFreeListStart[bankId] = 1;
sSfxBankUnused[bankId] = 0;
gSfxBankMuted[bankId] = false;
sUnusedBankLerp[bankId].value = 1.0f;
sUnusedBankLerp[bankId].remainingFrames = 0;
}
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
for (i = 0; i < MAX_CHANNELS_PER_BANK; i++) {
gActiveSounds[bankId][i].entryIndex = 0xFF;
gActiveSfx[bankId][i].entryIndex = 0xFF;
}
}
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
gSoundBanks[bankId][0].prev = 0xFF;
gSoundBanks[bankId][0].next = 0xFF;
for (i = 1; i < gSoundBankSizes[bankId] - 1; i++) {
gSoundBanks[bankId][i].prev = i - 1;
gSoundBanks[bankId][i].next = i + 1;
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
gSfxBanks[bankId][0].prev = 0xFF;
gSfxBanks[bankId][0].next = 0xFF;
for (i = 1; i < gSfxBankSizes[bankId] - 1; i++) {
gSfxBanks[bankId][i].prev = i - 1;
gSfxBanks[bankId][i].next = i + 1;
}
gSoundBanks[bankId][i].prev = i - 1;
gSoundBanks[bankId][i].next = 0xFF;
gSfxBanks[bankId][i].prev = i - 1;
gSfxBanks[bankId][i].next = 0xFF;
}
if (D_801333F8 == 0) {
for (bankId = 0; bankId < 10; bankId++) {

View file

@ -361,8 +361,8 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
if (dbCamera->sub.nPoints < 6) {
if (sDbCamAnim.unk_0A != 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDbCamAnim.unk_0A = 0;
}
func_8006376C(0x11, 0x17, 3, D_8012CEE0[0]);
@ -376,8 +376,8 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
!func_800BB2B4(&sDbCamAnim.lookAtPos, &sDbCamAnim.roll, &sDbCamAnim.fov, dbCamera->sub.lookAt,
&sDbCamAnim.keyframe, &sDbCamAnim.curFrame) &&
sDbCamAnim.unk_0A == 1) {
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDbCamAnim.unk_04++;
if (dbCamera->sub.nFrames > 0 && dbCamera->sub.nFrames < sDbCamAnim.unk_04) {
@ -605,8 +605,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
dbCamera->unk_40 = -1;
dbCamera->sub.demoCtrlActionIdx = 0;
sDbCamAnim.unk_0A = 0;
Audio_PlaySoundGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (dbCamera->unk_38 == -1) {
dbCamera->unk_38 = 1;
} else {
@ -926,25 +926,25 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
dbCamera->unk_1C.z = 0.0f;
dbCamera->unk_1C.y = 1.0f;
} else if (dbCamera->sub.unk_08 == 2) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.unk_08 = 0;
func_800B41DC(dbCamera, dbCamera->sub.unkIdx, cam);
} else {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_R) &&
CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.nPoints = dbCamera->sub.unkIdx + 1;
func_800B4088(dbCamera, cam);
} else if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_R)) {
if (dbCamera->sub.unkIdx == 0x80) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
func_800B42C0(dbCamera, cam);
if (dbCamera->sub.unkIdx == (dbCamera->sub.nPoints - 1)) {
dbCamera->sub.unkIdx++;
@ -997,8 +997,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
} else {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CRIGHT) &&
CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
DbCamera_PrintPoints("Lookat", dbCamera->sub.nPoints, dbCamera->sub.lookAt);
DbCamera_PrintPoints("Position", dbCamera->sub.nPoints, dbCamera->sub.position);
@ -1007,15 +1007,15 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", dbCamera->sub.mode);
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
} else if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.unk_08 = (dbCamera->sub.unk_08 + 1) % 3;
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CUP) &&
CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unkIdx > 0) {
dbCamera->sub.unkIdx--;
} else {
@ -1023,8 +1023,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
} else {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CUP)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unkIdx > 0) {
dbCamera->sub.unkIdx--;
} else {
@ -1045,8 +1045,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L) &&
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CDOWN)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
dbCamera->sub.unkIdx++;
} else {
@ -1054,8 +1054,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
} else {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CDOWN)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
dbCamera->sub.unkIdx++;
} else {
@ -1124,8 +1124,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
case 1:
dbCamera->unk_3C = true;
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unk_0A == 0) {
dbCamera->sub.unk_0A = 5;
} else {
@ -1133,8 +1133,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unk_0A == 5) {
dbCamera->sub.unk_0A = 0;
} else {
@ -1142,8 +1142,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
switch (dbCamera->sub.unk_0A) {
case 1:
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
@ -1192,9 +1192,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_DLEFT)) {
if ((D_8012D10C++ % 5) == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
switch (dbCamera->sub.unk_0A) {
@ -1231,8 +1230,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
switch (dbCamera->sub.unk_0A) {
case 1:
@ -1281,9 +1280,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_DRIGHT)) {
if ((D_8012D10C++ % 5) == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
switch (dbCamera->sub.unk_0A) {
@ -1435,8 +1433,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
dbCamera->fov = 60.0f;
dbCamera->rollDegrees = dbCamera->roll * 1.40625f;
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->unk_78 = (dbCamera->unk_78 + 1) % 3;
dbCamera->unk_38 = -1;
}
@ -1717,8 +1715,8 @@ void DbCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorIndex) {
void DbCamera_PrintAllCuts(Camera* cam) {
s32 i;
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
@ -1865,8 +1863,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if ((1 << sCurFileIdx) & sMempakFiles) {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT) ||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlToggleSwitch ^= 1;
}
D_8012CEE0[41][9] = sCurFileIdx + 'A';
@ -1879,12 +1877,12 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A)) {
if (dbCamera->sub.demoCtrlToggleSwitch == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu++;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = 0;
}
}
@ -1900,8 +1898,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = 0;
return 1;
}
@ -1937,8 +1935,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A) ||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS)) {
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
}
@ -1960,8 +1958,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A) ||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu -= 9;
}
block_2:
@ -1995,8 +1993,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
sp74[i * 2 + 1] = '\0';
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sCurFileIdx >= 4) {
sCurFileIdx = 0;
} else {
@ -2012,8 +2010,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sCurFileIdx <= 0) {
sCurFileIdx = 4;
} else {
@ -2055,25 +2053,25 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
func_8006376C(0x14, 0x1A, 5, D_8012CF70);
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A)) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlToggleSwitch = 0;
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(dbCamera->sub.demoCtrlActionIdx, MENU_INFO);
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
return 1;
}
@ -2085,8 +2083,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP) ||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
}
return 2;
@ -2098,15 +2096,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
default: {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
sCurFileIdx = 0;
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
sCurFileIdx = 0;
@ -2145,8 +2143,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (func_800B91B0(cam, dbCamera) == 0) {
Interface_ChangeAlpha(2);
ShrinkWindow_SetVal(0);
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
OLib_Vec3fDiffToVecSphGeo(&sp5C, &dbCamera->eye, &dbCamera->at);
DbCamera_CalcUpFromPitchYawRoll(&dbCamera->unk_1C, sp5C.pitch, sp5C.yaw,
@ -2164,8 +2162,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
sDbCamAnim.unk_0A = 1;
sDbCamAnim.unk_0C = 0;
D_8016110C = 0;
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_L)) {
@ -2181,15 +2179,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (sLastFileIdx != -1) {
switch (sp74[sCurFileIdx]) {
case '?':
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDbCameraCuts[idx1] = sDbCameraCuts[idx2];
sp74[sCurFileIdx] = '?'; // useless
DbCamera_ResetCut(idx2, false);
break;
case '-':
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp64 = sDbCameraCuts[idx2];
if (sLastFileIdx < sCurFileIdx) {
@ -2211,8 +2209,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
break;
default:
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
break;
}
}
@ -2221,8 +2219,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A)) {
if (sp74[sCurFileIdx] == '?') {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp74[sCurFileIdx] = DbCamera_InitCut(idx1, &dbCamera->sub);
if (sp74[sCurFileIdx] == '?') {
func_8006376C(0xF, 0x18, 7, D_8012CF48);
@ -2232,8 +2230,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp74[sCurFileIdx] = '?';
DbCamera_ResetCut(idx1, true);
}
@ -2241,8 +2239,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_R)) {
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
for (i = 0; i < sDbCameraCuts[idx1].nPoints; i++) {
dbCamera->sub.lookAt[i] = sDbCameraCuts[idx1].lookAt[i];
@ -2264,8 +2262,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sCurFileIdx == 0x1E) {
sCurFileIdx = 0;
} else {
@ -2273,8 +2271,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1;
}
@ -2288,8 +2286,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
DbCamera_PrintAllCuts(cam);
} else if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L) &&
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
if (sDbCameraCuts[i].nPoints != 0) {
osSyncPrintf("\n@@@ /* CUT [%d]\t*/", i);
@ -2305,8 +2303,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
Interface_ChangeAlpha(50);
ShrinkWindow_SetVal(0x20);
D_8016110C = 0;
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
func_8006376C(4, 7, 5, D_8012CF50[0]);

View file

@ -1688,11 +1688,11 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
}
void func_8002F7DC(Actor* actor, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void Audio_PlayActorSound2(Actor* actor, u16 sfxId) {
void Audio_PlayActorSfx2(Actor* actor, u16 sfxId) {
func_80078914(&actor->projectedPos, sfxId);
}
@ -1753,7 +1753,7 @@ s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId,
if (func_80041D4C(&play->colCtx, poly, bgId) == 8) {
play->roomCtx.unk_74[0] = 1;
CollisionCheck_BlueBlood(play, NULL, pos);
Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO);
Audio_PlayActorSfx2(actor, NA_SE_IT_WALL_HIT_BUYO);
return true;
}
@ -2235,8 +2235,8 @@ void Actor_Draw(PlayState* play, Actor* actor) {
void func_80030ED8(Actor* actor) {
if (actor->flags & ACTOR_FLAG_19) {
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (actor->flags & ACTOR_FLAG_20) {
func_80078884(actor->sfx);
} else if (actor->flags & ACTOR_FLAG_21) {
@ -3033,7 +3033,7 @@ Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory) {
*/
void Enemy_StartFinishingBlow(PlayState* play, Actor* actor) {
play->actorCtx.freezeFlashTimer = 5;
SoundSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
SfxSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
}
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
@ -3617,7 +3617,7 @@ void func_8003424C(PlayState* play, Vec3f* arg1) {
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration) {
if ((colorFlag == 0x8000) && !(colorIntensityMax & 0x8000)) {
Audio_PlayActorSound2(actor, NA_SE_EN_LIGHT_ARROW_HIT);
Audio_PlayActorSfx2(actor, NA_SE_EN_LIGHT_ARROW_HIT);
}
actor->colorFilterParams = colorFlag | xluFlag | ((colorIntensityMax & 0xF8) << 5) | duration;
@ -4984,8 +4984,8 @@ void func_80036E50(u16 textId, s16 arg1) {
Flags_SetInfTable(INFTABLE_0C);
return;
case 0x1033:
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Flags_SetEventChkInf(EVENTCHKINF_04);
Flags_SetInfTable(INFTABLE_0E);
return;
@ -5448,8 +5448,8 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) {
case TEXT_STATE_CHOICE:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
ret = true;
}

View file

@ -1564,36 +1564,36 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (flags == TOUCH_SFX_NORMAL) { // collider->colType == COLTYPE_METAL
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, hitPos);
if (collider->actor == NULL) {
CollisionCheck_SpawnShieldParticlesMetal(play, hitPos);
} else {
CollisionCheck_SpawnShieldParticlesMetalSound(play, hitPos, &collider->actor->projectedPos);
CollisionCheck_SpawnShieldParticlesMetalSfx(play, hitPos, &collider->actor->projectedPos);
}
} else if (flags == TOUCH_SFX_HARD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (flags == TOUCH_SFX_WOOD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
}
@ -1604,17 +1604,17 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) {
if (acInfo->elemType == ELEMTYPE_UNK0) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
return true;
@ -1651,8 +1651,8 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else if (sHitInfo[ac->colType].effect == HIT_WOOD) {
if (at->actor == NULL) {
CollisionCheck_SpawnShieldParticles(play, hitPos);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &at->actor->projectedPos);
}
@ -1665,11 +1665,11 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (ac->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
}
@ -3391,32 +3391,32 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
}
/**
* Spawns streaks of light and makes a metallic sound
* Spawns streaks of light and plays a metallic sound effect
*/
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
/**
* Spawns streaks of light and makes a metallic sound at the specified position
* Spawns streaks of light and plays a metallic sound effect at the specified position
*/
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos) {
void CollisionCheck_SpawnShieldParticlesMetalSfx(PlayState* play, Vec3f* v, Vec3f* pos) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
/**
* Spawns streaks of light and makes a metallic sound
* Spawns streaks of light and plays a metallic sound effect
*/
void CollisionCheck_SpawnShieldParticlesMetal2(PlayState* play, Vec3f* v) {
CollisionCheck_SpawnShieldParticlesMetal(play, v);
}
/**
* Spawns streaks of light and makes a wooden sound
* Spawns streaks of light and plays a wooden sound effect
*/
void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* actorPos) {
static EffectShieldParticleInit woodInit = {
@ -3445,8 +3445,8 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* a
woodInit.lightPoint.z = woodInit.position.z;
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &woodInit);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
/**

View file

@ -495,8 +495,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) ||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) &&
(gSaveContext.fileNum != 0xFEDC) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) {
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
temp = 1;
}
@ -827,7 +827,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
break;
case 54:
gSaveContext.gameMode = GAMEMODE_END_CREDITS;
Audio_SetSoundBanksMute(0x6F);
Audio_SetSfxBanksMute(0x6F);
play->linkAgeOnLoad = LINK_AGE_CHILD;
play->nextEntranceIndex = ENTR_SPOT09_0;
gSaveContext.cutsceneIndex = 0xFFF2;
@ -1208,7 +1208,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
break;
case 117:
gSaveContext.gameMode = GAMEMODE_END_CREDITS;
Audio_SetSoundBanksMute(0x6F);
Audio_SetSfxBanksMute(0x6F);
play->linkAgeOnLoad = LINK_AGE_ADULT;
play->nextEntranceIndex = ENTR_SPOT00_0;
gSaveContext.cutsceneIndex = 0xFFF7;
@ -1249,13 +1249,13 @@ void Cutscene_Command_TransitionFX(PlayState* play, CutsceneContext* csCtx, CsCm
if (cmd->base == 1) {
play->envCtx.screenFillColor[3] = 255.0f * temp;
if ((temp == 0.0f) && (gSaveContext.entranceIndex == ENTR_KENJYANOMA_0)) {
Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if ((temp == 0.0f) && ((gSaveContext.entranceIndex == ENTR_TOKINOMA_0) ||
(gSaveContext.entranceIndex == ENTR_SPOT15_0) ||
(gSaveContext.entranceIndex == ENTR_YOUSEI_IZUMI_YOKO_0))) {
Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if ((temp == 0.0f) && (play->sceneNum == SCENE_GANONTIKA)) {
func_800788CC(NA_SE_EV_WHITE_OUT);
}

View file

@ -888,7 +888,7 @@ void EffectSsEnIce_SpawnFlyingVec3f(PlayState* play, Actor* actor, Vec3f* pos, s
initParams.scale = scale;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
Audio_PlayActorSfx2(actor, NA_SE_PL_FREEZE_S);
}
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
@ -914,7 +914,7 @@ void EffectSsEnIce_SpawnFlyingVec3s(PlayState* play, Actor* actor, Vec3s* pos, s
initParams.scale = scale;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
Audio_PlayActorSfx2(actor, NA_SE_PL_FREEZE_S);
}
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
@ -993,7 +993,7 @@ void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 sc
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
Audio_PlayActorSfx2(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);
@ -1014,7 +1014,7 @@ void EffectSsEnFire_SpawnVec3s(PlayState* play, Actor* actor, Vec3s* pos, s16 sc
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
Audio_PlayActorSfx2(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);
@ -1051,7 +1051,7 @@ void EffectSsFCircle_Spawn(PlayState* play, Actor* actor, Vec3f* pos, s16 radius
void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused,
s32 arg14, s16 playSound) {
s32 arg14, s16 playSfx) {
EffectSsDeadDbInitParams initParams;
Math_Vec3f_Copy(&initParams.pos, pos);
@ -1068,7 +1068,7 @@ void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* a
initParams.envColor.b = envB;
initParams.unused = unused;
initParams.unk_34 = arg14;
initParams.playSound = playSound;
initParams.playSfx = playSfx;
EffectSs_Spawn(play, EFFECT_SS_DEAD_DB, 120, &initParams);
}

View file

@ -302,7 +302,7 @@ void EnAObj_Block(EnAObj* this, PlayState* play) {
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 0.0f, 1.0f, 1.0f, 0.0f);
if (this->dyna.actor.speedXZ != 0.0f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
}
this->dyna.unk_154 = 0.0f;

View file

@ -715,8 +715,8 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (getItemId != GI_NONE) {
if (Actor_HasParent(&this->actor, play)) {
Flags_SetCollectible(play, this->collectibleFlag);
@ -724,8 +724,8 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
return;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Flags_SetCollectible(play, this->collectibleFlag);

View file

@ -81,8 +81,8 @@ void TransitionCircle_Start(void* thisx) {
} else {
this->texY = 0x1F4;
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
guPerspective(&this->projection, &this->normal, 60.0f, (4.0f / 3.0f), 10.0f, 12800.0f, 1.0f);
@ -107,8 +107,8 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
if (this->direction != 0) {
if (this->texY == 0) {
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
this->texY += this->speed * 3 / updateRate;

View file

@ -583,16 +583,15 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
}
void func_80078884(u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void func_800788CC(u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void func_80078914(Vec3f* arg0, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, arg0, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, arg0, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}

View file

@ -403,11 +403,11 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) {
osSyncPrintf("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
// clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
@ -489,11 +489,11 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) {
// clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}

View file

@ -158,8 +158,8 @@ u8 Message_ShouldAdvance(PlayState* play) {
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
return CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
CHECK_BTN_ALL(input->press.button, BTN_CUP);
@ -183,8 +183,8 @@ void Message_CloseTextbox(PlayState* play) {
msgCtx->stateTimer = 2;
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
@ -199,8 +199,8 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
if (msgCtx->choiceIndex > 128) {
msgCtx->choiceIndex = 0;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) {
sAnalogStickHeld = true;
@ -208,8 +208,8 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
if (msgCtx->choiceIndex > numChoices) {
msgCtx->choiceIndex = numChoices;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (ABS(input->rel.stick_y) < 30) {
sAnalogStickHeld = false;
@ -743,7 +743,7 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
MessageContext* msgCtx = &play->msgCtx;
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4,
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
@ -898,8 +898,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!sTextboxSkipped) {
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
} else {
@ -916,8 +916,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
}
@ -986,9 +986,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
// "Sound (SE)"
osSyncPrintf("サウンド(SE)\n");
sfxHi = msgCtx->msgBufDecoded[i + 1] << 8;
Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
i += 2;
break;
@ -997,7 +996,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
break;
case MESSAGE_BACKGROUND:
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4,
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
@ -1083,8 +1082,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == 0) {
Interface_SetDoAction(play, DO_ACTION_RETURN);
@ -1114,8 +1113,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
return;
case MESSAGE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
}
@ -1126,16 +1125,16 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
*gfxP = gfx;
return;
default:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx);
charTexIdx += FONT_CHAR_TEX_SIZE;
@ -1795,8 +1794,8 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
osSyncPrintf("ocarina_set 000000000000000000 = %d\n", ocarinaActionId);
msgCtx->ocarinaAction = ocarinaActionId;
if (ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA && ocarinaActionId <= OCARINA_ACTION_CHECK_STORMS) {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
if (ocarinaActionId == OCARINA_ACTION_SCARECROW_SPAWN_PLAYBACK) {
Message_OpenText(play, 0x86F); // Ocarina
@ -2124,9 +2123,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW_SPAWN) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
} else {
// "Ocarina_Flog Correct Example Performance"
@ -2135,17 +2134,17 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Interface_ChangeAlpha(1);
}
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW_SPAWN) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW_SPAWN) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} else {
@ -2155,9 +2154,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Interface_ChangeAlpha(1);
}
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
@ -2167,25 +2166,25 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
Interface_ChangeAlpha(1);
} else {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
}
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} else if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) {
@ -2408,7 +2407,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
AudioOcarina_SetPlaybackSong(msgCtx->lastPlayedSong + 1, 1);
if (msgCtx->lastPlayedSong != OCARINA_SONG_SCARECROW_SPAWN) {
Audio_PlayFanfare(sOcarinaSongFanfares[msgCtx->lastPlayedSong]);
Audio_SetSoundBanksMute(0x20);
Audio_SetSfxBanksMute(0x20);
}
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
@ -2562,11 +2561,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
osSyncPrintf("z_message.c 取得メロディ=%d\n", ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state);
osSyncPrintf(VT_RST);
msgCtx->stateTimer = 20;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL;
}
@ -2620,8 +2619,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->ocarinaStaff->state);
gSaveContext.scarecrowLongSongSet = true;
}
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
osSyncPrintf("aaaaaaaaaaaaaa\n");
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
msgCtx->stateTimer = 10;
@ -2691,8 +2690,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer = 20;
gSaveContext.scarecrowSpawnSongSet = true;
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_DONE;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf("\n====================================================================\n");
MemCpy(gSaveContext.scarecrowSpawnSong, gScarecrowSpawnSongPtr,
@ -2707,8 +2706,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
// "Played an existing song"
osSyncPrintf("すでに存在する曲吹いた!!! \n");
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Message_CloseTextbox(play);
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_FAILED;
}
@ -2733,8 +2732,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING:
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING:
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
@ -2744,12 +2743,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->stateTimer == 0) {
if (msgCtx->ocarinaStaff->state == 0) {
if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING) {
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
msgCtx->msgMode++;
}
@ -2767,8 +2765,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
}
break;
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
@ -2779,15 +2777,15 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
// "Musical round failed"
osSyncPrintf("輪唱失敗!!!!!!!!!\n");
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->stateTimer = 10;
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
} else if (msgCtx->ocarinaStaff->state == OCARINA_SONG_MEMORY_GAME) {
// "Musical round succeeded"
osSyncPrintf("輪唱成功!!!!!!!!!\n");
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS;
msgCtx->stateTimer = 30;
}
@ -2803,8 +2801,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) {
if (AudioOcarina_MemoryGameNextNote() != 1) {
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0;
Message_ResetOcarinaNoteState();
@ -3171,7 +3169,7 @@ void Message_Update(PlayState* play) {
} else {
Message_GrowTextbox(msgCtx);
// TODO: this may be NA_SE_PL_WALK_GROUND - SFX_FLAG, or not, investigate sfxId=0
Audio_PlaySoundIfNotInCutscene(0);
Audio_PlaySfxIfNotInCutscene(0);
msgCtx->stateTimer = 0;
msgCtx->msgMode = MSGMODE_TEXT_BOX_GROWING;
}
@ -3248,12 +3246,12 @@ void Message_Update(PlayState* play) {
} else if (Message_ShouldAdvanceSilent(play)) {
osSyncPrintf("select=%d\n", msgCtx->textboxEndType);
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Message_ContinueTextbox(play, sNextTextId);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Message_CloseTextbox(play);
}
}

View file

@ -2115,7 +2115,7 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
(play->csCtx.state == CS_STATE_IDLE)) {
// clang-format off
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4,
if (naviCallState == 0x1E) { Audio_PlaySfxGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
@ -2167,7 +2167,7 @@ s32 Health_ChangeBy(PlayState* play, s16 amount) {
gSaveContext.healthCapacity);
// clang-format off
if (amount > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
if (amount > 0) { Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (gSaveContext.doubleDefense && (amount < 0)) {
amount >>= 1;
@ -2302,8 +2302,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
if ((type != MAGIC_ADD) && (gSaveContext.magic - amount) < 0) {
if (gSaveContext.magicCapacity != 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
return false;
}
@ -2321,8 +2321,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
return true;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false;
}
@ -2339,8 +2339,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_3;
return true;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false;
}
@ -2371,8 +2371,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_2;
return true;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false;
}
@ -2440,8 +2440,8 @@ void Magic_Update(PlayState* play) {
gSaveContext.magic += 4;
if (gSaveContext.gameMode == GAMEMODE_NORMAL && gSaveContext.sceneSetupIndex < 4) {
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
// "Storage MAGIC_NOW=%d (%d)"
@ -2528,8 +2528,8 @@ void Magic_Update(PlayState* play) {
!play->actorCtx.lensActive) {
// Force lens off and set magic meter state to idle
play->actorCtx.lensActive = false;
Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.magicState = MAGIC_STATE_IDLE;
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
break;
@ -2581,8 +2581,8 @@ void Magic_Update(PlayState* play) {
case MAGIC_STATE_ADD:
// Add magic until target is reached
gSaveContext.magic += 4;
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (gSaveContext.magic >= gSaveContext.magicTarget) {
gSaveContext.magic = gSaveContext.magicTarget;
gSaveContext.magicState = gSaveContext.prevMagicState;
@ -3564,20 +3564,20 @@ void Interface_Draw(PlayState* play) {
D_80125A5C = false;
} else if (gSaveContext.timer1Value > 60) {
if (timerDigits[4] == 1) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
} else if (gSaveContext.timer1Value >= 11) {
if (timerDigits[4] & 1) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
}
@ -3625,9 +3625,9 @@ void Interface_Draw(PlayState* play) {
D_8015FFE2 = 40;
gSaveContext.timer1State = 15;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
}
@ -3745,20 +3745,20 @@ void Interface_Draw(PlayState* play) {
}
} else if (gSaveContext.timer2Value > 60) {
if (timerDigits[4] == 1) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (gSaveContext.timer2Value > 10) {
if (timerDigits[4] & 1) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else {
gSaveContext.timer2Value++;
@ -3772,9 +3772,9 @@ void Interface_Draw(PlayState* play) {
}
if ((gSaveContext.timer2Value % 60) == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
}
@ -4003,8 +4003,8 @@ void Interface_Update(PlayState* play) {
gSaveContext.health += 4;
if ((gSaveContext.health & 0xF) < 4) {
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
osSyncPrintf("now_life=%d max_life=%d\n", gSaveContext.health, gSaveContext.healthCapacity);
@ -4042,8 +4042,8 @@ void Interface_Update(PlayState* play) {
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
gSaveContext.rupeeAccumulator--;
gSaveContext.rupees++;
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
// "Rupee Amount MAX = %d"
osSyncPrintf("ルピー数MAX = %d\n", CUR_CAPACITY(UPG_WALLET));
@ -4059,13 +4059,13 @@ void Interface_Update(PlayState* play) {
gSaveContext.rupees = 0;
}
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
gSaveContext.rupeeAccumulator++;
gSaveContext.rupees--;
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else {
gSaveContext.rupeeAccumulator = 0;

View file

@ -36,9 +36,9 @@ void Play_SetViewpoint(PlayState* this, s16 viewpoint) {
if ((R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
// Play a sfx when the player toggles the camera
Audio_PlaySoundGeneral((viewpoint == VIEWPOINT_LOCKED) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP,
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral((viewpoint == VIEWPOINT_LOCKED) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP,
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
Play_ChangeViewpointBgCamIndex(this);
@ -259,7 +259,7 @@ void Play_Init(GameState* thisx) {
func_80112098(this);
Message_Init(this);
GameOver_Init(this);
SoundSource_InitAll(this);
SfxSource_InitAll(this);
Effect_InitContext(this);
EffectSs_InitInfo(this, 0x55);
CollisionCheck_InitContext(this, &this->colChkCtx);
@ -752,9 +752,8 @@ void Play_Update(PlayState* this) {
break;
case TRANS_MODE_SANDSTORM:
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA < 110) {
@ -788,9 +787,8 @@ void Play_Update(PlayState* this) {
break;
case TRANS_MODE_SANDSTORM_END:
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA <= 0) {
@ -922,8 +920,8 @@ void Play_Update(PlayState* this) {
// "Changing viewpoint is prohibited during the cutscene"
osSyncPrintf(VT_FGCOL(CYAN) "デモ中につき視点変更を禁止しております\n" VT_RST);
} else if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
// C-Up toggle for houses, move between pivot camera and fixed camera
// Toggle viewpoint between VIEWPOINT_LOCKED and VIEWPOINT_PIVOT
@ -959,7 +957,7 @@ void Play_Update(PlayState* this) {
AnimationContext_Update(this, &this->animationCtx);
PLAY_LOG(3771);
SoundSource_UpdateAll(this);
SfxSource_UpdateAll(this);
PLAY_LOG(3777);
ShrinkWindow_Update(R_UPDATE_RATE);

View file

@ -1,19 +1,19 @@
#include "global.h"
void SoundSource_InitAll(PlayState* play) {
SoundSource* sources = &play->soundSources[0];
void SfxSource_InitAll(PlayState* play) {
SfxSource* sources = &play->sfxSources[0];
s32 i;
// clang-format off
for (i = 0; i < ARRAY_COUNT(play->soundSources); i++) { sources[i].countdown = 0; }
for (i = 0; i < ARRAY_COUNT(play->sfxSources); i++) { sources[i].countdown = 0; }
// clang-format on
}
void SoundSource_UpdateAll(PlayState* play) {
SoundSource* source = &play->soundSources[0];
void SfxSource_UpdateAll(PlayState* play) {
SfxSource* source = &play->sfxSources[0];
s32 i;
for (i = 0; i < ARRAY_COUNT(play->soundSources); i++) {
for (i = 0; i < ARRAY_COUNT(play->sfxSources); i++) {
if (source->countdown != 0) {
if (DECR(source->countdown) == 0) {
Audio_StopSfxByPos(&source->projectedPos);
@ -26,20 +26,20 @@ void SoundSource_UpdateAll(PlayState* play) {
}
}
void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 duration, u16 sfxId) {
void SfxSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 duration, u16 sfxId) {
s32 countdown;
SoundSource* source;
SfxSource* source;
s32 smallestCountdown = 0xFFFF;
SoundSource* backupSource;
SfxSource* backupSource;
s32 i;
source = &play->soundSources[0];
for (i = 0; i < ARRAY_COUNT(play->soundSources); i++) {
source = &play->sfxSources[0];
for (i = 0; i < ARRAY_COUNT(play->sfxSources); i++) {
if (source->countdown == 0) {
break;
}
// Store the sound source with the smallest remaining countdown
// Store the sfx source with the smallest remaining countdown
countdown = source->countdown;
if (countdown < smallestCountdown) {
smallestCountdown = countdown;
@ -48,8 +48,8 @@ void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 du
source++;
}
// If no sound source is available, replace the sound source with the smallest remaining countdown
if (i >= ARRAY_COUNT(play->soundSources)) {
// If no sfx source is available, replace the sfx source with the smallest remaining countdown
if (i >= ARRAY_COUNT(play->sfxSources)) {
source = backupSource;
Audio_StopSfxByPos(&source->projectedPos);
}
@ -58,6 +58,6 @@ void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 du
source->countdown = duration;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}

View file

@ -180,8 +180,8 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
this->timer = 0;
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (DECR(this->timer) == 0) {
grabbed = this->grabbed;
if (grabbed != NULL) {
@ -274,12 +274,12 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
func_80865044(this);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
CollisionCheck_SpawnShieldParticlesMetal(play, &this->actor.world.pos);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (CHECK_BTN_ANY(play->state.input[0].press.button,
(BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN))) {

View file

@ -164,7 +164,7 @@ void ArrowFire_Fly(ArrowFire* this, PlayState* play) {
func_80865ECC(&this->unkPos, &this->actor.world.pos, 0.05f);
if (arrow->hitFlags & 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_FRAME);
Audio_PlayActorSfx2(&this->actor, NA_SE_IT_EXPLOSION_FRAME);
ArrowFire_SetupAction(this, ArrowFire_Hit);
this->timer = 32;
this->alpha = 255;

View file

@ -165,7 +165,7 @@ void ArrowIce_Fly(ArrowIce* this, PlayState* play) {
func_80867E8C(&this->unkPos, &this->actor.world.pos, 0.05f);
if (arrow->hitFlags & 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_ICE);
Audio_PlayActorSfx2(&this->actor, NA_SE_IT_EXPLOSION_ICE);
ArrowIce_SetupAction(this, ArrowIce_Hit);
this->timer = 32;
this->alpha = 255;

View file

@ -163,7 +163,7 @@ void ArrowLight_Fly(ArrowLight* this, PlayState* play) {
func_80869E6C(&this->unkPos, &this->actor.world.pos, 0.05f);
if (arrow->hitFlags & 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_LIGHT);
Audio_PlayActorSfx2(&this->actor, NA_SE_IT_EXPLOSION_LIGHT);
ArrowLight_SetupAction(this, ArrowLight_Hit);
this->timer = 32;
this->alpha = 255;

View file

@ -203,7 +203,7 @@ void func_8086C054(BgBdanObjects* this, PlayState* play) {
void func_8086C1A0(BgBdanObjects* this, PlayState* play) {
if (Math_SmoothStepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 500.0f, 0.5f, 7.5f, 1.0f) <
0.1f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_A);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_A);
this->actionFunc = func_8086C29C;
this->timer = 30;
BgBdanObjects_SetContactRu1(this, 2);
@ -252,7 +252,7 @@ void func_8086C3D8(BgBdanObjects* this, PlayState* play) {
this->dyna.actor.velocity.y)) {
this->dyna.actor.world.rot.y = 0;
this->timer = 60;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + 140.0f;
this->actionFunc = func_8086C5BC;
OnePointCutscene_Init(play, 3080, -99, this->dyna.actor.child, CAM_ID_MAIN);
@ -336,7 +336,7 @@ void func_8086C76C(BgBdanObjects* this, PlayState* play) {
void func_8086C7D0(BgBdanObjects* this, PlayState* play) {
if (Math_SmoothStepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 965.0f, 0.5f, 15.0f, 0.2f) <
0.01f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_A);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_A);
this->actionFunc = BgBdanObjects_DoNothing;
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_RISING - SFX_FLAG);
@ -428,7 +428,7 @@ void func_8086CB8C(BgBdanObjects* this, PlayState* play) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - (cosf(this->timer * (M_PI / 50.0f)) * 200.0f);
if (this->timer == 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
this->actionFunc = BgBdanObjects_DoNothing;
// Using `CAM_ID_NONE` here defaults to the active camera
Play_CopyCamera(play, CAM_ID_MAIN, CAM_ID_NONE);

View file

@ -272,7 +272,7 @@ void func_8086D694(BgBdanSwitch* this, PlayState* play) {
this->unk_1C8 -= 0.2f;
if (this->unk_1C8 <= 0.1f) {
func_8086D730(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 0x78, 0x14, 0xA);
}
}
@ -312,7 +312,7 @@ void func_8086D80C(BgBdanSwitch* this, PlayState* play) {
this->unk_1C8 += 0.2f;
if (this->unk_1C8 >= 1.0f) {
func_8086D5C4(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
}
}
@ -335,7 +335,7 @@ void func_8086D8CC(BgBdanSwitch* this, PlayState* play) {
this->unk_1C8 -= 0.2f;
if (this->unk_1C8 <= 0.6f) {
func_8086D9F8(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 0x78, 0x14, 0xA);
}
}
@ -350,7 +350,7 @@ void func_8086D95C(BgBdanSwitch* this, PlayState* play) {
this->unk_1C8 -= 0.2f;
if (this->unk_1C8 <= 0.1f) {
func_8086DB24(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 0x78, 0x14, 0xA);
}
}
@ -389,7 +389,7 @@ void func_8086DAC4(BgBdanSwitch* this, PlayState* play) {
this->unk_1C8 += 0.2f;
if (this->unk_1C8 >= 1.0f) {
func_8086D86C(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
}
}
@ -437,7 +437,7 @@ void func_8086DC48(BgBdanSwitch* this, PlayState* play) {
this->unk_1C8 -= 0.3f;
if (this->unk_1C8 <= 1.0f) {
func_8086DCCC(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
}
}
}
@ -475,7 +475,7 @@ void func_8086DDC0(BgBdanSwitch* this, PlayState* play) {
this->unk_1C8 += 0.3f;
if (this->unk_1C8 >= 2.0f) {
func_8086DB4C(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_FOOT_SWITCH);
}
}
}

View file

@ -149,7 +149,7 @@ void BgBowlWall_FallDoEffects(BgBowlWall* this, PlayState* play) {
EffectSsBomb2_SpawnLayered(play, &effectPos, &effectVelocity, &effectAccel, 100, 30);
effectPos.y = -50.0f;
EffectSsHahen_SpawnBurst(play, &effectPos, 10.0f, 0, 50, 15, 3, HAHEN_OBJECT_DEFAULT, 10, NULL);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_IT_BOMB_EXPLOSION);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_IT_BOMB_EXPLOSION);
}
quakeIndex = Quake_Add(GET_ACTIVE_CAM(play), 1);
Quake_SetSpeed(quakeIndex, 0x7FFF);

View file

@ -243,23 +243,23 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
Flags_SetSwitch(play, this->dyna.actor.params & 0x3F);
if (wallType == BWALL_KD_FLOOR) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_EXPLOSION);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_EXPLOSION);
} else {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
}
if ((wallType == BWALL_DC_ENTRANCE) && !Flags_GetEventChkInf(EVENTCHKINF_B0)) {
Flags_SetEventChkInf(EVENTCHKINF_B0);
Cutscene_SetSegment(play, gDcOpeningCs);
gSaveContext.cutsceneTrigger = 1;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
func_8002DF54(play, NULL, 0x31);
}
if (this->dyna.actor.params < 0) {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Actor_Kill(&this->dyna.actor);

View file

@ -162,7 +162,7 @@ void BgDdanJd_Move(BgDdanJd* this, PlayState* play) {
this->actionFunc = BgDdanJd_Idle;
OnePointCutscene_Init(play, 3060, -99, &this->dyna.actor, CAM_ID_MAIN);
} else if (Math_StepToF(&this->dyna.actor.world.pos.y, this->targetY, this->ySpeed)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_PILLAR_MOVE_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_PILLAR_MOVE_STOP);
this->actionFunc = BgDdanJd_Idle;
}
BgDdanJd_MoveEffects(this, play);

View file

@ -170,8 +170,8 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, PlayState* play) {
func_8003555C(play, &pos1, &velocity, &accel);
}
Camera_AddQuake(&play->mainCamera, 0, effectStrength * 0.6f, 3);
Audio_PlaySoundGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View file

@ -158,19 +158,19 @@ void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) {
((play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] == 255) && (this->state == BGDODOAGO_EYE_LEFT))) {
Flags_SetSwitch(play, this->dyna.actor.params & 0x3F);
this->state = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgDodoago_SetupAction(this, BgDodoago_OpenJaw);
OnePointCutscene_Init(play, 3380, 160, &this->dyna.actor, CAM_ID_MAIN);
} else if (play->roomCtx.unk_74[this->state] == 0) {
OnePointCutscene_Init(play, 3065, 40, &this->dyna.actor, CAM_ID_MAIN);
BgDodoago_SetupAction(this, BgDodoago_LightOneEye);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
OnePointCutscene_Init(play, 3065, 20, &this->dyna.actor, CAM_ID_MAIN);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sTimer += 30;
return;
}
@ -248,11 +248,11 @@ void BgDodoago_OpenJaw(BgDodoago* this, PlayState* play) {
if (Math_SmoothStepToS(&this->dyna.actor.shape.rot.x, 0x1333, 110 - this->state, 0x3E8, 0x32) == 0) {
BgDodoago_SetupAction(this, BgDodoago_DoNothing);
Audio_PlaySoundGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View file

@ -297,7 +297,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
OnePointCutscene_Init(play, 8604, -99, NULL, CAM_ID_MAIN);
};
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
this->actor.draw = BgDyYoseizo_Draw;
this->actionFunc = BgDyYoseizo_SetupSpinGrow_NoReward;
}
@ -314,7 +314,7 @@ void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
ANIMMODE_ONCE, -10.0f);
}
Audio_PlayActorSound2(&this->actor, NA_SE_VO_FR_LAUGH_0);
Audio_PlayActorSfx2(&this->actor, NA_SE_VO_FR_LAUGH_0);
func_8002DF54(play, &this->actor, 1);
this->actionFunc = BgDyYoseizo_SpinGrow_NoReward;
}
@ -410,7 +410,7 @@ void BgDyYoseizo_SetupHealPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
-10.0f);
}
Audio_PlayActorSound2(&this->actor, NA_SE_VO_FR_SMILE_0);
Audio_PlayActorSfx2(&this->actor, NA_SE_VO_FR_SMILE_0);
this->mouthState = 1;
this->actionFunc = BgDyYoseizo_HealPlayer_NoReward;
}
@ -521,8 +521,8 @@ void BgDyYoseizo_SetupSpinShrink(BgDyYoseizo* this, PlayState* play) {
this->vanishTimer = 5;
this->scaleFraction = 0.0f;
this->heightFraction = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_VO_FR_LAUGH_0);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_VANISH);
Audio_PlayActorSfx2(&this->actor, NA_SE_VO_FR_LAUGH_0);
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GREAT_FAIRY_VANISH);
this->actionFunc = BgDyYoseizo_SpinShrink;
}
@ -582,7 +582,7 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, PlayState* play) {
ANIMMODE_ONCE, -10.0f);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
this->actionFunc = BgDyYoseizo_SpinGrowSetupGive_Reward;
}
}
@ -839,10 +839,10 @@ void BgDyYoseizo_Update(Actor* thisx, PlayState* play2) {
}
if (sfx == 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_VO_FR_SMILE_0);
Audio_PlayActorSfx2(&this->actor, NA_SE_VO_FR_SMILE_0);
}
if (sfx == 2) {
Audio_PlayActorSound2(&this->actor, NA_SE_VO_FR_LAUGH_0);
Audio_PlayActorSfx2(&this->actor, NA_SE_VO_FR_LAUGH_0);
}
}
@ -958,7 +958,7 @@ void BgDyYoseizo_UpdateEffects(BgDyYoseizo* this, PlayState* play) {
effect->velocity.y += effect->accel.y;
effect->velocity.z += effect->accel.z;
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_HEALING - SFX_FLAG);
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_HEALING - SFX_FLAG);
sp94 = player->actor.world.pos;
sp94.y = player->actor.world.pos.y - 150.0f;

View file

@ -212,17 +212,17 @@ void BgGanonOtyuka_Fall(BgGanonOtyuka* this, PlayState* play) {
}
func_80033DB8(play, 10, 15);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_BOX_BREAK);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_BOX_BREAK);
}
Actor_Kill(&this->dyna.actor);
}
} else {
if (this->dropTimer == 1) {
Audio_PlaySoundGeneral(NA_SE_EV_STONEDOOR_STOP, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_STONEDOOR_STOP, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Math_ApproachF(&this->dyna.actor.world.pos.y, -1000.0f, 1.0f, this->dyna.actor.speedXZ);
Math_ApproachF(&this->dyna.actor.speedXZ, 100.0f, 1.0f, 0.1f);

View file

@ -78,11 +78,11 @@ void func_80878300(BgGateShutter* this, PlayState* play) {
Actor* thisx = &this->dyna.actor;
if (this->unk_178 == 0) {
Audio_PlayActorSound2(thisx, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
Audio_PlayActorSfx2(thisx, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
thisx->world.pos.x -= 2.0f;
Math_ApproachF(&thisx->world.pos.z, -1375.0f, 0.8f, 0.3f);
if (thisx->world.pos.x < -89.0f) {
Audio_PlayActorSound2(thisx, NA_SE_EV_BRIDGE_OPEN_STOP);
Audio_PlayActorSfx2(thisx, NA_SE_EV_BRIDGE_OPEN_STOP);
this->unk_178 = 0x1E;
this->actionFunc = func_808783AC;
}
@ -100,12 +100,12 @@ void func_808783D4(BgGateShutter* this, PlayState* play) {
Actor* thisx = &this->dyna.actor;
if (this->unk_178 == 0) {
Audio_PlayActorSound2(thisx, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
Audio_PlayActorSfx2(thisx, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
thisx->world.pos.x += 2.0f;
Math_ApproachF(&thisx->world.pos.z, -1350.0f, 0.8f, 0.3f);
if (thisx->world.pos.x > 90.0f) {
thisx->world.pos.x = 91.0f;
Audio_PlayActorSound2(thisx, NA_SE_EV_BRIDGE_OPEN_STOP);
Audio_PlayActorSfx2(thisx, NA_SE_EV_BRIDGE_OPEN_STOP);
this->unk_178 = 30;
this->actionFunc = func_808783AC;
}

View file

@ -123,8 +123,8 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
} else {
this->actionFlags |= 4;
this->timer1 = 304;
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
@ -139,8 +139,8 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
} else {
this->actionFlags |= 8;
this->timer2 = 304;
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View file

@ -97,7 +97,7 @@ void BgGndFiremeiro_Shake(BgGndFiremeiro* this, PlayState* play) {
this->dyna.actor.world.pos.y += Math_CosS(this->timer * 0x7FFF);
if (!(this->timer % 4)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
}
} else {
this->timer = 10;

View file

@ -313,7 +313,7 @@ void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play) {
thisx->speedXZ = 0.0f;
this->targetPos.x = thisx->world.pos.x;
this->targetPos.z = thisx->world.pos.z;
Audio_PlayActorSound2(thisx, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(thisx, NA_SE_EV_BLOCK_BOUND);
switch (BgGndIceblock_NextAction(this)) {
case GNDICE_IDLE:
this->actionFunc = BgGndIceblock_Idle;

View file

@ -162,8 +162,8 @@ void func_8087B284(BgGndSoulmeiro* this, PlayState* play) {
if (!Flags_GetSwitch(play, (this->actor.params >> 8) & 0x3F)) {
this->actor.draw = BgGndSoulmeiro_Draw;
if (this->collider.base.acFlags & AC_HIT) {
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->unk_198 = 40;
this->actionFunc = func_8087AF38;
} else {

View file

@ -241,7 +241,7 @@ void BgHakaGate_FloorClosed(BgHakaGate* this, PlayState* play) {
this->actionFunc = BgHakaGate_DoNothing;
} else {
func_80078884(NA_SE_SY_ERROR);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GROUND_GATE_OPEN);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_GROUND_GATE_OPEN);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->vTimer = 60;
this->actionFunc = BgHakaGate_FloorOpen;
@ -273,7 +273,7 @@ void BgHakaGate_GateWait(BgHakaGate* this, PlayState* play) {
void BgHakaGate_GateOpen(BgHakaGate* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 80.0f, 1.0f)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
this->dyna.actor.flags &= ~ACTOR_FLAG_4;
this->actionFunc = BgHakaGate_DoNothing;
} else {

View file

@ -16,7 +16,7 @@ void BgHakaHuta_Update(Actor* thisx, PlayState* play);
void BgHakaHuta_Draw(Actor* thisx, PlayState* play);
void BgHakaHuta_SpawnDust(BgHakaHuta* this, PlayState* play);
void BgHakaHuta_PlaySound(BgHakaHuta* this, PlayState* play, u16 sfx);
void BgHakaHuta_PlaySfx(BgHakaHuta* this, PlayState* play, u16 sfx);
void BgHakaHuta_SpawnEnemies(BgHakaHuta* this, PlayState* play);
void BgHakaHuta_Open(BgHakaHuta* this, PlayState* play);
void BgHakaHuta_SlideOpen(BgHakaHuta* this, PlayState* play);
@ -94,14 +94,14 @@ void BgHakaHuta_SpawnDust(BgHakaHuta* this, PlayState* play) {
}
}
void BgHakaHuta_PlaySound(BgHakaHuta* this, PlayState* play, u16 sfx) {
void BgHakaHuta_PlaySfx(BgHakaHuta* this, PlayState* play, u16 sfx) {
Vec3f pos;
pos.z = (this->dyna.actor.shape.rot.y == 0) ? this->dyna.actor.world.pos.z + 120.0f
: this->dyna.actor.world.pos.z - 120.0f;
pos.x = this->dyna.actor.world.pos.x;
pos.y = this->dyna.actor.world.pos.y;
SoundSource_PlaySfxAtFixedWorldPos(play, &pos, 30, sfx);
SfxSource_PlaySfxAtFixedWorldPos(play, &pos, 30, sfx);
}
void BgHakaHuta_SpawnEnemies(BgHakaHuta* this, PlayState* play) {
@ -148,7 +148,7 @@ void BgHakaHuta_Open(BgHakaHuta* this, PlayState* play) {
Math_StepToF(&this->dyna.actor.world.pos.x, this->dyna.actor.home.pos.x + posOffset, 2.0f);
if (this->counter == 0) {
this->counter = 37;
BgHakaHuta_PlaySound(this, play, NA_SE_EV_COFFIN_CAP_OPEN);
BgHakaHuta_PlaySfx(this, play, NA_SE_EV_COFFIN_CAP_OPEN);
this->actionFunc = BgHakaHuta_SlideOpen;
}
}
@ -164,7 +164,7 @@ void BgHakaHuta_SlideOpen(BgHakaHuta* this, PlayState* play) {
BgHakaHuta_SpawnDust(this, play);
}
if (this->counter == 0) {
BgHakaHuta_PlaySound(this, play, NA_SE_EV_COFFIN_CAP_BOUND);
BgHakaHuta_PlaySfx(this, play, NA_SE_EV_COFFIN_CAP_BOUND);
this->actionFunc = func_8087D720;
}
}

View file

@ -70,7 +70,7 @@ void BgHakaShip_Destroy(Actor* thisx, PlayState* play) {
BgHakaShip* this = (BgHakaShip*)thisx;
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
Audio_StopSfxByPos(&this->bellSoundPos);
Audio_StopSfxByPos(&this->bellSfxPos);
}
void BgHakaShip_ChildUpdatePosition(BgHakaShip* this, PlayState* play) {
@ -177,7 +177,7 @@ void BgHakaShip_CrashFall(BgHakaShip* this, PlayState* play) {
Actor_Kill(child);
}
} else {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG);
if ((this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 500.0f) &&
DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
Play_TriggerVoidOut(play);
@ -229,7 +229,7 @@ void BgHakaShip_Draw(Actor* thisx, PlayState* play) {
sp2C.y = this->dyna.actor.world.pos.y + 62.0f;
sp2C.z = this->dyna.actor.world.pos.z;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &sp2C, &this->bellSoundPos);
func_80078914(&this->bellSoundPos, NA_SE_EV_SHIP_BELL - SFX_FLAG);
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &sp2C, &this->bellSfxPos);
func_80078914(&this->bellSfxPos, NA_SE_EV_SHIP_BELL - SFX_FLAG);
}
}

View file

@ -14,7 +14,7 @@ typedef struct BgHakaShip {
/* 0x0168 */ u8 counter;
/* 0x0169 */ u8 switchFlag;
/* 0x016A */ s16 yOffset;
/* 0x016C */ Vec3f bellSoundPos;
/* 0x016C */ Vec3f bellSfxPos;
} BgHakaShip; // size = 0x0178
#endif

View file

@ -301,13 +301,13 @@ void func_80880484(BgHakaTrap* this, PlayState* play) {
timer = this->timer;
if ((timer == 10 && !this->unk_16A) || (timer == 13 && this->unk_16A)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GUILLOTINE_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_GUILLOTINE_BOUND);
}
if (this->timer == 0) {
this->dyna.actor.velocity.y = 0.0f;
this->timer = (this->unk_16A) ? 10 : 40;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GUILLOTINE_UP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_GUILLOTINE_UP);
this->actionFunc = func_808805C0;
}
@ -333,7 +333,7 @@ void func_808805C0(BgHakaTrap* this, PlayState* play) {
}
if (this->timer == 20) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GUILLOTINE_UP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_GUILLOTINE_UP);
}
}
@ -379,7 +379,7 @@ void func_808806BC(BgHakaTrap* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, tempf20, this->dyna.actor.velocity.y)) {
if (this->dyna.actor.velocity.y > 0.01f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_TRAP_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_TRAP_BOUND);
}
this->dyna.actor.velocity.y = 0.0f;
}

View file

@ -127,7 +127,7 @@ void BgHakaTubo_Idle(BgHakaTubo* this, PlayState* play) {
pos.z = this->dyna.actor.world.pos.z;
pos.y = this->dyna.actor.world.pos.y + 80.0f;
EffectSsBomb2_SpawnLayered(play, &pos, &sZeroVector, &sZeroVector, 100, 45);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 50, NA_SE_EV_BOX_BREAK);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 50, NA_SE_EV_BOX_BREAK);
EffectSsHahen_SpawnBurst(play, &pos, 20.0f, 0, 350, 100, 50, OBJECT_HAKA_OBJECTS, 40, gEffFragments2DL);
this->dropTimer = 5;
this->dyna.actor.draw = NULL;

View file

@ -278,12 +278,12 @@ void func_80883000(BgHakaZou* this, PlayState* play) {
func_80882E54(this, play);
this->dyna.actor.draw = NULL;
this->timer = 1;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_EXPLOSION);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_EXPLOSION);
this->actionFunc = func_80883104;
} else {
func_80882CC4(this, play);
this->timer = 1;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
this->actionFunc = func_80883104;
}
} else {
@ -314,7 +314,7 @@ void func_80883144(BgHakaZou* this, PlayState* play) {
explosionPos.z = Rand_CenteredFloat(200.0f) + (this->dyna.actor.world.pos.z + 56.0f);
EffectSsBomb2_SpawnLayered(play, &explosionPos, &sZeroVec, &sZeroVec, 150, 70);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_IT_BOMB_EXPLOSION);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_IT_BOMB_EXPLOSION);
}
if (this->timer == 0) {
@ -365,7 +365,7 @@ void func_80883328(BgHakaZou* this, PlayState* play) {
effectPos.x -= 112.0f;
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
this->timer = 25;
this->actionFunc = func_808834D8;
}

View file

@ -188,7 +188,7 @@ void BgHeavyBlock_MovePiece(BgHeavyBlock* this, PlayState* play) {
thisx->velocity.x = Rand_CenteredFloat(8.0f);
thisx->velocity.z = Rand_CenteredFloat(8.0f);
BgHeavyBlock_SetPieceRandRot(this, 1.0f);
Audio_PlayActorSound2(thisx, NA_SE_EV_ROCK_BROKEN);
Audio_PlayActorSfx2(thisx, NA_SE_EV_ROCK_BROKEN);
func_800AA000(thisx->xzDistToPlayer, 0x96, 0xA, 8);
}
}
@ -370,7 +370,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) {
// if parent is NULL, link threw it
if (Actor_HasNoParent(&this->dyna.actor, play)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HEAVY_THROW);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_HEAVY_THROW);
this->actionFunc = BgHeavyBlock_Fly;
}
}
@ -408,10 +408,10 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
Quake_SetQuakeValues(quakeIndex, 5, 0, 0, 0);
Quake_SetCountdown(quakeIndex, 999);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_ELECTRIC_EXPLOSION);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_ELECTRIC_EXPLOSION);
return;
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
quakeIndex = Quake_Add(GET_ACTIVE_CAM(play), 3);
Quake_SetSpeed(quakeIndex, 28000);
@ -422,7 +422,7 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F);
break;
case HEAVYBLOCK_UNBREAKABLE:
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
quakeIndex = Quake_Add(GET_ACTIVE_CAM(play), 3);
Quake_SetSpeed(quakeIndex, 28000);

View file

@ -146,7 +146,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) {
this->dyna.actor.speedXZ = 10.0f;
Flags_SetSwitch(play, this->switchFlag);
func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_IT_HAMMER_HIT);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_DARUMA_VANISH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_DARUMA_VANISH);
} else {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
}

View file

@ -99,7 +99,7 @@ void func_80886FCC(BgHidanFslift* this, PlayState* play) {
void func_8088706C(BgHidanFslift* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 4.0f)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
func_80886FB4(this);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG);
@ -110,7 +110,7 @@ void func_8088706C(BgHidanFslift* this, PlayState* play) {
void func_808870D8(BgHidanFslift* this, PlayState* play) {
if (DynaPolyActor_IsPlayerAbove(&this->dyna)) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 790.0f, 4.0f)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
func_80886FB4(this);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG);

View file

@ -279,7 +279,7 @@ void func_80888734(BgHidanHamstep* this) {
void func_808887C4(BgHidanHamstep* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
OnePointCutscene_Init(play, 3310, 100, &this->dyna.actor, CAM_ID_MAIN);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HAMMER_SWITCH);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_HAMMER_SWITCH);
this->collider.base.acFlags = AC_NONE;
BgHidanHamstep_SetupAction(this, 1);
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0xFF);
@ -312,7 +312,7 @@ void func_80888860(BgHidanHamstep* this, PlayState* play) {
Quake_SetSpeed(quakeIndex, -15536);
Quake_SetQuakeValues(quakeIndex, 0, 0, 500, 0);
Quake_SetCountdown(quakeIndex, 20);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 255, 20, 150);
func_80888638(this, play);
osSyncPrintf("A(%d)\n", this->dyna.actor.params);
@ -372,7 +372,7 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
Quake_SetQuakeValues(quakeIndex, 20, 1, 0, 0);
Quake_SetCountdown(quakeIndex, 7);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
func_800AA000(10000.0f, 255, 20, 150);
func_808884C8(this, play);

View file

@ -162,7 +162,7 @@ void func_808894B0(BgHidanHrock* this, PlayState* play) {
if (!(this->unk_168 % 4)) {
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 180, 10, 100);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
}
if (this->unk_168 == 0) {
@ -185,7 +185,7 @@ void func_8088960C(BgHidanHrock* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) {
this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
if (this->dyna.actor.params == 0) {
if (play->roomCtx.curRoom.num == 10) {

View file

@ -134,7 +134,7 @@ void func_80889C90(BgHidanKousi* this, PlayState* play) {
Math_Vec3f_DistXYZ(&this->dyna.actor.home.pos, &this->dyna.actor.world.pos)) {
func_80889ACC(this);
BgHidanKousi_SetupAction(this, func_80889D28);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
}

View file

@ -307,9 +307,9 @@ void BgHidanKowarerukabe_Update(Actor* thisx, PlayState* play) {
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F);
if ((this->dyna.actor.params & 0xFF) == 0) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_EXPLOSION);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_EXPLOSION);
} else {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
}
func_80078884(NA_SE_SY_CORRECT_CHIME);

View file

@ -234,7 +234,7 @@ void func_8088B69C(BgHidanRock* this, PlayState* play) {
if (!(this->timer % 4)) {
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 0xB4, 0x0A, 0x64);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
}
}
@ -250,10 +250,10 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) {
this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSound2(
&this->dyna.actor,
SurfaceType_GetSfx(&play->colCtx, this->dyna.actor.floorPoly, this->dyna.actor.floorBgId) + SFX_FLAG);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor,
SurfaceType_GetSfx(&play->colCtx, this->dyna.actor.floorPoly, this->dyna.actor.floorBgId) +
SFX_FLAG);
}
this->unk_16C -= 0.5f;
@ -305,7 +305,7 @@ void func_8088B990(BgHidanRock* this, PlayState* play) {
((this->type != 0) && (Math_SmoothStepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 480.0,
0.25f, 20.0f, 0.5f) < 0.1f))) {
if (this->type == 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
}
this->timer = 20;
this->actionFunc = func_8088B954;

View file

@ -144,7 +144,7 @@ void func_8088E5D0(BgHidanSima* this, PlayState* play) {
}
if (!(this->timer % 4)) {
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 180, 10, 100);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
}
}

View file

@ -55,7 +55,7 @@ void BgHidanSyoku_Destroy(Actor* thisx, PlayState* play) {
void func_8088F47C(BgHidanSyoku* this) {
this->timer = 60;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
this->actionFunc = func_8088F62C;
}

View file

@ -173,7 +173,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) {
}
thisx->params = 0;
func_8002DF54(play, thisx, 7);
Audio_PlayActorSound2(thisx, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(thisx, NA_SE_EV_BLOCK_BOUND);
if ((fabsf(thisx->world.pos.x + 1387.0f) < 1.0f) && (fabsf(thisx->world.pos.z + 260.0f) < 1.0f)) {
this->actionFunc = BgIceObjects_Stuck;
} else {

View file

@ -303,7 +303,7 @@ void func_8089107C(BgIceShelter* this, PlayState* play) {
}
func_808911BC(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ICE_MELT);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ICE_MELT);
}
}

View file

@ -97,7 +97,7 @@ void BgIceShutter_Destroy(Actor* thisx, PlayState* play) {
void func_80891CF4(BgIceShutter* this, PlayState* play) {
if (Flags_GetTempClear(play, this->dyna.actor.room)) {
Flags_SetClear(play, this->dyna.actor.room);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
this->actionFunc = func_80891DD4;
if (this->dyna.actor.shape.rot.x == 0) {
OnePointCutscene_Attention(play, &this->dyna.actor);
@ -107,7 +107,7 @@ void func_80891CF4(BgIceShutter* this, PlayState* play) {
void func_80891D6C(BgIceShutter* this, PlayState* play) {
if (Flags_GetSwitch(play, this->dyna.actor.params)) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
this->actionFunc = func_80891DD4;
OnePointCutscene_Attention(play, &this->dyna.actor);
}

View file

@ -96,7 +96,7 @@ void BgIceTurara_Break(BgIceTurara* this, PlayState* play, f32 arg2) {
s32 j;
s32 i;
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
for (i = 0; i < 2; i++) {
for (j = 0; j < 10; j++) {
pos.x = this->dyna.actor.world.pos.x + Rand_CenteredFloat(8.0f);
@ -137,7 +137,7 @@ void BgIceTurara_Shiver(BgIceTurara* this, PlayState* play) {
this->shiverTimer--;
}
if (!(this->shiverTimer % 4)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ICE_SWING);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ICE_SWING);
}
if (this->shiverTimer == 0) {
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x;

View file

@ -160,7 +160,7 @@ void BgJya1flift_Move(BgJya1flift* this, PlayState* play) {
tempVelocity, 1.0f)) < 0.001f) {
this->dyna.actor.world.pos.y = sFinalPositions[this->isMovingDown];
BgJya1flift_ResetMoveDelay(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG);
}

View file

@ -87,7 +87,7 @@ void func_80893428(BgJyaAmishutter* this) {
void func_80893438(BgJyaAmishutter* this) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 100.0f, 3.0f)) {
func_808934B0(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
}
@ -110,7 +110,7 @@ void func_808934FC(BgJyaAmishutter* this) {
void func_8089350C(BgJyaAmishutter* this) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.0f)) {
BgJyaAmishutter_SetupWaitForPlayer(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
}

View file

@ -149,7 +149,7 @@ void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, PlayState* play) {
if (this->timer > 10) {
BgJyaBombchuiwa_Break(this, play);
BgJyaBombchuiwa_CleanUpAfterExplosion(this, play);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
}
} else {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);

View file

@ -165,7 +165,7 @@ void BgJyaBombiwa_Update(Actor* thisx, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
BgJyaBombiwa_Break(this, play);
Flags_SetSwitch(play, this->dyna.actor.params & 0x3F);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
Actor_Kill(&this->dyna.actor);
} else {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);

View file

@ -177,7 +177,7 @@ void BgJyaGoroiwa_Move(BgJyaGoroiwa* this, PlayState* play) {
thisx->world.rot.y = 0x4000;
}
Audio_PlayActorSound2(thisx, NA_SE_EV_BIGBALL_ROLL - SFX_FLAG);
Audio_PlayActorSfx2(thisx, NA_SE_EV_BIGBALL_ROLL - SFX_FLAG);
}
void BgJyaGoroiwa_SetupWait(BgJyaGoroiwa* this) {

View file

@ -190,7 +190,7 @@ void BgJyaHaheniron_SetupRubbleCollide(BgJyaHaheniron* this) {
void BgJyaHaheniron_RubbleCollide(BgJyaHaheniron* this, PlayState* play) {
if (this->timer >= 17) {
BgJyaHaheniron_SpawnFragments(play, &this->actor.world.pos, D_808987AC);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR2);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR2);
Actor_Kill(&this->actor);
}
}

View file

@ -248,7 +248,7 @@ void func_808992E8(BgJyaIronobj* this, PlayState* play) {
this->colCylinder.base.acFlags &= ~AC_HIT;
if (actor != NULL && actor->id == ACTOR_EN_IK) {
particleFunc[this->dyna.actor.params & 1](this, play, (EnIk*)actor);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR);
dropPos.x = this->dyna.actor.world.pos.x;
dropPos.y = this->dyna.actor.world.pos.y + 20.0f;
dropPos.z = this->dyna.actor.world.pos.z;

View file

@ -101,7 +101,7 @@ void func_80899950(BgJyaKanaami* this, PlayState* play) {
this->unk_168 += 0x20;
if (Math_ScaledStepToS(&this->dyna.actor.world.rot.x, 0x4000, this->unk_168)) {
func_80899A08(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_TRAP_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_TRAP_BOUND);
quakeId = Quake_Add(GET_ACTIVE_CAM(play), 3);
Quake_SetSpeed(quakeId, 25000);
Quake_SetQuakeValues(quakeId, 2, 0, 0, 0);

View file

@ -117,7 +117,7 @@ void BgJyaLift_Move(BgJyaLift* this, PlayState* play) {
}
if (fabsf(distFromBottom) < 0.001f) {
BgJyaLift_SetFinalPosY(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG);
}

View file

@ -197,7 +197,7 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, PlayState* play) {
if (this->lightTimer > 40) {
Flags_SetSwitch(play, this->dyna.actor.params & 0x3F);
BgJyaMegami_SetupExplode(this);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION);
OnePointCutscene_Init(play, 3440, -99, &this->dyna.actor, CAM_ID_MAIN);
} else {
if (this->lightTimer < 8) {
@ -236,7 +236,7 @@ void BgJyaMegami_Explode(BgJyaMegami* this, PlayState* play) {
this->explosionTimer++;
if (this->explosionTimer == 30) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_BREAKDOWN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_BREAKDOWN);
}
for (i = 0; i < ARRAY_COUNT(this->pieces); i++) {

View file

@ -101,7 +101,7 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
(ABS((s16)(this->collider.base.ac->world.rot.y - this->actor.shape.rot.y)) > 0x5000)) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->framesUntilDisable == -1) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_AMOS_DAMAGE);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_AMOS_DAMAGE);
D_8089C1A0 += 1;
D_8089C1A0 = CLAMP_MAX(D_8089C1A0, 4);
}

View file

@ -470,9 +470,9 @@ void BgMizuBwall_Idle(BgMizuBwall* this, PlayState* play) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dList = NULL;
BgMizuBwall_SpawnDebris(this, play);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->actionFunc = BgMizuBwall_Break;
} else if (this->dyna.actor.xzDistToPlayer < 600.0f) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);

View file

@ -105,7 +105,7 @@ void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, PlayState* play) {
void BgMizuShutter_WaitForCutscene(BgMizuShutter* this, PlayState* play) {
if (this->timer-- == 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
this->actionFunc = BgMizuShutter_Move;
}
}
@ -129,7 +129,7 @@ void BgMizuShutter_Move(BgMizuShutter* this, PlayState* play) {
(this->dyna.actor.world.pos.y == this->closedPos.y) &&
(this->dyna.actor.world.pos.z == this->closedPos.z)) {
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 0x78, 0x14, 0xA);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
this->actionFunc = BgMizuShutter_WaitForSwitch;
}
}
@ -140,7 +140,7 @@ void BgMizuShutter_WaitForTimer(BgMizuShutter* this, PlayState* play) {
this->timer--;
func_8002F994(&this->dyna.actor, this->timer);
if (this->timer == 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_CLOSE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_CLOSE);
Flags_UnsetSwitch(play, BGMIZUSHUTTER_SWITCH_PARAM(&this->dyna.actor));
this->actionFunc = BgMizuShutter_Move;
}

View file

@ -61,7 +61,7 @@ void func_8089F788(BgMizuUzu* this, PlayState* play) {
} else {
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
Audio_PlayActorSound2(thisx, NA_SE_EV_WATER_CONVECTION - SFX_FLAG);
Audio_PlayActorSfx2(thisx, NA_SE_EV_WATER_CONVECTION - SFX_FLAG);
thisx->shape.rot.y += 0x1C0;
}

View file

@ -161,7 +161,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) {
if (this->dyna.actor.world.pos.y <= this->dyna.actor.home.pos.y) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
BgMoriBigst_SetupLanding(this, play);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
OnePointCutscene_Init(play, 1020, 8, &this->dyna.actor, CAM_ID_MAIN);
func_8002DF38(play, NULL, 0x3C);
}

View file

@ -161,7 +161,7 @@ void BgMoriElevator_MoveIntoGround(BgMoriElevator* this, PlayState* play) {
distToTarget = func_808A1800(&this->dyna.actor.world.pos.y, 73.0f, 0.08f, this->dyna.actor.velocity.y, 1.5f);
if (fabsf(distToTarget) < 0.001f) {
BgMoriElevator_SetupSetPosition(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
} else {
func_808A18FC(this, distToTarget);
}
@ -180,7 +180,7 @@ void BgMoriElevator_MoveAboveGround(BgMoriElevator* this, PlayState* play) {
distToTarget = func_808A1800(&this->dyna.actor.world.pos.y, 233.0f, 0.08f, this->dyna.actor.velocity.y, 1.5f);
if (fabsf(distToTarget) < 0.001f) {
BgMoriElevator_SetupSetPosition(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
} else {
func_808A18FC(this, distToTarget);
}
@ -233,7 +233,7 @@ void func_808A2008(BgMoriElevator* this, PlayState* play) {
distTo = func_808A1800(&this->dyna.actor.world.pos.y, this->targetY, 0.1f, this->dyna.actor.velocity.y, 0.3f);
if (fabsf(distTo) < 0.001f) {
BgMoriElevator_SetupSetPosition(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP);
} else {
func_808A18FC(this, distTo);

View file

@ -126,14 +126,14 @@ void BgMoriHashira4_SetupPillarsRotate(BgMoriHashira4* this) {
void BgMoriHashira4_PillarsRotate(BgMoriHashira4* this, PlayState* play) {
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y += 0x96;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ROLL_STAND_2 - SFX_FLAG);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ROLL_STAND_2 - SFX_FLAG);
}
void BgMoriHashira4_GateWait(BgMoriHashira4* this, PlayState* play) {
if (Flags_GetSwitch(play, this->switchFlag) || (this->gateTimer != 0)) {
this->gateTimer++;
if (this->gateTimer > 30) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
BgMoriHashira4_SetupAction(this, BgMoriHashira4_GateOpen);
OnePointCutscene_Init(play, 6010, 20, &this->dyna.actor, CAM_ID_MAIN);
sUnkTimer++;

View file

@ -258,7 +258,7 @@ void BgPoEvent_BlockShake(BgPoEvent* this, PlayState* play) {
if (this->timer < 15) {
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x + 2.0f * ((this->timer % 3) - 1);
if (!(this->timer % 4)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_SHAKE);
}
}
if (this->timer == 0) {
@ -314,7 +314,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, PlayState* play) {
if (this->type != 1) {
BgPoEvent_CheckBlock(this);
} else {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
func_80033E88(&this->dyna.actor, play, 5, 5);
func_80088B34(this->timer);
if (firstFall == 0) {
@ -355,7 +355,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) {
this->actionFunc = BgPoEvent_BlockReset;
if (sPuzzleState == 0x10) {
sPuzzleState = 0x40;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_RISING);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_RISING);
func_8002DF54(play, &player->actor, 8);
}
} else if (this->dyna.unk_150 != 0.0f) {
@ -394,7 +394,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) {
if (blockStop) {
player->stateFlags2 &= ~PLAYER_STATE2_4;
if ((this->dyna.unk_150 > 0.0f) && (func_800435D8(play, &this->dyna, 0x1E, 0x32, -0x14) == 0)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
}
this->dyna.unk_150 = 0.0f;
this->dyna.actor.home.pos.x = this->dyna.actor.world.pos.x;
@ -450,7 +450,7 @@ void BgPoEvent_AmyWait(BgPoEvent* this, PlayState* play) {
sPuzzleState |= 0x20;
this->timer = 5;
Actor_SetColorFilter(&this->dyna.actor, 0x4000, 0xFF, 0, 5);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EN_PO_LAUGH2);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EN_PO_LAUGH2);
this->actionFunc = BgPoEvent_AmyPuzzle;
}
}
@ -528,7 +528,7 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play) {
under the balcony allows him to be closer.
4) Link is within 45 degrees of facing the painting. */
this->timer = 0;
Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH);
Audio_PlayActorSfx2(thisx, NA_SE_EN_PO_LAUGH);
this->actionFunc = BgPoEvent_PaintingVanish;
} else if (this->collider.base.acFlags & AC_HIT) {
if (!BgPoEvent_NextPainting(this)) {
@ -538,7 +538,7 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
} else {
Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH2);
Audio_PlayActorSfx2(thisx, NA_SE_EN_PO_LAUGH2);
OnePointCutscene_Init(play, 3160, 35, thisx, CAM_ID_MAIN);
}
if (thisx->parent != NULL) {

View file

@ -116,7 +116,7 @@ void BgRelayObjects_Destroy(Actor* thisx, PlayState* play) {
void func_808A90F4(BgRelayObjects* this, PlayState* play) {
if (Flags_GetSwitch(play, this->switchFlag)) {
if (this->timer != 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
if (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE) {
this->timer = 120;
} else {
@ -137,7 +137,7 @@ void func_808A91AC(BgRelayObjects* this, PlayState* play) {
func_8002F994(&this->dyna.actor, this->timer);
}
if ((this->timer == 0) || (this->unk_169 == play->roomCtx.curRoom.num)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
this->actionFunc = func_808A9234;
}
}
@ -146,7 +146,7 @@ void func_808A9234(BgRelayObjects* this, PlayState* play) {
this->dyna.actor.velocity.y += this->dyna.actor.gravity;
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) {
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 180, 20, 100);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
if (this->unk_169 != play->roomCtx.curRoom.num) {
func_800788CC(NA_SE_EN_PO_LAUGH);
this->timer = 5;

View file

@ -181,13 +181,13 @@ void BgSpot00Hanebasi_DrawbridgeRiseAndFall(BgSpot00Hanebasi* this, PlayState* p
if (this->destAngle < 0) {
if (this->actionFunc == BgSpot00Hanebasi_DrawbridgeWait) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG);
}
} else {
if (this->actionFunc == BgSpot00Hanebasi_DrawbridgeWait) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG);
}

View file

@ -53,7 +53,7 @@ void BgSpot01Idohashira_PlayBreakSfx1(BgSpot01Idohashira* this) {
}
void BgSpot01Idohashira_PlayBreakSfx2(BgSpot01Idohashira* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 60, NA_SE_EV_WOODBOX_BREAK);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 60, NA_SE_EV_WOODBOX_BREAK);
}
void func_808AAD3C(PlayState* play, Vec3f* vec, u32 arg2) {

View file

@ -54,8 +54,8 @@ void func_808ABB84(BgSpot01Idomizu* this, PlayState* play) {
}
play->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
if (this->waterHeight < this->actor.world.pos.y) {
Audio_PlaySoundGeneral(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Math_ApproachF(&this->actor.world.pos.y, this->waterHeight, 1.0f, 2.0f);
}

View file

@ -129,7 +129,7 @@ void func_808AC908(BgSpot02Objects* this, PlayState* play) {
if (play->csCtx.state != 0) {
if (play->csCtx.npcActions[3] != NULL && play->csCtx.npcActions[3]->action == 2) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
SET_EVENTCHKINF(EVENTCHKINF_1D);
this->timer = 25;
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
@ -175,7 +175,7 @@ void func_808ACAFC(BgSpot02Objects* this, PlayState* play) {
void func_808ACB58(BgSpot02Objects* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 255.0f, 1.0f)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
this->actionFunc = func_808AC8FC;
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG);
@ -267,7 +267,7 @@ void func_808ACCB8(Actor* thisx, PlayState* play) {
void func_808AD3D4(BgSpot02Objects* this, PlayState* play) {
if (play->csCtx.state != 0 && play->csCtx.npcActions[2] != NULL && play->csCtx.npcActions[2]->action == 2) {
if (this->timer == 2) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_IT_EXPLOSION_ICE);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_IT_EXPLOSION_ICE);
}
if (this->timer < 32) {

View file

@ -152,8 +152,8 @@ void BgSpot03Taki_Draw(Actor* thisx, PlayState* play) {
this->bufferIndex = this->bufferIndex == 0;
if (this->state >= WATERFALL_OPENING_IDLE && this->state <= WATERFALL_OPENED) {
Audio_PlaySoundWaterfall(&this->dyna.actor.projectedPos, 0.5f);
Audio_PlaySfxWaterfall(&this->dyna.actor.projectedPos, 0.5f);
} else {
Audio_PlaySoundWaterfall(&this->dyna.actor.projectedPos, 1.0f);
Audio_PlaySfxWaterfall(&this->dyna.actor.projectedPos, 1.0f);
}
}

View file

@ -78,7 +78,7 @@ void func_808AE5A8(BgSpot05Soko* this, PlayState* play) {
void func_808AE5B4(BgSpot05Soko* this, PlayState* play) {
if (Flags_GetSwitch(play, this->switchFlag)) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_METALDOOR_CLOSE);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 30, NA_SE_EV_METALDOOR_CLOSE);
Actor_SetFocus(&this->dyna.actor, 50.0f);
OnePointCutscene_Attention(play, &this->dyna.actor);
this->actionFunc = func_808AE630;

View file

@ -253,7 +253,7 @@ void BgSpot06Objects_GateOpen(BgSpot06Objects* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 0.6f)) {
this->actionFunc = BgSpot06Objects_DoNothing;
this->timer = 0;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
}
@ -311,8 +311,8 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, PlayState* play) {
EffectSsGSplash_Spawn(play, &this->dyna.actor.world.pos, NULL, NULL, 1, 700);
this->collider.elements->dim.worldSphere.radius = 45;
this->actionFunc = BgSpot06Objects_LockPullOutward;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Flags_SetSwitch(play, this->switchFlag);
OnePointCutscene_Init(play, 4120, 170, &this->dyna.actor, CAM_ID_MAIN);
} else {

View file

@ -185,7 +185,7 @@ void BgSpot08Bakudankabe_Update(Actor* thisx, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
func_808B0324(this, play);
Flags_SetSwitch(play, (this->dyna.actor.params & 0x3F));
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Actor_Kill(&this->dyna.actor);
} else if (this->dyna.actor.xzDistToPlayer < 800.0f) {

View file

@ -137,7 +137,7 @@ void BgSpot11Bakudankabe_Update(Actor* thisx, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
func_808B2218(this, play);
Flags_SetSwitch(play, (this->dyna.actor.params & 0x3F));
SoundSource_PlaySfxAtFixedWorldPos(play, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Actor_Kill(&this->dyna.actor);
return;

View file

@ -114,7 +114,7 @@ void func_808B318C(BgSpot12Gate* this, PlayState* play) {
Quake_SetSpeed(var, -0x3CB0);
Quake_SetQuakeValues(var, 3, 0, 0, 0);
Quake_SetCountdown(var, 0xC);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
}

View file

@ -103,7 +103,7 @@ void func_808B3604(BgSpot12Saku* this, PlayState* play) {
this->dyna.actor.home.pos.z - (Math_CosS(this->dyna.actor.shape.rot.y + 0x4000) * temp_f18);
if (fabsf(temp_ret) < 0.0001f) {
func_808B3714(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
}

View file

@ -282,7 +282,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
} else if (approxFResult) {
player = GET_PLAYER(play);
if (func_808B4010(this, play)) {
Audio_PlayActorSound2(actor, NA_SE_EV_WOOD_BOUND);
Audio_PlayActorSfx2(actor, NA_SE_EV_WOOD_BOUND);
}
if (func_808B3A40(this, play)) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
@ -296,7 +296,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
this->unk_168 = 10;
func_808B4084(this, play);
}
Audio_PlayActorSound2(actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
Audio_PlayActorSfx2(actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
}
void func_808B4380(BgSpot15Rrbox* this, PlayState* play) {
@ -335,7 +335,7 @@ void func_808B43D0(BgSpot15Rrbox* this, PlayState* play) {
if ((floorHeight - actor->world.pos.y) >= -0.001f) {
actor->world.pos.y = floorHeight;
func_808B4084(this, play);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WOOD_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_WOOD_BOUND);
}
}

View file

@ -66,10 +66,10 @@ void func_808B4930(BgSpot15Saku* this, PlayState* play) {
void func_808B4978(BgSpot15Saku* this, PlayState* play) {
if (this->timer == 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG);
this->dyna.actor.world.pos.z -= 2.0f;
if (this->dyna.actor.world.pos.z < 2660.0f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
this->timer = 30;
this->actionFunc = func_808B4A04;
}

View file

@ -513,7 +513,7 @@ void func_808B5B6C(BgSpot16Bombstone* this, PlayState* play) {
((actor->bgCheckFlags & BGCHECKFLAG_GROUND) && actor->velocity.y < 0.0f)) {
BgSpot16Bombstone_SpawnFragments(this, play);
BgSpot16Bombstone_SpawnDust(this, play);
SoundSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EV_ROCK_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EV_ROCK_BROKEN);
Actor_Kill(actor);
return;
}

View file

@ -116,7 +116,7 @@ void BgSpot17Bakudankabe_Update(Actor* thisx, PlayState* play) {
if (this->dyna.actor.xzDistToPlayer < 650.0f && func_80033684(play, &this->dyna.actor) != NULL) {
func_808B6BC0(this, play);
Flags_SetSwitch(play, (this->dyna.actor.params & 0x3F));
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Actor_Kill(&this->dyna.actor);
}

View file

@ -259,7 +259,7 @@ void func_808B8F08(BgSpot18Obj* this, PlayState* play) {
player->stateFlags2 &= ~PLAYER_STATE2_4;
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
}

Some files were not shown because too many files have changed in this diff Show more