mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 15:01:53 -04:00
a072e71c33
* 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>
110 lines
3.1 KiB
C++
110 lines
3.1 KiB
C++
/* Z2SoundObjMgr.cpp autogenerated by split.py v0.3 at 2021-01-05 00:01:40.089663 */
|
|
|
|
#include "Z2AudioLib/Z2SoundObjMgr/Z2SoundObjMgr.h"
|
|
#include "Z2AudioLib/Z2SeqMgr/Z2SeqMgr.h"
|
|
|
|
#ifdef NONMATCHING
|
|
// order wrong because this needs to inherit from JASGlobalInstance<T>
|
|
Z2SoundObjMgr::Z2SoundObjMgr() {
|
|
lbl_80450B48 = this;
|
|
field_0x19 = 0;
|
|
this->mIsTwilightBattle = false;
|
|
this->setBattleInit();
|
|
this->setForceBattleArea(false, 700, 1100, 1500);
|
|
}
|
|
#else
|
|
asm Z2SoundObjMgr::Z2SoundObjMgr() {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802BF920.s"
|
|
}
|
|
#endif
|
|
|
|
extern "C" {
|
|
// setForceBattleArea__13Z2SoundObjMgrFbUsUsUs
|
|
// Z2SoundObjMgr::setForceBattleArea(bool, unsigned short, unsigned short, unsigned short)
|
|
asm void Z2SoundObjMgr::setForceBattleArea(bool, u16, u16, u16) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802BF980.s"
|
|
}
|
|
|
|
// searchEnemy__13Z2SoundObjMgrFv
|
|
// Z2SoundObjMgr::searchEnemy(void)
|
|
asm void Z2SoundObjMgr_NS_searchEnemy(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802BF994.s"
|
|
}
|
|
|
|
void Z2SoundObjMgr::setGhostEnemyState(u8 p1) {
|
|
if (p1 == 0x20) {
|
|
if (field_0x1a >= field_0x16) {
|
|
lbl_80450B84->setBattleGhostMute(true);
|
|
}
|
|
} else {
|
|
if (this->field_0x1a == false) {
|
|
this->field_0x19 = 0;
|
|
return;
|
|
}
|
|
}
|
|
|
|
this->field_0x19 = p1 + (this->field_0x19 & 1);
|
|
}
|
|
|
|
// getEnemyID__13Z2SoundObjMgrFPCcP26JSULink<15Z2CreatureEnemy>
|
|
// Z2SoundObjMgr::getEnemyID(const char*, JSULink<15Z2CreatureEnemy>*)
|
|
asm void Z2SoundObjMgr_NS_getEnemyID(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802C0074.s"
|
|
}
|
|
|
|
// setBattleInit__13Z2SoundObjMgrFv
|
|
// Z2SoundObjMgr::setBattleInit(void)
|
|
asm void Z2SoundObjMgr::setBattleInit() {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802C0100.s"
|
|
}
|
|
|
|
// checkBattleFinish__13Z2SoundObjMgrFv
|
|
// Z2SoundObjMgr::checkBattleFinish(void)
|
|
asm void Z2SoundObjMgr_NS_checkBattleFinish(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802C0120.s"
|
|
}
|
|
|
|
void Z2SoundObjMgr::deleteEnemyAll() {
|
|
JSULink<Z2CreatureEnemy>* link;
|
|
|
|
// not moving the link pointer forward looks like a bug, but deleteObject() actually unlinks the
|
|
// enemy from its owning list
|
|
while (link = this->getFirst(), link != NULL) {
|
|
Z2CreatureEnemy* enemy = link->getObject();
|
|
if (enemy == NULL) {
|
|
// setWarningMessage_f((JUTAssertion *)0x1,(ulong)"Z2SoundObjMgr.cpp",(char
|
|
// *)0x16f,(int)&*fill*,
|
|
// "[Z2SoundObjMgr::searchEnemy] remain remove enemy\n",in_r8);
|
|
} else {
|
|
enemy->deleteObject();
|
|
}
|
|
}
|
|
}
|
|
|
|
// removeEnemy__13Z2SoundObjMgrFP26JSULink<15Z2CreatureEnemy>
|
|
// Z2SoundObjMgr::removeEnemy(JSULink<15Z2CreatureEnemy>*)
|
|
asm void Z2SoundObjMgr_NS_removeEnemy(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802C0190.s"
|
|
}
|
|
};
|
|
|
|
bool Z2SoundObjMgr::isTwilightBattle() {
|
|
return mTwilightBattle;
|
|
}
|
|
|
|
extern "C" {
|
|
// __sinit_Z2SoundObjMgr_cpp
|
|
//
|
|
asm void func_802C01EC(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SoundObjMgr/asm/func_802C01EC.s"
|
|
}
|
|
};
|