mirror of https://github.com/zeldaret/botw.git
Merge pull request #35 from MonsterDruide1/master
ksys/snd: Add SoundResource
This commit is contained in:
commit
1379a95f0a
|
@ -92876,12 +92876,12 @@
|
||||||
0x00000071011fa294,sub_71011FA294,100,
|
0x00000071011fa294,sub_71011FA294,100,
|
||||||
0x00000071011fa2f8,sub_71011FA2F8,108,
|
0x00000071011fa2f8,sub_71011FA2F8,108,
|
||||||
0x00000071011fa364,Sound::createInstance,464,
|
0x00000071011fa364,Sound::createInstance,464,
|
||||||
0x00000071011fa534,sub_71011FA534,100,
|
0x00000071011fa534,sub_71011FA534,100,_ZN4ksys3snd13SoundResource18SingletonDisposer_D1Ev
|
||||||
0x00000071011fa598,sub_71011FA598,108,
|
0x00000071011fa598,sub_71011FA598,108,_ZN4ksys3snd13SoundResource18SingletonDisposer_D0Ev
|
||||||
0x00000071011fa604,SoundResource::createInstance,152,
|
0x00000071011fa604,SoundResource::createInstance,152,_ZN4ksys3snd13SoundResource14createInstanceEPN4sead4HeapE
|
||||||
0x00000071011fa69c,sub_71011FA69C,104,
|
0x00000071011fa69c,sub_71011FA69C,104,_ZN4ksys3snd13SoundResourceD1Ev
|
||||||
0x00000071011fa704,sub_71011FA704,100,
|
0x00000071011fa704,sub_71011FA704,100,_ZN4ksys3snd13SoundResourceD0Ev
|
||||||
0x00000071011fa768,SoundResource::init,176,
|
0x00000071011fa768,SoundResource::init,176,_ZN4ksys3snd13SoundResource4initEPN4sead4HeapES4_b
|
||||||
0x00000071011fa818,sub_71011FA818,72,
|
0x00000071011fa818,sub_71011FA818,72,
|
||||||
0x00000071011fa860,sub_71011FA860,728,
|
0x00000071011fa860,sub_71011FA860,728,
|
||||||
0x00000071011fab38,sub_71011FAB38,68,
|
0x00000071011fab38,sub_71011FAB38,68,
|
||||||
|
|
Can't render this file because it is too large.
|
|
@ -1,5 +1,6 @@
|
||||||
target_sources(uking PRIVATE
|
target_sources(uking PRIVATE
|
||||||
sndInfoData.cpp
|
sndInfoData.cpp
|
||||||
sndInfoData.h
|
sndInfoData.h
|
||||||
|
sndResource.cpp
|
||||||
sndResource.h
|
sndResource.h
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#include "KingSystem/Sound/sndResource.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
|
|
@ -5,19 +5,19 @@
|
||||||
|
|
||||||
namespace ksys::snd {
|
namespace ksys::snd {
|
||||||
|
|
||||||
// FIXME: incomplete
|
|
||||||
class SoundResource {
|
class SoundResource {
|
||||||
SEAD_SINGLETON_DISPOSER(SoundResource)
|
SEAD_SINGLETON_DISPOSER(SoundResource)
|
||||||
SoundResource() = default;
|
SoundResource() = default;
|
||||||
virtual ~SoundResource();
|
virtual ~SoundResource();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void init(sead::Heap* heap, sead::Heap* debug_heap, bool extra_large);
|
||||||
sead::Heap* getSoundDebugHeap() const { return mSoundDebugHeap; }
|
sead::Heap* getSoundDebugHeap() const { return mSoundDebugHeap; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
sead::Heap* mSoundResourceHeap;
|
sead::Heap* mSoundResourceHeap = nullptr;
|
||||||
void* _30;
|
sead::Heap* _30 = nullptr; // TODO find out what this does
|
||||||
sead::Heap* mSoundDebugHeap;
|
sead::Heap* mSoundDebugHeap = nullptr;
|
||||||
};
|
};
|
||||||
KSYS_CHECK_SIZE_NX150(SoundResource, 0x40);
|
KSYS_CHECK_SIZE_NX150(SoundResource, 0x40);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue