diff options
| author | Léo Lam <leo@leolam.fr> | 2026-09-28 03:39:31 +0200 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2026-10-13 01:53:08 +0200 |
| commit | fa2b8b7d4738e5ee098fc105adc60e10356dd410 (patch) | |
| tree | 2c8e3a8180401385f6e24c1e26ac58ef839d30c6 /src/KingSystem/Sound/sndSound.cpp | |
| parent | b26086477c7d8897c76e328c89d718b3c02a9ae9 (diff) | |
Move code to the TUs that match link order and rename files
Rename classes and files so that they sort where their code is linked,
and move code that is linked inside another TU into that TU's file.
| Old | New | TU start |
|---|---|---|
| ActorAreaInOutSendMessage | AreaInOutSendMessage | 0x710009fa64 |
| AreaTagAction | AreaActionBase | 0x7100e21e64 |
| sndResource.{h,cpp} | sndSound.{h,cpp} | |
| Code | From | To |
|---|---|---|
| SoundMgr | sndMgr.h | sndSound.h |
| PlayReport | PlayReportMgr.cpp | PlayReport.cpp |
| PlayReport::addPlayTimes, addPosition | PlayReportMgr.cpp | ProductReporter.cpp |
(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
Diffstat (limited to 'src/KingSystem/Sound/sndSound.cpp')
| -rw-r--r-- | src/KingSystem/Sound/sndSound.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/KingSystem/Sound/sndSound.cpp b/src/KingSystem/Sound/sndSound.cpp new file mode 100644 index 00000000..b9eb6422 --- /dev/null +++ b/src/KingSystem/Sound/sndSound.cpp @@ -0,0 +1,26 @@ +#include "KingSystem/Sound/sndSound.h" +#include <heap/seadDisposer.h> +#include <heap/seadExpHeap.h> +#include <heap/seadFrameHeap.h> + +namespace ksys::snd { + +SEAD_SINGLETON_DISPOSER_IMPL(SoundResource) + +SoundResource::~SoundResource() { + mSoundResourceHeap->destroy(); + _30->destroy(); + if (mSoundDebugHeap) + mSoundDebugHeap->destroy(); +} + +void SoundResource::init(sead::Heap* heap, sead::Heap* debug_heap, bool extra_large) { + mSoundResourceHeap = + sead::FrameHeap::create(extra_large ? 0x9583000 : 0x6383000, "SoundResource", heap, 0x1000, + sead::FrameHeap::cHeapDirection_Forward, false); + if (debug_heap) + mSoundDebugHeap = sead::ExpHeap::create(0x1E00000u, "SoundDebug", debug_heap, 0x1000, + sead::ExpHeap::cHeapDirection_Forward, false); +} + +} // namespace ksys::snd
\ No newline at end of file |
