diff --git a/config/arm9/overlays/ov023/symbols.txt b/config/arm9/overlays/ov023/symbols.txt index 27963c6323..3b2558a3c8 100644 --- a/config/arm9/overlays/ov023/symbols.txt +++ b/config/arm9/overlays/ov023/symbols.txt @@ -60,7 +60,7 @@ _ZTV16daObjFm_Battan_c kind:data(any) addr:0x02111fe4 data_ov023_02112064 kind:data(any) addr:0x02112064 data_ov023_02112080 kind:bss addr:0x02112080 data_ov023_02112088 kind:bss addr:0x02112088 -@348 kind:bss addr:0x02112090 -@347 kind:bss addr:0x0211209c +@357 kind:bss addr:0x02112090 +@356 kind:bss addr:0x0211209c data_ov023_021120a8 kind:bss addr:0x021120a8 data_ov023_021120bc kind:bss addr:0x021120bc ambiguous diff --git a/config/tu_manifest.d/ov023/daObjFm_Battan_c.json b/config/tu_manifest.d/ov023/daObjFm_Battan_c.json index e8d0164e90..cff9a0b753 100644 --- a/config/tu_manifest.d/ov023/daObjFm_Battan_c.json +++ b/config/tu_manifest.d/ov023/daObjFm_Battan_c.json @@ -165,14 +165,14 @@ "evidence": "model resource handle constructed with file ID 1558" }, { - "symbol": "@348", + "symbol": "@357", "address": "0x02112090", "size": "0xc", "binding": "STB_GLOBAL", "evidence": "compiler-generated collision resource destructor-registration node" }, { - "symbol": "@347", + "symbol": "@356", "address": "0x0211209c", "size": "0xc", "binding": "STB_GLOBAL", @@ -230,13 +230,13 @@ "evidence": "mwcc emits the ctor-table object local; DSD exposes owned symbols globally and cannot encode a local symbols.txt entry" }, { - "symbol": "@348", + "symbol": "@357", "from": "STB_LOCAL", "to": "STB_GLOBAL", "evidence": "compiler-local collision registration node is a configured initializer relocation destination at 0x02112090" }, { - "symbol": "@347", + "symbol": "@356", "from": "STB_LOCAL", "to": "STB_GLOBAL", "evidence": "compiler-local model registration node is a configured initializer relocation destination at 0x0211209c" @@ -308,7 +308,7 @@ "source": "0x02111b00", "type": "R_ARM_ABS32", "kind": "load", - "symbol": "@347", + "symbol": "@356", "addend": 0, "target_module": "ov023", "target_address": "0x0211209c" @@ -338,7 +338,7 @@ "source": "0x02111b10", "type": "R_ARM_ABS32", "kind": "load", - "symbol": "@348", + "symbol": "@357", "addend": 0, "target_module": "ov023", "target_address": "0x02112090" diff --git a/include/Sound.h b/include/Sound.h index 46f1fa9939..8316d40dab 100644 --- a/include/Sound.h +++ b/include/Sound.h @@ -21,6 +21,10 @@ #include "types.h" +/* Global scope on purpose: inside `namespace Sound` this would declare + Sound::dActor_c, which is not the type any caller is holding. */ +struct dActor_c; + namespace Sound { /* A bank-bound wrapper over Sound::Play, defined in @@ -65,6 +69,52 @@ struct Player { static void SetPlayableSeqCount(int index, int count); }; +/* The rest of the recovered Sound entry points, declared so callers stop + hand-spelling the mangled name. Two different sources, kept straight: + + PARAMETERS come from the mangled symbol. Note what that is and is not: the + image holds zero _Z... strings, so these names are this TREE's convention + rather than ROM evidence (see the Fix12 note in types.h). What they are is + the one spelling every existing caller already agrees on, which is what a + shared declaration needs. Where the convention and the bytes disagree the + bytes win -- so `5Fix12IiE` is declared Fix12i, the plain s32 the callers + actually pass, not the template the name implies. + + Sound::PlaySub and Sound::ChangeMusicVolume are deliberately NOT here. Their + definitions are mangled-name C symbols carrying `5Fix12IiE`, and no type this + tree defines mangles to that (types.h refuses to make Fix12 a template), so a + namespace-qualified call cannot reach them. Callers keep the extern spelling. + + RETURN TYPES come from each DEFINITION in src/, never from a caller. A + return type is not part of an Itanium mangled name, so the symbol is + silent on it and a caller that ignores the result evidences nothing. + + Parameter NAMES are mostly not recoverable -- the definitions carry + placeholders -- so only the ones a definition actually names are named here. + + PlaySub and ChangeMusicVolume are defined as `extern "C"` functions literally + named by the mangled symbol, so nothing type-checks across that seam and a + wrong declaration here would link silently. Their call sites are byte-verified + individually, which is what actually settles them. */ + + +void Play(u32, u32, const Vector3 &v); +void Play2D(u32, u32); +void PlayBank0(u32 id, const Vector3 &pos); +u32 PlayBank2_2D(u32); +u32 PlayCharVoice(u32, u32, const Vector3 &v); +int PlayLong(u32 handle, u32, u32, const Vector3 &pos, s16); +int PlaySecretSound(dActor_c *actor, u16 *counter); + +void PauseMusic(); +void UnpauseMusic(); +void LoadInitialGroup(int group); +void LoadAndSetMusic_Layer1(int); +void StopLoadedMusic_Layer1(u32); +void StopLoadedMusic_Layer2(); + +void UnsetPlayerVoiceGroup(); + } #endif /* __cplusplus */ diff --git a/src/_ZN10PyramidTop8BehaviorEv.cpp b/src/_ZN10PyramidTop8BehaviorEv.cpp index 7abe84c64d..8b9688be25 100644 --- a/src/_ZN10PyramidTop8BehaviorEv.cpp +++ b/src/_ZN10PyramidTop8BehaviorEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" #include "types.h" // @symbol _ZN10PyramidTop8BehaviorEv /* recovered: named members + shared header, real C++ method, declarations from a shared header */ @@ -6,7 +7,6 @@ /* recovered: named members + shared header, real C++ method */ #include "PyramidTop.h" extern "C" { -extern int _ZN5Sound15PlaySecretSoundEP8dActor_cPt(void* actor, void* pt); extern void _ZN5Sound9PlayBank3EjRK7Vector3(unsigned int bank, void* pos); } @@ -20,14 +20,14 @@ int PyramidTop::Behavior() } break; case 1: - _ZN5Sound15PlaySecretSoundEP8dActor_cPt(((char*)this), (void*)((char*)&mSoundTimer)); + Sound::PlaySecretSound((dActor_c *)(((char*)this)), (u16 *)(((char*)&mSoundTimer))); if (mStateTimer == 0) { _ZN5Sound9PlayBank3EjRK7Vector3(0x4b, (void*)((char*)&mCamSpacePosX)); } func_ov024_02111350(((char*)this)); break; case 2: - if (_ZN5Sound15PlaySecretSoundEP8dActor_cPt(((char*)this), (void*)((char*)&mSoundTimer))) { + if (Sound::PlaySecretSound((dActor_c *)(((char*)this)), (u16 *)(((char*)&mSoundTimer)))) { _ZN5Sound9PlayBank3EjRK7Vector3(0x4c, (void*)((char*)&mCamSpacePosX)); func_ov024_021112c0(((char*)this)); } else { diff --git a/src/_ZN10dScEntry_c16CleanupResourcesEv.cpp b/src/_ZN10dScEntry_c16CleanupResourcesEv.cpp index 9204e587a5..7d8f2e5dea 100644 --- a/src/_ZN10dScEntry_c16CleanupResourcesEv.cpp +++ b/src/_ZN10dScEntry_c16CleanupResourcesEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN10dScEntry_c16CleanupResourcesEv /* recovered: real C++ method */ /* dScEntry_c::CleanupResources() -- vtable slot 3. Releases the level-entry @@ -9,7 +10,6 @@ extern "C" { void func_020308b4(void *self); -void _ZN5Sound21UnsetPlayerVoiceGroupEv(void); extern void *data_0209d4a8; } @@ -21,7 +21,7 @@ s32 dScEntry_c::CleanupResources() data_0209b2e8 = (void *)0; } data_0209d4a8 = (void *)0; - _ZN5Sound21UnsetPlayerVoiceGroupEv(); + Sound::UnsetPlayerVoiceGroup(); CleanCommonModelDataArr(); return 1; } diff --git a/src/_ZN10dScTitle_c16CleanupResourcesEv.cpp b/src/_ZN10dScTitle_c16CleanupResourcesEv.cpp index 8efa4a92c4..1170164cc0 100644 --- a/src/_ZN10dScTitle_c16CleanupResourcesEv.cpp +++ b/src/_ZN10dScTitle_c16CleanupResourcesEv.cpp @@ -1,14 +1,14 @@ //cpp +#include "Sound.h" // @symbol _ZN10dScTitle_c16CleanupResourcesEv /* recovered: real C++ method */ /* dScTitle_c::CleanupResources() -- vtable slot 3. The title scene owns only * its voice group; releasing that is the whole teardown. */ #include "dScTitle_c.h" -extern "C" void _ZN5Sound21UnsetPlayerVoiceGroupEv(void); s32 dScTitle_c::CleanupResources() { - _ZN5Sound21UnsetPlayerVoiceGroupEv(); + Sound::UnsetPlayerVoiceGroup(); return 1; } diff --git a/src/_ZN11dScMiniGm_c16CleanupResourcesEv.cpp b/src/_ZN11dScMiniGm_c16CleanupResourcesEv.cpp index 57b2d8a14b..6b40cf6cab 100644 --- a/src/_ZN11dScMiniGm_c16CleanupResourcesEv.cpp +++ b/src/_ZN11dScMiniGm_c16CleanupResourcesEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN11dScMiniGm_c16CleanupResourcesEv /* recovered: real C++ method */ /* dScMiniGm_c::CleanupResources() -- vtable slot 3. Tears the running minigame @@ -7,13 +8,12 @@ #include "dScMiniGm_c.h" #include "decl_common.h" -extern "C" void _ZN5Sound21UnsetPlayerVoiceGroupEv(void); s32 dScMiniGm_c::CleanupResources() { if (data_0208a174[0] >= 0) { func_ov005_020c0030((int)this); } - _ZN5Sound21UnsetPlayerVoiceGroupEv(); + Sound::UnsetPlayerVoiceGroup(); return 1; } diff --git a/src/_ZN11dScMiniGm_c8BehaviorEv.cpp b/src/_ZN11dScMiniGm_c8BehaviorEv.cpp index 069127cb9d..ae832dd5f6 100644 --- a/src/_ZN11dScMiniGm_c8BehaviorEv.cpp +++ b/src/_ZN11dScMiniGm_c8BehaviorEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN11dScMiniGm_c8BehaviorEv /* recovered: named members + real C++ method */ /* dScMiniGm_c::Behavior() -- vtable slot 6. Runs the minigame-menu frame: a @@ -14,7 +15,6 @@ extern "C" { int func_02012790(int); int RandomIntInternal(int *seed); -void _ZN5Sound22StopLoadedMusic_Layer1Ej(unsigned int); extern unsigned char data_020a0e40; extern unsigned short data_020a0e5a[]; @@ -52,7 +52,7 @@ s32 dScMiniGm_c::Behavior() if (mExitTimer == 1) { _ZN8dScene_c20SetAndStopColorFaderEv(); ExitMinigameMenu(); - _ZN5Sound22StopLoadedMusic_Layer1Ej(0x1e); + Sound::StopLoadedMusic_Layer1(0x1e); mExiting = 1; return 1; } diff --git a/src/_ZN12dScStarSel_c13InitResourcesEv.cpp b/src/_ZN12dScStarSel_c13InitResourcesEv.cpp index 1df6f5d9ba..0b6afb8e54 100644 --- a/src/_ZN12dScStarSel_c13InitResourcesEv.cpp +++ b/src/_ZN12dScStarSel_c13InitResourcesEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN12dScStarSel_c13InitResourcesEv /* recovered: real C++ method over include/dScStarSel_c.h -- vtable slot 0. * @@ -24,8 +25,6 @@ extern "C" { void Enable3dEngines(void); -void _ZN5Sound16LoadInitialGroupEi(int); -void _ZN5Sound22LoadAndSetMusic_Layer1Ei(int); void _ZN2GX12SetBankForBGEt(u16); void _ZN2GX13SetBankForOBJEt(u16); void _ZN2GX15SetBankForSubBGEt(u16); @@ -84,12 +83,12 @@ s32 dScStarSel_c::InitResources() LoadTextNarcs(); LoadArchive(0); Enable3dEngines(); - _ZN5Sound16LoadInitialGroupEi(3); + Sound::LoadInitialGroup(3); if (data_02092110 == 0x24 || data_02092110 == 0x26 || data_02092110 == 0x28) { - _ZN5Sound22LoadAndSetMusic_Layer1Ei(0x24); + Sound::LoadAndSetMusic_Layer1(0x24); func_0201277c(0xB8); } else { - _ZN5Sound22LoadAndSetMusic_Layer1Ei(0x16); + Sound::LoadAndSetMusic_Layer1(0x16); } REG16(0x4000304) |= 0x8000; ::Initialise3dGraphics(0); diff --git a/src/_ZN13BasementWater8BehaviorEv.cpp b/src/_ZN13BasementWater8BehaviorEv.cpp index 92cf3ca767..8a571767a8 100644 --- a/src/_ZN13BasementWater8BehaviorEv.cpp +++ b/src/_ZN13BasementWater8BehaviorEv.cpp @@ -1,10 +1,9 @@ //cpp +#include "Sound.h" // @symbol _ZN13BasementWater8BehaviorEv /* recovered: named members + shared header, real C++ method */ #include "BasementWater.h" extern "C" { -extern void _ZN5Sound15PlaySecretSoundEP8dActor_cPt(void* a, unsigned short* p); -extern unsigned int _ZN5Sound8PlayLongEjjjRK7Vector3s(unsigned int a, unsigned int b, unsigned int d, void* v, unsigned int e); extern void _ZN7Minimap19UpdateLevelSpecificEv(void); extern void _ZN10dBgActor_c21UpdateModelPosAndRotYEv(void* thiz); extern void _ZN10dBgActor_c19UpdateClsnPosAndRotEv(void* thiz); @@ -16,12 +15,11 @@ extern int data_0209f32c; int BasementWater::Behavior() { if (mWasJustDrained != 0) - _ZN5Sound15PlaySecretSoundEP8dActor_cPt(((char*)this), (unsigned short*)((char*)&mSoundTimer)); + Sound::PlaySecretSound((dActor_c *)(((char*)this)), (u16 *)(((char*)&mSoundTimer))); if (mPosY <= mLoweredY) { mPosY = mLoweredY; } else if (*(int*)((char*)data_0209caa0 + 8) & 0x80000) { - mSoundID = _ZN5Sound8PlayLongEjjjRK7Vector3s( - mSoundID, 3, 0x96, (void*)((char*)&mCamSpacePosX), 0); + mSoundID = Sound::PlayLong(mSoundID, 3, 0x96, *(const Vector3 *)(((char*)&mCamSpacePosX)), 0); *(int*)((char*)&mPosY) -= 0x5000; mWasJustDrained = 1; if (mPosY <= mLoweredY) { diff --git a/src/_ZN13KoopaTheQuick16CleanupResourcesEv.cpp b/src/_ZN13KoopaTheQuick16CleanupResourcesEv.cpp index c8cc356014..1106d5012a 100644 --- a/src/_ZN13KoopaTheQuick16CleanupResourcesEv.cpp +++ b/src/_ZN13KoopaTheQuick16CleanupResourcesEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN13KoopaTheQuick16CleanupResourcesEv /* recovered: named members + shared header, real C++ method, declarations from a shared header */ #include "decl_common.h" @@ -27,6 +28,6 @@ int KoopaTheQuick::CleanupResources() _ZN13SharedFilePtr7ReleaseEv(&data_ov062_0211e03c); _ZN13SharedFilePtr7ReleaseEv(&data_ov062_0211e02c); _ZN13SharedFilePtr7ReleaseEv(&data_ov062_0211e004); - if (mIsRacing) _ZN5Sound22StopLoadedMusic_Layer2Ev(); + if (mIsRacing) Sound::StopLoadedMusic_Layer2(); return 1; } diff --git a/src/_ZN15dScMgSnowball_c8BehaviorEv.cpp b/src/_ZN15dScMgSnowball_c8BehaviorEv.cpp index 2724c77831..2c5649df04 100644 --- a/src/_ZN15dScMgSnowball_c8BehaviorEv.cpp +++ b/src/_ZN15dScMgSnowball_c8BehaviorEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN15dScMgSnowball_c8BehaviorEv #include "decl_common.h" #include "dScMgSnowball_c.h" @@ -224,7 +225,7 @@ s32 dScMgSnowball_c::Behavior() if (I(0xab3c) - I(0xaba0) < (I(0xba04) << 12) + 0x10000) { func_ov004_020adb1c(I(0xb9e0)); I(0xb9f4) = 2; - _ZN5Sound12PlayBank2_2DEj(0x10e); + Sound::PlayBank2_2D(0x10e); } break; diff --git a/src/_ZN5Stage10PS_CleanupEv.cpp b/src/_ZN5Stage10PS_CleanupEv.cpp index 499cac7629..9cc93c0760 100644 --- a/src/_ZN5Stage10PS_CleanupEv.cpp +++ b/src/_ZN5Stage10PS_CleanupEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" /* Stage::PS_Cleanup() at 0x0202d2c8. Static, like the rest of the PS_ group: * restarts the timer, unpauses or stops the music and clears the blend * registers, all through globals. */ @@ -13,8 +14,6 @@ extern unsigned char data_0209f280[]; extern unsigned short data_0209f300[]; extern unsigned char data_0209f2c4[]; extern int _ZN5Timer10StartTimerEv(void*); -extern int _ZN5Sound12UnpauseMusicEv(void); -extern int _ZN5Sound22StopLoadedMusic_Layer1Ej(unsigned int); } void Stage::PS_Cleanup(){ if(*data_0209f2a0){ @@ -23,8 +22,8 @@ void Stage::PS_Cleanup(){ } *data_0209d45c &= ~0xe; *data_0209d454 &= ~3; - if(*data_0209f280==0) _ZN5Sound12UnpauseMusicEv(); - else _ZN5Sound22StopLoadedMusic_Layer1Ej(0x3c); + if(*data_0209f280==0) Sound::UnpauseMusic(); + else Sound::StopLoadedMusic_Layer1(0x3c); *data_0209f300=0xf; *(short*)0x4000050=0; *(short*)0x4001050=0; diff --git a/src/_ZN5Stage7PS_InitEv.cpp b/src/_ZN5Stage7PS_InitEv.cpp index 42a5f5e693..571e64cb0c 100644 --- a/src/_ZN5Stage7PS_InitEv.cpp +++ b/src/_ZN5Stage7PS_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN5Stage7PS_InitEv /* recovered: real C++ method -- named members, local shadow class * @@ -46,7 +47,6 @@ extern u16 data_0209f300; extern s32 data_0209fc68; extern int SublevelToLevel(int i); -extern void _ZN5Sound10PauseMusicEv(void); extern void _ZN3G2x18SetBlendBrightnessEPVtts(volatile u16 *p, int a, int b); } @@ -105,7 +105,7 @@ void Stage::PS_Init() } } - _ZN5Sound10PauseMusicEv(); + Sound::PauseMusic(); _ZN3G2x18SetBlendBrightnessEPVtts((volatile u16 *)0x04000050, r5 | 0x20, -7); _ZN3G2x18SetBlendBrightnessEPVtts((volatile u16 *)0x04001050, r4 | 0x20, -7); } diff --git a/src/_ZN6Player13St_Throw_InitEv.cpp b/src/_ZN6Player13St_Throw_InitEv.cpp index 406537f52e..770537c09b 100644 --- a/src/_ZN6Player13St_Throw_InitEv.cpp +++ b/src/_ZN6Player13St_Throw_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player13St_Throw_InitEv /* recovered: named members + shared header, real C++ method * @@ -8,7 +9,6 @@ */ #include "Player.h" extern "C" { -extern int _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned a, unsigned b, const Vector3& v); /* SetAnim takes a Fix12 by value -- the mwccarm 6az wall, runbook section 7 -- so it stays extern "C" with a scalar in that slot. */ extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*,unsigned,int,int,unsigned); @@ -30,7 +30,7 @@ int Player::St_Throw_Init() anim30: _ZN6Player7SetAnimEji5Fix12IiEj(this, 0x30, 0x40000000, 0x1000, 0); voice: - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter, 0x13, *(const Vector3*)&mCamSpacePosX); + Sound::PlayCharVoice(mCharacter, 0x13, *(const Vector3*)&mCamSpacePosX); } else { _ZN6Player7SetAnimEji5Fix12IiEj(this, 0x8a, 0x40000000, 0x1000, 0); } diff --git a/src/_ZN6Player14St_Thrown_InitEv.cpp b/src/_ZN6Player14St_Thrown_InitEv.cpp index 5dd57961ab..1a1ae75e17 100644 --- a/src/_ZN6Player14St_Thrown_InitEv.cpp +++ b/src/_ZN6Player14St_Thrown_InitEv.cpp @@ -1,9 +1,9 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player14St_Thrown_InitEv /* recovered: named members + shared header, real C++ method */ #include "Player.h" extern "C" { -extern int _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned a, unsigned b, const Vector3& v); /* SetAnim takes a Fix12 by value -- the mwccarm 6az wall, runbook section 7 -- so it stays extern "C" with a scalar in that slot. */ extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*,unsigned,int,int,unsigned); @@ -14,7 +14,7 @@ int Player::St_Thrown_Init() int b = (mFlags & 0x400) ? 1 : 0; if (b) mStateTimer = 4; - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter, 0x1d, *(const Vector3*)&mCamSpacePosX); + Sound::PlayCharVoice(mCharacter, 0x1d, *(const Vector3*)&mCamSpacePosX); _ZN6Player7SetAnimEji5Fix12IiEj(this, 0x15, 0x40000000, 0x1000, 0x12); mStateStep = 0; mStateWork = 0; diff --git a/src/_ZN6Player16St_BurnFire_InitEv.cpp b/src/_ZN6Player16St_BurnFire_InitEv.cpp index b8777d76e4..6f0cdbebbf 100644 --- a/src/_ZN6Player16St_BurnFire_InitEv.cpp +++ b/src/_ZN6Player16St_BurnFire_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player16St_BurnFire_InitEv /* recovered: named members + shared header, real C++ method */ #include "Player.h" @@ -8,7 +9,6 @@ extern "C" { registers to the stack. It stays an extern "C" declaration with a scalar in that slot. */ extern int _ZN6Player7SetAnimEji5Fix12IiEj(void* c, unsigned int a, int b, int d, unsigned int e); -extern void _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned int charID, unsigned int soundID, const Vector3* pos); } int Player::St_BurnFire_Init() @@ -31,6 +31,6 @@ int Player::St_BurnFire_Init() mStateWork = 0; /* mCamSpacePosX/Y/Z are three consecutive words, which is the Vector3 the sound wants; dActor_c.h declares them individually rather than as one. */ - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter, 0x23, (const Vector3*)&mCamSpacePosX); + Sound::PlayCharVoice(mCharacter, 0x23, *(const Vector3 *)&mCamSpacePosX); return 1; } diff --git a/src/_ZN6Player16St_BurnLava_InitEv.cpp b/src/_ZN6Player16St_BurnLava_InitEv.cpp index c814ed8adb..89f46ba992 100644 --- a/src/_ZN6Player16St_BurnLava_InitEv.cpp +++ b/src/_ZN6Player16St_BurnLava_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player16St_BurnLava_InitEv /* recovered: named members + shared header, real C++ method, declarations from a shared header */ #include "decl_common.h" @@ -7,7 +8,6 @@ extern "C" { extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*,unsigned int,int,int,unsigned int); extern int func_ov002_020d91e0(void*,int,int); -extern int _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned int,unsigned int,struct Vector3*); extern int func_ov002_020e3078(void*,int*); } @@ -27,6 +27,6 @@ int Player::St_BurnLava_Init() mStateArg=0; } func_ov002_020d91e0(((char*)this),0x300,1); - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter,0x23,(struct Vector3*)((char*)&mCamSpacePosX)); + Sound::PlayCharVoice(mCharacter, 0x23, *(const Vector3 *)(((char*)&mCamSpacePosX))); return 1; } diff --git a/src/_ZN6Player16St_LongJump_InitEv.cpp b/src/_ZN6Player16St_LongJump_InitEv.cpp index 45523a870b..1354e57c14 100644 --- a/src/_ZN6Player16St_LongJump_InitEv.cpp +++ b/src/_ZN6Player16St_LongJump_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player16St_LongJump_InitEv /* recovered: named members + shared header, real C++ method * @@ -16,8 +17,6 @@ extern void func_ov002_020e2ad0(void* c); /* SetAnim takes a Fix12 by value -- the mwccarm 6az wall, runbook section 7 -- so it stays extern "C" with a scalar in that slot. */ extern void _ZN6Player7SetAnimEji5Fix12IiEj(void* self, unsigned int a, int b, int c, unsigned int d); -extern void _ZN5Sound9PlayBank0EjRK7Vector3(unsigned int id, Vector3 const & v); -extern void _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned int a, unsigned int b, Vector3 const & v); } int Player::St_LongJump_Init() @@ -48,10 +47,10 @@ int Player::St_LongJump_Init() /* mCamSpacePosX/Y/Z are three consecutive words; dActor_c.h declares them individually rather than as one Vector3. */ if (mIsMetal == 0) { - _ZN5Sound9PlayBank0EjRK7Vector3((u32)mGroundSoundType + 0x30, *(const Vector3*)&mCamSpacePosX); + Sound::PlayBank0((u32)mGroundSoundType + 0x30, *(const Vector3*)&mCamSpacePosX); } else { - _ZN5Sound9PlayBank0EjRK7Vector3(0xa0, *(const Vector3*)&mCamSpacePosX); + Sound::PlayBank0(0xa0, *(const Vector3*)&mCamSpacePosX); } - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter, 4, *(const Vector3*)&mCamSpacePosX); + Sound::PlayCharVoice(mCharacter, 4, *(const Vector3*)&mCamSpacePosX); return 1; } diff --git a/src/_ZN6Player17St_HoldHeavy_InitEv.cpp b/src/_ZN6Player17St_HoldHeavy_InitEv.cpp index 2cb6f5c716..130167e6bf 100644 --- a/src/_ZN6Player17St_HoldHeavy_InitEv.cpp +++ b/src/_ZN6Player17St_HoldHeavy_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player17St_HoldHeavy_InitEv /* recovered: named members + shared header, real C++ method, declarations from a shared header */ #include "decl_common.h" @@ -6,13 +7,12 @@ #include "Player.h" extern "C" { extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*,unsigned int,int,int,unsigned int); -extern int _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned int,unsigned int,struct Vector3*); } int Player::St_HoldHeavy_Init() { mStateWork=0; _ZN6Player7SetAnimEji5Fix12IiEj(((char*)this), data_ov002_020ff254[mStateWork], 0x40000000, 0x1000, 0); - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter, 0x12, (struct Vector3*)((char*)&mCamSpacePosX)); + Sound::PlayCharVoice(mCharacter, 0x12, *(const Vector3 *)(((char*)&mCamSpacePosX))); return 1; } diff --git a/src/_ZN6Player17St_LedgeGrab_InitEv.cpp b/src/_ZN6Player17St_LedgeGrab_InitEv.cpp index 25263fc07f..f721338439 100644 --- a/src/_ZN6Player17St_LedgeGrab_InitEv.cpp +++ b/src/_ZN6Player17St_LedgeGrab_InitEv.cpp @@ -1,20 +1,20 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player17St_LedgeGrab_InitEv /* recovered: named members + shared header, real C++ method */ #include "Player.h" extern "C" { extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*,unsigned int,int,int,unsigned int); -extern int _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned int,unsigned int,void*); } int Player::St_LedgeGrab_Init() { if(mStateStep){ _ZN6Player7SetAnimEji5Fix12IiEj(((char*)this),0x20,0x40000000,0x1000,0); - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter,0x1a,(void*)((char*)&mCamSpacePosX)); + Sound::PlayCharVoice(mCharacter, 0x1a, *(const Vector3 *)(((char*)&mCamSpacePosX))); } else { _ZN6Player7SetAnimEji5Fix12IiEj(((char*)this),0x23,0x40000000,0x1000,0); - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter,0x17,(void*)((char*)&mCamSpacePosX)); + Sound::PlayCharVoice(mCharacter, 0x17, *(const Vector3 *)(((char*)&mCamSpacePosX))); } return 1; } diff --git a/src/_ZN6Player19St_Electrocute_InitEv.cpp b/src/_ZN6Player19St_Electrocute_InitEv.cpp index c465694954..2655ff9e26 100644 --- a/src/_ZN6Player19St_Electrocute_InitEv.cpp +++ b/src/_ZN6Player19St_Electrocute_InitEv.cpp @@ -1,11 +1,11 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player19St_Electrocute_InitEv /* recovered: named members + shared header, real C++ method */ #include "Player.h" extern "C" { extern int func_ov002_020da9d4(void*); extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*,unsigned int,int,int,unsigned int); -extern int _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned int,unsigned int,void*); } int Player::St_Electrocute_Init() @@ -18,6 +18,6 @@ int Player::St_Electrocute_Init() *(int*)((char*)&mVertSpeed)=0; *(int*)((char*)&mVertAccel)=0; _ZN6Player7SetAnimEji5Fix12IiEj(((void*)this),0x11,0,0x1000,0); - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(*(unsigned char*)((char*)&mCharacter),7,(char*)((void*)this)+0x74); + Sound::PlayCharVoice(*(unsigned char*)((char*)&mCharacter), 7, *(const Vector3 *)((char*)((void*)this)+0x74)); return 1; } diff --git a/src/_ZN6Player19St_GroundPound_InitEv.cpp b/src/_ZN6Player19St_GroundPound_InitEv.cpp index 44362bfcf3..a1fd88e431 100644 --- a/src/_ZN6Player19St_GroundPound_InitEv.cpp +++ b/src/_ZN6Player19St_GroundPound_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player19St_GroundPound_InitEv /* recovered: named members + shared header, real C++ method */ #include "Player.h" @@ -6,7 +7,6 @@ typedef int Fix12i; extern "C" { extern int Player_ReleaseHeldActor(void*); extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*, unsigned int, int, Fix12i, unsigned int); -extern int _ZN5Sound9PlayBank0EjRK7Vector3(unsigned int, void*); } int Player::St_GroundPound_Init() @@ -21,7 +21,7 @@ int Player::St_GroundPound_Init() if (*(unsigned char*)((char*)&mIsMega)) anim=0xa3; _ZN6Player7SetAnimEji5Fix12IiEj(((void*)this), anim, 0x40000000, 0x1000, 0); *(char*)((char*)&mStateStep)=2; - _ZN5Sound9PlayBank0EjRK7Vector3(6, (char*)((void*)this)+0x74); + Sound::PlayBank0(6, *(const Vector3 *)((char*)((void*)this)+0x74)); *(int*)((int*)(((int)((void*)this) + 0x2ec))) |= 0x20; return 1; } diff --git a/src/_ZN6Player19St_GroundPound_MainEv.cpp b/src/_ZN6Player19St_GroundPound_MainEv.cpp index e09bf07206..042cd47145 100644 --- a/src/_ZN6Player19St_GroundPound_MainEv.cpp +++ b/src/_ZN6Player19St_GroundPound_MainEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player19St_GroundPound_MainEv /* recovered: named members + shared header, real C++ method * @@ -12,13 +13,11 @@ extern "C" { void _ZN6Player7SetAnimEji5Fix12IiEj(void* self, unsigned int anim, int a, int b, unsigned int c); -void _ZN5Sound13PlayCharVoiceEjjRK7Vector3(unsigned int a, unsigned int b, const Vector3* v); void func_ov002_020ef2a4(void* c, void* arg); void func_ov002_020c2f64(void* c); void func_ov002_020c0364(void* c, u32 arg); int func_ov002_020e2c84(void* self); void func_ov002_020dd908(void* sb); -void _ZN5Sound9PlayBank0EjRK7Vector3(unsigned int id, const Vector3* v); void _ZN8Particle6System9NewSimpleEj5Fix12IiES2_S2_(unsigned int id, int x, int y, int z); void func_0200d8c8(void* cam, const void* v, int strength); void func_ov002_020dbc94(void* c); @@ -55,7 +54,7 @@ int Player::St_GroundPound_Main() if (mIsMega != 0) anim = 0xa1; _ZN6Player7SetAnimEji5Fix12IiEj(this, anim, 0x40000000, 0x1000, 0); mVertSpeed = -0x32000; - _ZN5Sound13PlayCharVoiceEjjRK7Vector3(mCharacter, 0x15, (const Vector3*)&mCamSpacePosX); + Sound::PlayCharVoice(mCharacter, 0x15, *(const Vector3 *)&mCamSpacePosX); mPeakY = mPosY; } } @@ -83,9 +82,9 @@ int Player::St_GroundPound_Main() return 1; func_ov002_020dd908(this); if (mIsMega != 0) { - _ZN5Sound9PlayBank0EjRK7Vector3(0xd3, (const Vector3*)&mCamSpacePosX); + Sound::PlayBank0(0xd3, *(const Vector3 *)&mCamSpacePosX); } else { - _ZN5Sound9PlayBank0EjRK7Vector3((u32)mGroundSoundType + 0x90, (const Vector3*)&mCamSpacePosX); + Sound::PlayBank0((u32)mGroundSoundType + 0x90, *(const Vector3 *)&mCamSpacePosX); } { Vector3 v; diff --git a/src/_ZN6Player24St_SlideKickRecover_InitEv.cpp b/src/_ZN6Player24St_SlideKickRecover_InitEv.cpp index 38a1418d20..f7b0d87e69 100644 --- a/src/_ZN6Player24St_SlideKickRecover_InitEv.cpp +++ b/src/_ZN6Player24St_SlideKickRecover_InitEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN6Player24St_SlideKickRecover_InitEv /* recovered: named members + shared header, real C++ method */ #include "Player.h" @@ -7,7 +8,6 @@ extern "C" { extern int Player_ReleaseHeldActor(void*); extern int _ZN6Player7SetAnimEji5Fix12IiEj(void*, unsigned int, int, Fix12i, unsigned int); extern int func_ov002_020e25f0(void*, int); -extern int _ZN5Sound9PlayBank0EjRK7Vector3(unsigned int, void*); } int Player::St_SlideKickRecover_Init() @@ -22,6 +22,6 @@ int Player::St_SlideKickRecover_Init() *(int*)((char*)&mVertSpeed)=0x20000; _ZN6Player7SetAnimEji5Fix12IiEj(((void*)this), 0x56, 0x40000000, 0x1000, 0); func_ov002_020e25f0(((void*)this), 0); - _ZN5Sound9PlayBank0EjRK7Vector3(0xf, (char*)((void*)this)+0x74); + Sound::PlayBank0(0xf, *(const Vector3 *)((char*)((void*)this)+0x74)); return 1; } diff --git a/src/_ZN9BootScene13InitResourcesEv.cpp b/src/_ZN9BootScene13InitResourcesEv.cpp index 8d77116163..49aeba67f1 100644 --- a/src/_ZN9BootScene13InitResourcesEv.cpp +++ b/src/_ZN9BootScene13InitResourcesEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN9BootScene13InitResourcesEv /* BootScene::InitResources -- vtable slot 0, arm9 0x02005a58. * @@ -99,7 +100,7 @@ s32 BootScene::InitResources() func_020233f4(); *(u16 *)(&data_0209f5e8 + 0xc) = 0x7fff; - _ZN5Sound6Play2DEjj(4, 0); + Sound::Play2D(4, 0); data_0209f1e8 = (u8)func_0201a244((void *)func_0201a2f8, 0, 0xf, 0, 0x1000); return 1; } diff --git a/src/_ZN9TinyWater8BehaviorEv.cpp b/src/_ZN9TinyWater8BehaviorEv.cpp index b955b825c2..c0b56eeaac 100644 --- a/src/_ZN9TinyWater8BehaviorEv.cpp +++ b/src/_ZN9TinyWater8BehaviorEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN9TinyWater8BehaviorEv /* TinyWater::Behavior -- once event bit 0xe is set, drain the pool: sink one * unit a frame while looping the drain sound, and when the surface reaches @@ -12,8 +13,6 @@ extern "C" { int _ZN5Event6GetBitEj(u32 bit); -int _ZN5Sound15PlaySecretSoundEP8dActor_cPt(dActor_c *actor, u16 *timer); -int _ZN5Sound8PlayLongEjjjRK7Vector3s(u32 handle, u32 a, u32 b, const Vector3 *pos, s16 c); void _ZN7Minimap19UpdateLevelSpecificEv(void); } @@ -21,11 +20,11 @@ int TinyWater::Behavior() { if (_ZN5Event6GetBitEj(0xe)) { if (mPosY <= mMinPosY) { - if (_ZN5Sound15PlaySecretSoundEP8dActor_cPt(this, &mSoundTimer)) + if (Sound::PlaySecretSound((dActor_c *)this, (u16 *)&mSoundTimer)) MarkForDestruction(); } else { mPosY -= 0x1000; - mSoundID = _ZN5Sound8PlayLongEjjjRK7Vector3s(mSoundID, 3, 0x96, (Vector3 *)&mCamSpacePosX, 0); + mSoundID = Sound::PlayLong(mSoundID, 3, 0x96, *(const Vector3 *)&mCamSpacePosX, 0); if (mPosY <= mMinPosY) { mPosY = mMinPosY; _ZN7Minimap19UpdateLevelSpecificEv(); diff --git a/src/_ZN9dScDSMT_c16CleanupResourcesEv.cpp b/src/_ZN9dScDSMT_c16CleanupResourcesEv.cpp index 0c96467e58..28ead07368 100644 --- a/src/_ZN9dScDSMT_c16CleanupResourcesEv.cpp +++ b/src/_ZN9dScDSMT_c16CleanupResourcesEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN9dScDSMT_c16CleanupResourcesEv /* recovered: real C++ method */ /* dScDSMT_c::CleanupResources() -- vtable slot 3. Unregisters the graph @@ -8,7 +9,6 @@ #include "decl_common.h" extern "C" { -void _ZN5Sound21UnsetPlayerVoiceGroupEv(void); void func_0203cbc0(void *a); extern int data_0209d4a8; extern void *data_0209b33c; @@ -20,7 +20,7 @@ s32 dScDSMT_c::CleanupResources() dScene_c::SetAndStopColorFader(); data_0209b340[0] = func_ov007_020b6f4c(); data_0209b340[1] = 2; - _ZN5Sound21UnsetPlayerVoiceGroupEv(); + Sound::UnsetPlayerVoiceGroup(); func_0203cbc0(data_0209b33c); data_0209b33c = 0; return 1; diff --git a/src/_ZN9dScDSMT_c8BehaviorEv.cpp b/src/_ZN9dScDSMT_c8BehaviorEv.cpp index ae4aa5f485..ac137493b5 100644 --- a/src/_ZN9dScDSMT_c8BehaviorEv.cpp +++ b/src/_ZN9dScDSMT_c8BehaviorEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN9dScDSMT_c8BehaviorEv /* recovered: named members + real C++ method */ /* dScDSMT_c::Behavior() -- vtable slot 6. Pumps the download-play state @@ -26,7 +27,7 @@ s32 dScDSMT_c::Behavior() int result; if (data_ov007_02103260 >= 0 && DecIfAbove0_Short(&data_ov007_02104c28) == 0) { - _ZN5Sound22LoadAndSetMusic_Layer1Ei(data_ov007_02103260); + Sound::LoadAndSetMusic_Layer1(data_ov007_02103260); data_ov007_02103260 = -1; } diff --git a/src/actors/daBmb_c.cpp b/src/actors/daBmb_c.cpp index 21746a207d..a7cefda957 100644 --- a/src/actors/daBmb_c.cpp +++ b/src/actors/daBmb_c.cpp @@ -39,13 +39,6 @@ #include "SharedFilePtr.h" #include "dBgCh_Gnd.h" -/* func_ov102_0214b248 reaches Sound::PlayLong, which include/Sound.h does not - declare yet. Re-opening the namespace here is additive: it does not restate - anything the header already has. */ -namespace Sound { -unsigned int PlayLong(unsigned int, unsigned int, unsigned int, Vector3 const &, short); -} - /* func_ov102_0214bf64's own view of the object. It reaches fifteen fields by name through a shadow struct rather than through daBmb_c, and it is kept that way: the member is byte-matched in that spelling. The tags are uniquified diff --git a/src/game/actors/d_a_obj_ks_water.cpp b/src/game/actors/d_a_obj_ks_water.cpp index a369cf9f05..fe98932ada 100644 --- a/src/game/actors/d_a_obj_ks_water.cpp +++ b/src/game/actors/d_a_obj_ks_water.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" /* Production translation unit for ov017/daObjKsWater_c, hand-curated. * 7 function(s), .text 0x021111a0..0x021114b8. * @@ -44,8 +45,6 @@ struct KCL_File; struct CLPS_Block; extern "C" { -unsigned _ZN5Sound8PlayLongEjjjRK7Vector3s(unsigned a, unsigned b, unsigned c, - void *pos, unsigned e); void _ZN18TextureTransformer7SetFileER8BTA_Filei5Fix12IiEj( TextureTransformer *self, BTA_File *file, int flags, int speed, u32 startFrame); void _ZN10dBgW_KcMbg7SetFileEP8KCL_FileRK9Matrix4x35Fix12IiEsR10CLPS_Block( @@ -121,8 +120,7 @@ int daObjKsWater_c::Behavior() int d = mOriginalPosY - mPosY; if (d < 0) d = -d; if (d < 0x92e000) { - mSoundID = _ZN5Sound8PlayLongEjjjRK7Vector3s( - mSoundID, 3, 0x96, (void *)&mCamSpacePosX, 0); + mSoundID = Sound::PlayLong(mSoundID, 3, 0x96, *(const Vector3 *)&mCamSpacePosX, 0); mPosY -= 0x5000; } } diff --git a/src/game/actors/d_a_obj_wc_mizu.cpp b/src/game/actors/d_a_obj_wc_mizu.cpp index 9eadd4dd66..29c2dc2bcd 100644 --- a/src/game/actors/d_a_obj_wc_mizu.cpp +++ b/src/game/actors/d_a_obj_wc_mizu.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" /* PROMOTED translation unit -- ov029/daObjWc_Mizu_c (9 function(s)). * * WDW water (profile WDW_WATER 101). RTTI ov029:0x02114098 names @@ -65,7 +66,6 @@ void func_ov029_02112250(daObjWc_Mizu_c *self); void func_ov029_021122b4(daObjWc_Mizu_c *self); void Matrix4x3_FromTranslation(void *m, int x, int y, int z); int IsAreaShowing(int idx); -unsigned _ZN5Sound8PlayLongEjjjRK7Vector3s(unsigned a, unsigned b, unsigned c, void *pos, unsigned e); void _ZN18TextureTransformer7SetFileER8BTA_Filei5Fix12IiEj(void *tt, void *bta, int a, int fix, unsigned b); void _ZN10dBgW_KcMbg7SetFileEP8KCL_FileRK9Matrix4x35Fix12IiEsR10CLPS_Block( void *mc, void *kcl, void *mtx, int fix, short s, void *clps); @@ -174,8 +174,7 @@ int daObjWc_Mizu_c::Behavior() if (mPosY != mPrevPosY) { /* +0x74 is mCamSpacePosX; named &mCamSpacePosX / mSoundID CSE (size-DIFF). Sound.h has no PlayLong. */ - mSoundID = _ZN5Sound8PlayLongEjjjRK7Vector3s( - *(unsigned *)((u8 *)&mSoundID), 3, 0x96, ((u8 *)this) + 0x74, 0); + mSoundID = Sound::PlayLong(*(unsigned *)((u8 *)&mSoundID), 3, 0x96, *(const Vector3 *)(((u8 *)this) + 0x74), 0); } { diff --git a/src/game/actors/daObjPushblock_c.cpp b/src/game/actors/daObjPushblock_c.cpp index 569e6914bb..4dc7782ca3 100644 --- a/src/game/actors/daObjPushblock_c.cpp +++ b/src/game/actors/daObjPushblock_c.cpp @@ -33,7 +33,6 @@ * - func_020393a4 / func_02039394 store clip ranges on mMeshCollider * (no setter). * - func_ov002_020f0438 linked-actor helper (Behavior). - * - Sound::PlayLong has no header declaration. * - OnPushed fall-off-the-end return: adding `return 0;` emits mov r0,#0 * and DIFFs (measured 2026-08-22). */ @@ -70,10 +69,6 @@ extern SharedFilePtr data_ov002_0210df9c; extern SharedFilePtr data_ov002_0210df94; } -namespace Sound { -u32 PlayLong(u32 handle, u32 bank, u32 soundId, const Vector3 &pos, s16 pitch); -} - /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ // @symbol daObjPushblock_c_classInit diff --git a/src/game/actors/daTBasket_c/_ZN11daTBasket_c8BehaviorEv.cpp b/src/game/actors/daTBasket_c/_ZN11daTBasket_c8BehaviorEv.cpp index b0f544bc4b..e955e305d2 100644 --- a/src/game/actors/daTBasket_c/_ZN11daTBasket_c8BehaviorEv.cpp +++ b/src/game/actors/daTBasket_c/_ZN11daTBasket_c8BehaviorEv.cpp @@ -1,4 +1,5 @@ //cpp +#include "Sound.h" // @symbol _ZN11daTBasket_c8BehaviorEv /* Vtable slot 6. The cage bounces: a ground hit halves the rise speed and * kicks dust, while airborne frames trail secret sparkles (effect 0x119). @@ -13,7 +14,6 @@ * func_ov063_021169c4 is this class's own (only caller) but enrolled * separately; see daTBasket_c.h. */ extern "C" { -int _ZN5Sound15PlaySecretSoundEP8dActor_cPt(dActor_c *actor, u16 *timer); unsigned int _ZN8Particle6System3NewEjj5Fix12IiES2_S2_PK11Vector3_16fPNS_8CallbackE( unsigned int uniqueID, unsigned int effectID, int x, int y, int z, const void *dir, void *callback); @@ -26,7 +26,7 @@ int daTBasket_c::Behavior() int secretDone = 1; if (mMuteSecretSound == 0) - secretDone = _ZN5Sound15PlaySecretSoundEP8dActor_cPt(this, (u16 *)&mSoundTimer); + secretDone = Sound::PlaySecretSound((dActor_c *)this, (u16 *)&mSoundTimer); if (mWithMeshClsn.JustHitGround()) { int vertSpeed = mVertSpeed;