Debug version now builds OK and all_source compiles (#2343)

* Fix missing arg to JUT_ASSERT

* Fix some MWCC version diff errors

* Compile m_Do_ext, d_demo, actor_mng

* Add VSCode task to quickly switch between versions

* Unlink magLift for debug

* Update the hash of the debug dol

The old cbea5fa... hash here was for the dol generated by the alf2dol.py script, which produces incorrect alignment.

The dol with the new hash can be obtained by using `dtk elf2dol` to convert the debug .alf file to a dol.

The DOL now builds OK.

* Fix all debug REL dtor splits

All RELs now also build OK, meaning `ninja build/ShieldD/ok` now succeeds.

* Add genMessage declarations to all HIO subclasses

* Fixing more compilation errors

* m_Do_mtx 100% on debug

Cannot be linked due to weak function name mangling?

* Improve various matches

* Fix all remaining compilation errors

* Fix new compilation errors from main

* Fix retail regression

* Link f_pc_profile_lst
This commit is contained in:
LagoLunatic
2025-03-22 21:00:51 -04:00
committed by GitHub
parent d0f89e41b1
commit 4dc0cd9d09
543 changed files with 1413 additions and 1278 deletions
+30 -25
View File
@@ -3,6 +3,7 @@
#include "m_Do/m_Do_graphic.h"
#include "d/actor/d_a_movie_player.h"
#include "JSystem/JGadget/pointer.h"
#include "JSystem/JGadget/define.h"
namespace {
/* 80037DE4-80037E44 032724 0060+00 1/0 0/0 0/0 .text
@@ -29,8 +30,9 @@ void jstudio_tAdaptor_message::adaptor_do_MESSAGE(JStudio::data::TEOperationData
msg << iType;
msg << "\n demo-object : ";
msg << id_string;
#endif
#else
break;
#endif
}
}
@@ -128,27 +130,27 @@ f32 dDemo_actor_c::getPrm_Morf() {
dDemo_prm_data* prm = mPrm.mData;
switch (mPrm.field_0x0) {
case 1:
case ID_UNK_1:
if (field_0x54 < 4) {
return 0.0f;
}
return prm->field_0x4;
case 2:
case ID_UNK_2:
if (field_0x54 < 7) {
return 0.0f;
}
return prm->field_0x7;
case 4:
case ID_UNK_4:
if (field_0x54 < 6) {
return 0.0f;
}
return prm->field_0x6;
case 5:
case ID_UNK_5:
if (field_0x54 < 0xB) {
return 0.0f;
}
return prm->field_0xb;
case 6:
case ID_UNK_6:
if (field_0x54 < 0xF) {
return 0.0f;
}
@@ -349,10 +351,12 @@ static void branchFile(char const* resName) {
/* 80450620-80450628 0000A0 0002+06 3/3 1/1 0/0 .sdata m_branchId__7dDemo_c */
s16 dDemo_c::m_branchId = -1;
s16 dDemo_c::m_branchNum = 0;
/* 800387EC-80038920 03312C 0134+00 1/0 0/0 0/0 .text JSGSetData__13dDemo_actor_cFUlPCvUl
*/
void dDemo_actor_c::JSGSetData(u32 id, void const* pdata, u32 param_2) {
if (id == 1) {
if (id == ID_UNK_1) {
JStudio::stb::TParseData_fixed<50, TValueIterator_misaligned<u16> > data(pdata);
if (!data.isEnd() && data.isValid()) {
JGadget::binary::TValueIterator_misaligned<u16> value(data.begin());
@@ -360,7 +364,7 @@ void dDemo_actor_c::JSGSetData(u32 id, void const* pdata, u32 param_2) {
dDemo_c::setBranchType(*value);
OS_REPORT("JSGSetData: 分岐条件<%d>\n", *value);
}
} else if (id == 2) {
} else if (id == ID_UNK_2) {
JUT_ASSERT(728, dDemo_c::getBranchId() >= 0);
JStudio::stb::TParseData_string string_data(pdata);
@@ -383,7 +387,7 @@ void dDemo_actor_c::JSGSetData(u32 id, void const* pdata, u32 param_2) {
if (strcmp(str, "-") != 0) {
branchFile(str);
}
} else if (id == 3) {
} else if (id == ID_UNK_3) {
JStudio::stb::TParseData_string data(pdata);
u32 num = data.size();
@@ -414,7 +418,8 @@ void dDemo_actor_c::JSGSetTranslation(Vec const& i_trans) {
onEnable(ENABLE_TRANS_e);
} else {
// "\n\n!!JSGSetTranslation outside of range. x[%f]y[%f]z[%f]\n"
JUT_ASSERT(789, "\n\n!!JSGSetTranslationで範囲外の指定がされました。x[%f]y[%f]z[%f]\n", i_trans.x, i_trans.y, i_trans.z);
OS_REPORT("\n\n!!JSGSetTranslationで範囲外の指定がされました。x[%f]y[%f]z[%f]\n", i_trans.x, i_trans.y, i_trans.z);
JUT_ASSERT(789, 0);
}
}
@@ -740,7 +745,7 @@ JStage::TObject* dDemo_object_c::appendActor(fopAc_ac_c* p_actor) {
demoActor = new dDemo_actor_c();
if (demoActor == NULL) {
// "Failed to get Demo Actor!!\n"
OS_REPORT("デモアクター確保失敗!!\n")
OS_REPORT("デモアクター確保失敗!!\n");
return NULL;
}
@@ -924,32 +929,32 @@ int dDemo_system_c::JSGFindObject(JStage::TObject** p_TObj, char const* actorNam
/* 80039678-80039910 033FB8 0298+00 0/0 1/1 0/0 .text create__7dDemo_cFv */
void dDemo_c::create() {
m_system = new dDemo_system_c();
JUT_ASSERT(m_system != 0);
JUT_ASSERT(0, m_system != 0);
m_control = new JStudio::TControl();
JUT_ASSERT(m_control != 0);
JUT_ASSERT(0, m_control != 0);
m_mesgControl = new jmessage_tControl();
JUT_ASSERT(m_mesgControl != 0);
JUT_ASSERT(0, m_mesgControl != 0);
m_stage = new JStudio_JStage::TCreateObject(m_system);
JUT_ASSERT(m_stage != 0);
JUT_ASSERT(0, m_stage != 0);
m_audio = new JStudio_JAudio2::TCreateObject(Z2GetSoundStarter(), m_system);
JUT_ASSERT(m_audio != 0);
JUT_ASSERT(0, m_audio != 0);
m_audio->mPermit_onExit_notEnd = true;
m_particle = new dDemo_particle_c(dPa_control_c::getEmitterManager(), m_system);
JUT_ASSERT(m_particle != 0);
JUT_ASSERT(0, m_particle != 0);
m_message = new jstudio_tCreateObject_message();
JUT_ASSERT(m_message != 0);
JUT_ASSERT(0, m_message != 0);
m_factory = new JStudio::TFactory();
JUT_ASSERT(m_factory != 0);
JUT_ASSERT(0, m_factory != 0);
m_object = new dDemo_object_c();
JUT_ASSERT(m_object != 0);
JUT_ASSERT(0, m_object != 0);
m_control->setSecondPerFrame(1.0f / 30.0f);
m_control->setFactory(m_factory);
@@ -1022,7 +1027,7 @@ jmessage_tControl::~jmessage_tControl() {}
/* 80039B6C-80039CF8 0344AC 018C+00 1/1 1/1 0/0 .text start__7dDemo_cFPCUcP4cXyzf */
int dDemo_c::start(u8 const* p_data, cXyz* p_translation, f32 rotationY) {
JUT_ASSERT(m_system != 0);
JUT_ASSERT(0, m_system != 0);
m_control->reset();
JStudio::TParse parser(m_control);
@@ -1060,7 +1065,7 @@ int dDemo_c::start(u8 const* p_data, cXyz* p_translation, f32 rotationY) {
/* 80039CF8-80039D4C 034638 0054+00 1/1 2/2 0/0 .text end__7dDemo_cFv */
void dDemo_c::end() {
JUT_ASSERT(m_system != 0);
JUT_ASSERT(0, m_system != 0);
m_control->destroyObject_all();
m_object->remove();
@@ -1070,19 +1075,19 @@ void dDemo_c::end() {
/* 80039D4C-80039DA4 03468C 0058+00 1/1 0/0 0/0 .text branch__7dDemo_cFv */
void dDemo_c::branch() {
JUT_ASSERT(m_system != 0);
JUT_ASSERT(0, m_system != 0);
m_control->destroyObject_all();
const u8* branchData = m_branchData;
m_branchData = NULL;
int rt = start(branchData, m_translation, m_rotationY);
JUT_ASSERT(rt);
JUT_ASSERT(0, rt);
}
/* 80039DA4-80039EDC 0346E4 0138+00 0/0 1/1 0/0 .text update__7dDemo_cFv */
int dDemo_c::update() {
JUT_ASSERT(m_system != 0);
JUT_ASSERT(0, m_system != 0);
if (m_data == NULL) {
if (m_branchData == NULL) {