Files
tp/libs/Z2AudioLib/Z2SceneMgr.cpp
T

132 lines
3.7 KiB
C++
Raw Normal View History

2020-12-02 18:35:32 -07:00
#include "Z2AudioLib/Z2SceneMgr/Z2SceneMgr.h"
2020-12-13 12:43:16 -08:00
#include "Z2AudioLib/Z2SeMgr/Z2SeMgr.h"
#include "Z2AudioLib/Z2StatusMgr/Z2StatusMgr.h"
2020-12-05 20:30:55 -08:00
#include "d/d_com/d_com_inf_game/d_com_inf_game.h"
2020-12-02 18:35:32 -07:00
2020-12-26 11:31:49 -05:00
// Missing 2 instructions (beginning and end)
2020-12-02 18:35:32 -07:00
#ifdef NONMATCHING
2020-12-26 11:31:49 -05:00
Z2SceneMgr::Z2SceneMgr(void) {
2020-12-02 18:35:32 -07:00
lbl_80450B80 = this;
2020-12-13 12:43:16 -08:00
this->sceneNum = -1;
2020-12-02 18:35:32 -07:00
this->timer = -1;
this->BGM_ID = -1;
this->roomNum = -1;
this->SeWave_1 = 0;
this->SeWaveToErase_1 = 0;
this->SeWave_2 = 0;
this->SeWaveToErase_2 = 0;
this->BgmWave_1 = 0;
this->BgmWaveToErase_1 = 0;
this->BgmWave_2 = 0;
this->BgmWaveToErase_2 = 0;
this->SeWave_3 = 0;
this->SeWaveToErase_3 = 0;
this->field_0x18 = 0;
this->field_0x19 = 0;
this->field_0x1a = 0;
this->field_0x1b = 0;
2020-12-13 12:43:16 -08:00
this->sceneExist = 0;
this->inGame = 0;
this->inDarkness = false;
2020-12-02 18:35:32 -07:00
this->field_0x17 = 0;
return;
}
#else
2020-12-26 11:31:49 -05:00
asm Z2SceneMgr::Z2SceneMgr(void) {
2020-12-02 18:35:32 -07:00
nofralloc
2020-12-26 11:31:49 -05:00
#include "Z2AudioLib/Z2SceneMgr/asm/func_802B6840.s"
2020-12-02 18:35:32 -07:00
}
#endif
2020-12-26 11:31:49 -05:00
void Z2SceneMgr::setInDarkness(bool param_1) {
2020-12-02 18:35:32 -07:00
this->inDarkness = param_1;
2020-12-26 11:31:49 -05:00
if (param_1 == false) {
2020-12-02 18:35:32 -07:00
lbl_80450B60->resetFilterAll();
}
return;
}
extern float lbl_80455A38;
extern float lbl_80455A3C;
#ifdef NONMATCHING
2020-12-26 11:31:49 -05:00
void Z2SceneMgr::setSceneExist(bool param_1) {
Z2SoundMgr* Z2soundMgrPtr;
2020-12-13 12:43:16 -08:00
this->sceneExist = param_1;
2020-12-02 18:35:32 -07:00
this->timer = 0;
Z2soundMgrPtr = lbl_80450B60;
2020-12-26 11:31:49 -05:00
if (param_1 == false) {
Z2soundMgrPtr->JAISoundParamsMove->moveVolume(lbl_80455A38, 0xb4);
} else {
2020-12-13 12:43:16 -08:00
this->inGame = 1;
2020-12-02 18:35:32 -07:00
if (this->SeWave_3 == 0x85) {
2020-12-26 11:31:49 -05:00
Z2soundMgrPtr->JAISoundParamsMove->moveVolume(lbl_80455A38, 0);
} else {
2020-12-02 18:35:32 -07:00
if (this->SeWave_3 == 0x7f) {
2020-12-26 11:31:49 -05:00
lbl_80450B88->seMoveVolumeAll(lbl_80455A38, 0);
} else {
Z2soundMgrPtr->JAISoundParamsMove->moveVolume(lbl_80455A3C, 0x21);
2020-12-02 18:35:32 -07:00
}
}
}
return;
}
#else
2020-12-26 11:31:49 -05:00
asm void Z2SceneMgr::setSceneExist(bool param_1) {
2020-12-02 18:35:32 -07:00
nofralloc
2020-12-26 11:31:49 -05:00
#include "Z2AudioLib/Z2SceneMgr/asm/func_802B68E0.s"
2020-12-02 18:35:32 -07:00
}
#endif
extern float lbl_80455A40;
extern double lbl_80455A48;
asm void Z2SceneMgr::setFadeOutStart(u8 param_1) {
nofralloc
2020-12-26 11:31:49 -05:00
#include "Z2AudioLib/Z2SceneMgr/asm/func_802B697C.s"
2020-12-02 18:35:32 -07:00
}
asm void Z2SceneMgr::setFadeInStart(u8 param_1) {
nofralloc
2020-12-26 11:31:49 -05:00
#include "Z2AudioLib/Z2SceneMgr/asm/func_802B6A18.s"
2020-12-02 18:35:32 -07:00
}
extern float lbl_80455A50;
2020-12-26 11:31:49 -05:00
extern char lbl_8039BFA8[]; // probably wrong
extern char* lbl_803CA5C0[]; // array of char*
extern void* lbl_803CA878[]; // switch table (array of void*)
extern void* lbl_803CA844[]; // switch table (array of void*)
extern void* lbl_803CA824[]; // switch table (array of void*)
extern void* lbl_803CA7F4[]; // switch table (array of void*)
extern void* lbl_803CA7BC[]; // switch table (array of void*)
extern void* lbl_803CA784[]; // switch table (array of void*)
2020-12-02 18:35:32 -07:00
extern float lbl_80455A54;
extern float lbl_80455A58;
2020-12-26 11:31:49 -05:00
extern void* lbl_803CA744[]; // switch table (array of void*)
extern void* lbl_803CA704[]; // switch table (array of void*)
2020-12-02 18:35:32 -07:00
extern float lbl_80455A5C;
extern u32 lbl_80450860;
extern float lbl_80455A60;
extern float lbl_80455A64;
2020-12-26 11:31:49 -05:00
extern void* lbl_80450B58; // JAUSoundTable sInstance
extern void* lbl_80450B3C; // Z2EnvSeMgr sInstance
2020-12-02 18:35:32 -07:00
2020-12-26 11:31:49 -05:00
asm void Z2SceneMgr::setSceneName(char* stageName, long roomNum, long layerNum){nofralloc
#include "Z2AudioLib/Z2SceneMgr/asm/func_802B6AF8.s"
2020-12-02 18:35:32 -07:00
}
2020-12-26 11:31:49 -05:00
JAISoundID::JAISoundID(JAISoundID const& soundIdToSet) {
2020-12-02 18:35:32 -07:00
this->soundId = soundIdToSet.soundId;
return;
}
2020-12-26 11:31:49 -05:00
#ifdef NONMATCHING // 1 Instruction off
2020-12-02 18:35:32 -07:00
void Z2SeqMgr::setFieldBgmPlay(bool param_1) {
this->unk_1 = (param_1 & 1U) << 2 | this->unk_1 & 0xfb;
}
2020-12-26 11:31:49 -05:00
#else
asm void Z2SeqMgr::setFieldBgmPlay(bool param_1) {
2020-12-02 18:35:32 -07:00
nofralloc
2020-12-26 11:31:49 -05:00
#include "Z2AudioLib/Z2SceneMgr/asm/func_802B9968.s"
2020-12-02 18:35:32 -07:00
}
#endif