Misc cleanup

This commit is contained in:
LagoLunatic
2025-01-08 15:42:47 -05:00
parent 3d63a54587
commit f74fd75332
14 changed files with 34 additions and 24 deletions
+2 -2
View File
@@ -68,8 +68,8 @@ inline void mDoAud_bgmStreamPlay() {
mDoAud_zelAudio_c::getInterface()->bgmStreamPlay();
}
inline void mDoAud_bgmStop(u32 param_0) {
mDoAud_zelAudio_c::getInterface()->bgmStop(param_0, 0);
inline void mDoAud_bgmStop(u32 i_fadeTime) {
mDoAud_zelAudio_c::getInterface()->bgmStop(i_fadeTime, 0);
}
inline void mDoAud_bgmAllMute(u32 param_0) {
+1 -1
View File
@@ -161,7 +161,7 @@ public:
* Translates the `now` Matrix by the given cXyz
* @param xyz The xyz translation vector
*/
static inline void transS(cXyz const& xyz) { MTXTrans(now, xyz.x, xyz.y, xyz.z); }
static inline void transS(cXyz const& xyz) { transS(xyz.x, xyz.y, xyz.z); }
/**
* Translates a new Matrix by the given cXyz and then concatenates it with the `now` matrix
+9 -1
View File
@@ -5,10 +5,18 @@
#include "JAZelAudio/JAIZelAnime.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_audio.h"
/* 802AC830-802AC888 .text setAnimSound__11JAIZelAnimeFP3VecffUlSc */
void JAIZelAnime::setAnimSound(Vec* pos, f32 frame, f32 rate, u32 mtrlSndId, s8 reverb) {
/* Nonmatching */
u32 r6 = (mtrlSndId & 0x00FFFFFF) + (reverb << 24);
if (rate == 0.0f) {
return;
}
if (rate < 0.0f) {
rate *= -1.0f;
}
setAnimSoundVec(mDoAud_zelAudio_c::getInterface(), pos, frame, rate, r6, 0);
}
/* 802AC888-802ACD34 .text startAnimSound__11JAIZelAnimeFPvUlPP8JAISoundPQ27JAInter5ActorUc */
+5 -5
View File
@@ -304,23 +304,23 @@ void JAIZelBasic::bgmStart(u32, u32, s32) {
}
/* 802A4658-802A4770 .text bgmStop__11JAIZelBasicFUll */
void JAIZelBasic::bgmStop(u32 param_1, s32 param_2) {
void JAIZelBasic::bgmStop(u32 i_fadeTime, s32 param_2) {
if (mMainBgmNum != JA_BGM_GOMA && mMainBgmNum != JA_BGM_GOMA_2) {
mSomeSpecialBGMFlag = 0;
}
if (mpMainBgmSound) {
mpMainBgmSound->stop(param_1);
mpMainBgmSound->stop(i_fadeTime);
}
mpMainBgmSound = NULL;
mMainBgmNum = -1;
if (mpStreamBgmSound) {
mpStreamBgmSound->stop(param_1);
mpStreamBgmSound->stop(i_fadeTime);
}
mpStreamBgmSound = NULL;
mStreamBgmNum = -1;
if (param_2 == 0) {
if (mpSubBgmSound) {
mpSubBgmSound->stop(param_1);
mpSubBgmSound->stop(i_fadeTime);
mpSubBgmSound = NULL;
}
mSubBgmNum = -1;
@@ -328,7 +328,7 @@ void JAIZelBasic::bgmStop(u32 param_1, s32 param_2) {
field_0x00bb = 0;
field_0x0206 = 0;
}
demoBgmStop(param_1);
demoBgmStop(i_fadeTime);
field_0x1f3c = 0;
field_0x0201 = 0;
mLastMinibossSubBGMType = 0;
+1 -1
View File
@@ -228,7 +228,7 @@ void JAIBasic::startSoundBasic(u32, JAISound**, JAInter::Actor*, u32, u8, void*)
}
/* 80290708-802907E0 .text stopSoundHandle__8JAIBasicFP8JAISoundUl */
void JAIBasic::stopSoundHandle(JAISound*, u32) {
void JAIBasic::stopSoundHandle(JAISound*, u32 fadeTime) {
/* Nonmatching */
}
+1 -1
View File
@@ -186,7 +186,7 @@ void JAInter::SequenceMgr::storeSeqBuffer(JAISound**, JAInter::Actor*, u32, u32,
}
/* 80298208-802982C0 .text releaseSeqBuffer__Q27JAInter11SequenceMgrFP8JAISoundUl */
void JAInter::SequenceMgr::releaseSeqBuffer(JAISound*, u32) {
void JAInter::SequenceMgr::releaseSeqBuffer(JAISound*, u32 fadeTime) {
/* Nonmatching */
}
+2 -2
View File
@@ -55,8 +55,8 @@ void JAISound::start(u32 param_1) {
}
/* 80298688-802986B8 .text stop__8JAISoundFUl */
void JAISound::stop(u32 param_1) {
JAIBasic::msBasic->stopSoundHandle(this, param_1);
void JAISound::stop(u32 fadeTime) {
JAIBasic::msBasic->stopSoundHandle(this, fadeTime);
}
/* 802986B8-8029878C .text setVolume__8JAISoundFfUlUc */
+1 -1
View File
@@ -264,7 +264,7 @@ bool JUTException::searchPartialModule(u32 address, u32* module_id, u32* section
return false;
}
OSModuleInfo* module = *(OSModuleInfo**)0x800030C8;
OSModuleInfo* module = __OSModuleList.head;
for (; module != NULL; module = (OSModuleInfo*)module->link.next) {
OSSectionInfo* section = (OSSectionInfo*)module->sectionInfoOffset;
for (u32 i = 0; i < module->numSections; section++, i++) {
+2
View File
@@ -67,6 +67,8 @@ BOOL daBg_btkAnm_c::create(J3DModelData* modelData, J3DAnmTextureSRTKey* anmData
void daBg_btkAnm_c::entry(J3DModelData* modelData) {
anm->entry(modelData, 0.0f);
// Bg model material names that start with the prefix "SC_01" trigger special BTK animation behavior.
// These BTK animations will animate in sync with the global wave timer, as controlled by a SOND entry.
const char * name = anm->getBtkAnm()->getUpdateMaterialName()->getName(0);
if (name[0] == 'S' && name[1] == 'C' && name[2] == '_' && name[3] == '0' && name[4] == '1')
special = 1;
+6 -6
View File
@@ -769,7 +769,7 @@ BOOL daNpc_Ji1_c::kaitenAction(void*) {
if(field_0x2AC == 0x967) {
field_0xD70 = -1;
fopAcM_seStart(this, JA_SE_VS_JI_OPENING, 0);
mDoAud_bgmStop(0x0000002D);
mDoAud_bgmStop(45);
setAction(&daNpc_Ji1_c::plmoveAction, 0);
}
@@ -1072,7 +1072,7 @@ BOOL daNpc_Ji1_c::talkAction(void*) {
if(field_0x2AC == 0x98A) {
field_0xD70 = -1;
fopAcM_seStart(this, JA_SE_VS_JI_OPENING, 0);
mDoAud_bgmStop(0x0000002D);
mDoAud_bgmStop(45);
setAction(&daNpc_Ji1_c::plmoveAction, 0);
}
@@ -1088,7 +1088,7 @@ BOOL daNpc_Ji1_c::talkAction(void*) {
field_0xD70 = -1;
fopAcM_seStart(this, JA_SE_VS_JI_OPENING, 0);
mDoAud_bgmStop(0x0000002D);
mDoAud_bgmStop(45);
setAction(&daNpc_Ji1_c::plmoveAction, 0);
}
@@ -1558,10 +1558,10 @@ u32 daNpc_Ji1_c::evn_sound_proc_init(int staffIdx) {
if(data) {
switch(*data) {
case 0:
mDoAud_bgmStop(0x0000002D);
mDoAud_bgmStop(45);
break;
case 1:
mDoAud_bgmStart(0x80000018);
mDoAud_bgmStart(JA_BGM_HOUSE_G);
break;
case 2:
fopAcM_seStart(this, JA_SE_VS_JI_ENDING, 0);
@@ -1975,7 +1975,7 @@ BOOL daNpc_Ji1_c::endspeakAction(void*) {
}
else if(l_msg->mStatus == fopMsgStts_BOX_CLOSED_e) {
l_msg->mStatus = fopMsgStts_MSG_DESTROYED_e;
mDoAud_bgmStop(0x2D);
mDoAud_bgmStop(45);
setAction(&daNpc_Ji1_c::reiAction, 0);
}
}
+1 -1
View File
@@ -798,7 +798,7 @@ int daObjMknjD::Act_c::Execute(Mtx** i_mtx) {
if (eventInfo.checkCommandDemoAccrpt()) {
m043F = 7;
mDoAud_bgmStop(0x1E);
mDoAud_bgmStop(30);
mDoAud_taktModeMuteOff();
dComIfGp_getAttention().mFlags |= 0x80000000;
+1 -1
View File
@@ -146,7 +146,7 @@ static BOOL dScnMenu_Execute(menu_of_scene_class* i_this) {
dComIfGp_setNextStage(room->stageName, startCode, room->roomNo, room->layerNo);
if (strcmp(dComIfGp_getNextStageName(), "ENDING") == 0) {
fopScnM_ChangeReq(i_this, PROC_ENDING_SCENE, PROC_OVERLAP0, 5);
mDoAud_bgmStop(0x1E);
mDoAud_bgmStop(30);
} else {
fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, PROC_OVERLAP0, 5);
dComIfGs_setRestartRoomParam(0);
+1 -1
View File
@@ -21,7 +21,7 @@
#include "dolphin/gx/GXStruct.h"
#include "dolphin/vi/vi.h"
#include "m_Do/m_Do_DVDError.h"
#include "m_do/m_Do_MemCard.h"
#include "m_Do/m_Do_MemCard.h"
#include "m_Do/m_Do_dvd_thread.h"
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_machine_exception.h"
+1 -1
View File
@@ -44,7 +44,7 @@ extern "C" int search_partial_address(void* address, int* module_id, int* sectio
if (address == NULL)
return 0xFFFFFFFF;
OSModuleInfo* module = *(OSModuleInfo**)0x800030C8;
OSModuleInfo* module = __OSModuleList.head;
for (; module != NULL; module = (OSModuleInfo*)module->link.next) {
u32 i, addr;
OSSectionInfo* section = (OSSectionInfo*)module->sectionInfoOffset;