mirror of
https://github.com/zeldaret/tp
synced 2026-06-21 16:37:02 -04:00
Z2AudioLib misc decomp (#75)
* Z2SoundHandles: decomp portions
* start decomping: Z2SpeechMgr2, Z2SoundHandles
* Z2SoundHandles::stopAllSounds(): ok
* Z2SoundHandles::getHandleUserData(): ok
* Z2SoundInfo: header
* Z2SoundObjBase::framework(): ok
* Z2SoundObjBase::Z2SoundObjBase(), Z2SoundObjBase::init(): ok
* Z2SoundObjBase::~Z2SoundObjBase(): ok
* Z2SoundObjBase::stopOK(): ok
* Z2SoundObjBase::stopOK, incomplete Z2SoundObjBase::dispose()
* clang-format
* Z2SoundObjBase::dispose(): ok
* JAISound::operator->(): null assert
* JAIAudience: stub
* Z2SoundObject::{init, deleteObject, isAlive}: ok
* Z2SeMgr: elaborate struct (and decl JAISoundHandles to support this)
* start subclassing Z2SoundObjBase; nonmatching Z2SoundObjSimple::init()
* Z2SeMGr::{incrCrowdSize, decrCrowdSize}: ok
* Z2MultiSeMgr::resetMultiSePos(): ok
* Z2WolfHowlMgr.h: decls
* Z2SoundStarter: move to decls and fix postprocess.py symbol pass
* Z2AudioArcLoader: decls
* Z2SoundObjMgr: ok some fns
- deleteEnemyAll()
- isTwilightBattle()
- setGhostEnemyState()
additionally elaborates parts of the Z2Creature hierarchy
* delete unused .s files and add tool to find them (only runs on linux)
* run clang-format
* postprocess.py: comment out debugging
* add python step to ok-check workflow
* address review comments
* address review comments
Co-authored-by: notyourav <65437533+notyourav@users.noreply.github.com>
Co-authored-by: Pheenoh <pheenoh@gmail.com>
Co-authored-by: notyourav <65437533+notyourav@users.noreply.github.com>
This commit is contained in:
@@ -1,57 +1,63 @@
|
||||
/* Z2SoundHandles.cpp autogenerated by split.py v0.3 at 2021-01-05 01:21:30.657620 */
|
||||
|
||||
#include "Z2AudioLib/Z2SoundHandles/Z2SoundHandles.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
// __ct__14Z2SoundHandlesFv
|
||||
// Z2SoundHandles::Z2SoundHandles(void)
|
||||
asm void Z2SoundHandles(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB07C.s"
|
||||
Z2SoundHandles::Z2SoundHandles() {
|
||||
mNumHandles = 0;
|
||||
}
|
||||
|
||||
// __dt__14Z2SoundHandlesFv
|
||||
// Z2SoundHandles::~Z2SoundHandles(void)
|
||||
asm void Z2SoundHandles_NS_dtor(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB0B4.s"
|
||||
Z2SoundHandles::~Z2SoundHandles() {
|
||||
deleteHandlesPool();
|
||||
}
|
||||
|
||||
// initHandlesPool__14Z2SoundHandlesFUc
|
||||
// Z2SoundHandles::initHandlesPool(unsigned char)
|
||||
asm void Z2SoundHandles_NS_initHandlesPool(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB118.s"
|
||||
void Z2SoundHandles::initHandlesPool(u8 pNumHandles) {
|
||||
mNumHandles = pNumHandles;
|
||||
}
|
||||
|
||||
// deleteHandlesPool__14Z2SoundHandlesFv
|
||||
// Z2SoundHandles::deleteHandlesPool(void)
|
||||
asm void Z2SoundHandles_NS_deleteHandlesPool(void) {
|
||||
asm void Z2SoundHandles::deleteHandlesPool() {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB120.s"
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
// __dt__31JASMemPool<17Z2SoundHandlePool>Fv
|
||||
// JASMemPool<17Z2SoundHandlePool>::~JASMemPool<17Z2SoundHandlePool>(void)
|
||||
asm void JASMemPool_NS_dtor_X4_(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB200.s"
|
||||
}
|
||||
};
|
||||
|
||||
// getHandleSoundID__14Z2SoundHandlesF10JAISoundID
|
||||
// Z2SoundHandles::getHandleSoundID(JAISoundID)
|
||||
asm void Z2SoundHandles_NS_getHandleSoundID(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB254.s"
|
||||
JAISoundHandle* Z2SoundHandles::getHandleSoundID(JAISoundID pSoundId) {
|
||||
JSULink<Z2SoundHandlePool>* link;
|
||||
for (link = this->getFirst(); link != NULL; link = link->getNext()) {
|
||||
JAISoundHandle* handle = link->getObject();
|
||||
if (handle->isSoundAttached()) {
|
||||
if ((*handle)->getID() == pSoundId) {
|
||||
return handle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// getHandleUserData__14Z2SoundHandlesFUl
|
||||
// Z2SoundHandles::getHandleUserData(unsigned long)
|
||||
asm void Z2SoundHandles_NS_getHandleUserData(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB2A0.s"
|
||||
JAISoundHandle* Z2SoundHandles::getHandleUserData(u32 pUserData) {
|
||||
JSULink<Z2SoundHandlePool>* link;
|
||||
for (link = this->getFirst(); link != NULL; link = link->getNext()) {
|
||||
JAISoundHandle* handle = link->getObject();
|
||||
if (handle->isSoundAttached()) {
|
||||
if ((*handle)->getUserData() == pUserData) {
|
||||
return handle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
// getFreeHandle__14Z2SoundHandlesFv
|
||||
// Z2SoundHandles::getFreeHandle(void)
|
||||
asm void Z2SoundHandles_NS_getFreeHandle(void) {
|
||||
@@ -65,25 +71,37 @@ asm void Z2SoundHandles_NS_getLowPrioSound(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB3D0.s"
|
||||
}
|
||||
};
|
||||
|
||||
// stopAllSounds__14Z2SoundHandlesFUl
|
||||
// Z2SoundHandles::stopAllSounds(unsigned long)
|
||||
asm void Z2SoundHandles_NS_stopAllSounds(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB4A0.s"
|
||||
void Z2SoundHandles::stopAllSounds(u32 fadeout) {
|
||||
JSULink<Z2SoundHandlePool>* link;
|
||||
for (link = this->getFirst(); link != NULL; link = link->getNext()) {
|
||||
JAISoundHandle* handle = link->getObject();
|
||||
//! @meme: explicit operator bool call required to match and be similar
|
||||
//! to CHN_debug; could more concisely write handle->isSoundAttached
|
||||
//! (for some reason cast-to-bool doesn't work?)
|
||||
if (handle && handle->operator bool()) {
|
||||
(*handle)->stop(fadeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// isActive__14Z2SoundHandlesCFv
|
||||
// Z2SoundHandles::isActive(void) const
|
||||
asm void Z2SoundHandles_NS_isActive(void) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB504.s"
|
||||
bool Z2SoundHandles::isActive() const {
|
||||
JSULink<Z2SoundHandlePool>* link;
|
||||
for (link = this->getFirst(); link != NULL; link = link->getNext()) {
|
||||
if (link->getObject()->isSoundAttached()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// setPos__14Z2SoundHandlesFRCQ29JGeometry8TVec3<f>
|
||||
// Z2SoundHandles::setPos(JGeometry::TVec3<f>)
|
||||
asm void Z2SoundHandles_NS_setPos(void) {
|
||||
asm void Z2SoundHandles::setPos(const JGeometry::TVec3<f32>& pos) {
|
||||
nofralloc
|
||||
#include "Z2AudioLib/Z2SoundHandles/asm/func_802AB538.s"
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user