Z2SoundObject, JAUSoundAnimator OK, work on Z2SoundHandles (#1968)

* d_a_tag_evtarea mostly done, work on d_a_npc

* work on d_a_npc_ash

* work on Z2SoundHandles

* Z2SoundObject, JAUSoundAnimator OK

* Update Progress.md

---------

Co-authored-by: randomsalience <randomsalience@gmail.com>
This commit is contained in:
randomsalience
2023-10-26 08:41:03 -04:00
committed by GitHub
parent e2d51bf956
commit b13ff9e3d0
46 changed files with 672 additions and 2539 deletions
+10 -4
View File
@@ -3,9 +3,14 @@
#include "JSystem/JAudio2/JAISoundHandles.h"
#include "JSystem/JSupport/JSUList.h"
#include "JSystem/JAudio2/JASHeapCtrl.h"
#include "dolphin/types.h"
class Z2SoundHandlePool : public JAISoundHandle, JSULink<Z2SoundHandlePool> {};
class Z2SoundHandlePool : public JAISoundHandle, public JSULink<Z2SoundHandlePool> { // , public JASPoolAllocObject<Z2SoundHandlePool> {
public:
Z2SoundHandlePool() : JAISoundHandle(), JSULink<Z2SoundHandlePool>(this) {}
~Z2SoundHandlePool() {}
};
class Z2SoundHandles : protected JSUList<Z2SoundHandlePool> {
public:
@@ -14,8 +19,8 @@ public:
void initHandlesPool(u8 pNumHandles);
void deleteHandlesPool();
void getFreeHandle();
void getLowPrioSound(JAISoundID);
JAISoundHandle* getFreeHandle();
JAISoundHandle* getLowPrioSound(JAISoundID pSoundId);
bool isActive() const;
@@ -26,7 +31,8 @@ public:
void setPos(const JGeometry::TVec3<f32>& pos);
u32 getNumHandles() const { return this->getNumLinks(); }
int getNumHandles() const { return getNumLinks(); }
JAISoundHandle* getHandle(int index) { return (Z2SoundHandlePool*)getNth(index); }
private:
/* 0xC */ u8 mNumHandles;