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>
159 lines
3.7 KiB
C++
159 lines
3.7 KiB
C++
#include "Z2AudioLib/Z2SeMgr/Z2SeMgr.h"
|
|
#include "Z2AudioLib/Z2SoundObjMgr/Z2SoundObjMgr.h"
|
|
#include "Z2AudioLib/Z2SoundStarter/Z2SoundStarter.h"
|
|
#include "Z2AudioLib/Z2SpeechMgr2/Z2SpeechMgr2.h"
|
|
#include "Z2AudioLib/Z2StatusMgr/Z2StatusMgr.h"
|
|
|
|
extern "C" {
|
|
void JAISoundHandle(void);
|
|
void JAISoundHandle_NS_dtor(void);
|
|
void Z2MultiSeObj_NS_dtor(void);
|
|
}
|
|
|
|
asm Z2SeMgr::Z2SeMgr(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AB64C.s"
|
|
}
|
|
|
|
asm Z2MultiSeObj::Z2MultiSeObj(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AB710.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::initSe(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AB750.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::resetModY(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AB80C.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::modHeightAtCamera(Vec const** param1) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AB830.s"
|
|
}
|
|
|
|
void Z2SeMgr::incrCrowdSize(void) {
|
|
mCrowdSize++;
|
|
|
|
if (mCrowdSize > 100)
|
|
mCrowdSize = 100;
|
|
}
|
|
|
|
void Z2SeMgr::decrCrowdSize(void) {
|
|
mCrowdSize--;
|
|
|
|
//! @bug probably copypasta from incrCrowdSize(), but semantically it's still correct:
|
|
//! mCrowdSize is a u8, so an underflow would result in mCrowdSize > 100, triggering the clamp.
|
|
if (mCrowdSize > 100)
|
|
mCrowdSize = 0;
|
|
}
|
|
|
|
asm void Z2SeMgr::seStart(JAISoundID, Vec const*, u32, s8, float, float, float, float, u8) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AB984.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::seStartLevel(JAISoundID, Vec const*, u32, s8, float, float, float, float, u8) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AC50C.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::seStop(JAISoundID, u32) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AD8B0.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::seStopAll(u32) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AD94C.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::seMoveVolumeAll(float, u32) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AD9F4.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::messageSePlay(u16, Vec*, s8) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802ADB14.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::talkInSe(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802ADB50.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::talkOutSe(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802ADC54.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::menuInSe(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802ADD58.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::setLevObjSE(u32, Vec*, s8) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802ADE5C.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::setMultiTriggerSE(u32, Vec*, s8) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802ADFF4.s"
|
|
}
|
|
|
|
asm void Z2SeMgr::processSeFramework(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AE184.s"
|
|
}
|
|
|
|
asm bool Z2SeMgr::isLevelSe(JAISoundID) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AE524.s"
|
|
}
|
|
|
|
asm bool Z2SeMgr::isSoundCulling(JAISoundID) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AE5B0.s"
|
|
}
|
|
|
|
asm Z2MultiSeMgr::Z2MultiSeMgr(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AEB04.s"
|
|
}
|
|
|
|
asm Z2MultiSeMgr::~Z2MultiSeMgr() {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AEB34.s"
|
|
}
|
|
|
|
asm u32 Z2MultiSeMgr::registMultiSePos(Vec*) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AEB70.s"
|
|
}
|
|
|
|
void Z2MultiSeMgr::resetMultiSePos(void) {
|
|
field_0x18 = -1;
|
|
// @todo fix when we have proper const placement
|
|
f32 zero = /* 0.0f */ lbl_80455878;
|
|
field_0x8 = zero;
|
|
this->field_0xc = zero;
|
|
this->field_0x10 = zero;
|
|
this->field_0x14 = zero;
|
|
this->field_0x4 = zero;
|
|
}
|
|
|
|
asm float Z2MultiSeMgr::getPanPower(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AECE0.s"
|
|
}
|
|
|
|
asm float Z2MultiSeMgr::getDolbyPower(void) {
|
|
nofralloc
|
|
#include "Z2AudioLib/Z2SeMgr/asm/func_802AEDC0.s"
|
|
}
|