mirror of
https://github.com/zeldaret/tp
synced 2026-08-19 13:54:02 -04:00
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:
+40
-28
@@ -30,7 +30,7 @@ fopAc_ac_c* fopAcM_FastCreate(s16 i_procName, FastCreateReqFunc i_createFunc, vo
|
||||
/* 800198C4-80019934 014204 0070+00 1/1 5/5 18/18 .text fopAcM_setStageLayer__FPv */
|
||||
void fopAcM_setStageLayer(void* i_proc) {
|
||||
scene_class* stageProc = fopScnM_SearchByID(dStage_roomControl_c::getProcID());
|
||||
JUT_ASSERT(stageProc != 0);
|
||||
JUT_ASSERT(0, stageProc != 0);
|
||||
|
||||
fpcM_ChangeLayerID(i_proc, fopScnM_LayerID(stageProc));
|
||||
}
|
||||
@@ -39,7 +39,7 @@ void fopAcM_setStageLayer(void* i_proc) {
|
||||
void fopAcM_setRoomLayer(void* i_proc, int i_roomNo) {
|
||||
if (i_roomNo >= 0) {
|
||||
scene_class* roomProc = fopScnM_SearchByID(dStage_roomControl_c::getStatusProcID(i_roomNo));
|
||||
JUT_ASSERT(roomProc != 0);
|
||||
JUT_ASSERT(0, roomProc != 0);
|
||||
|
||||
fpcM_ChangeLayerID(i_proc, fopScnM_LayerID(roomProc));
|
||||
}
|
||||
@@ -258,8 +258,8 @@ fpc_ProcID fopAcM_createChildFromOffset(s16 i_procName, fpc_ProcID i_parentID, u
|
||||
}
|
||||
|
||||
BOOL fopAcM_createHeap(fopAc_ac_c* i_this, u32 size, u32 align) {
|
||||
JUT_ASSERT(i_this);
|
||||
JUT_ASSERT(i_this->heap == 0);
|
||||
JUT_ASSERT(0, i_this);
|
||||
JUT_ASSERT(0, i_this->heap == 0);
|
||||
|
||||
// "Creating Actor Heap"
|
||||
fopAcM_Log(i_this, "アクターのヒープの生成");
|
||||
@@ -270,7 +270,7 @@ BOOL fopAcM_createHeap(fopAc_ac_c* i_this, u32 size, u32 align) {
|
||||
if (i_this->heap == 0) {
|
||||
// "fopAcM_createHeap allocation failure\n"
|
||||
OSReport_Error("fopAcM_createHeap 確保失敗\n");
|
||||
JUT_CONFIRM(i_this->heap != 0);
|
||||
JUT_CONFIRM(0, i_this->heap != 0);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ bool fopAcM_entrySolidHeap_(fopAc_ac_c* i_actor, heapCallbackFunc i_heapCallback
|
||||
}
|
||||
|
||||
OSReport_Error("ばぐばぐです\n"); // "There's a big bug\n"
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
OSReport_Error("緊急回避措置\n"); // "Emergency action\n"
|
||||
fopAcM::HeapAdjustEntry = false;
|
||||
}
|
||||
@@ -692,6 +692,12 @@ static cull_box l_cullSizeBox[] = {
|
||||
{-60.0f, -20.0f, -60.0f},
|
||||
{60.0f, 160.0f, 60.0f},
|
||||
},
|
||||
#ifdef DEBUG
|
||||
{
|
||||
{-200.0f, 0.0f, -200.0f},
|
||||
{200.0f, 400.0f, 200.0f},
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
/* 803A3740-803A37C0 000860 0080+00 1/1 0/0 0/0 .data l_cullSizeSphere */
|
||||
@@ -728,6 +734,12 @@ static cull_sphere l_cullSizeSphere[] = {
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
400.0f,
|
||||
},
|
||||
#ifdef DEBUG
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
400.0f,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
/* 8001ACEC-8001B058 01562C 036C+00 0/0 1/1 1/1 .text fopAcM_cullingCheck__FPC10fopAc_ac_c */
|
||||
@@ -1240,30 +1252,30 @@ fpc_ProcID fopAcM_createItemFromEnemyID(u8 i_enemyID, cXyz const* i_pos, int i_i
|
||||
|
||||
/* 8001BF64-8001C078 0168A4 0114+00 1/1 0/0 11/11 .text
|
||||
* fopAcM_createItemFromTable__FPC4cXyziiiPC5csXyziPC4cXyzPfPfb */
|
||||
fpc_ProcID fopAcM_createItemFromTable(cXyz const* i_pos, int i_tableNo, int i_itemBitNo,
|
||||
fpc_ProcID fopAcM_createItemFromTable(cXyz const* i_pos, int i_itemNo, int i_itemBitNo,
|
||||
int i_roomNo, csXyz const* i_angle, int param_5,
|
||||
cXyz const* i_scale, f32* i_speedF, f32* i_speedY,
|
||||
bool i_createDirect) {
|
||||
// clang-format off
|
||||
JUT_ASSERT(0 <= i_itemNo && i_itemNo <= 255 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
JUT_ASSERT(0, 0 <= i_itemNo && i_itemNo <= 255 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
// clang-format on
|
||||
|
||||
ItemTableList* tableList = (ItemTableList*)dComIfGp_getItemTable();
|
||||
|
||||
if (i_tableNo == 0xFF) {
|
||||
if (i_itemNo == 0xFF) {
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (tableList->mTableNum - 1 < i_tableNo) {
|
||||
if (tableList->mTableNum - 1 < i_itemNo) {
|
||||
// "Table Num<%d>, Specified Table<%d>, over table num!\n"
|
||||
OSReport_Error("テーブル数<%d>、指定テーブル番号<%d>で、テーブル数オーバーしています!\n",
|
||||
tableList->mTableNum, i_tableNo);
|
||||
i_tableNo = 0;
|
||||
tableList->mTableNum, i_itemNo);
|
||||
i_itemNo = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int itemNo = fopAcM_getItemNoFromTableNo(i_tableNo);
|
||||
int itemNo = fopAcM_getItemNoFromTableNo(i_itemNo);
|
||||
if (itemNo == fpcNm_ITEM_NONE) {
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
@@ -1289,7 +1301,7 @@ fpc_ProcID fopAcM_createDemoItem(const cXyz* i_pos, int i_itemNo, int i_itemBitN
|
||||
const csXyz* i_angle, int i_roomNo, const cXyz* scale,
|
||||
u8 param_7) {
|
||||
// clang-format off
|
||||
JUT_ASSERT(0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
JUT_ASSERT(0, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
// clang-format on
|
||||
|
||||
if (i_itemNo == fpcNm_ITEM_NONE) {
|
||||
@@ -1349,7 +1361,7 @@ fopAc_ac_c* fopAcM_createItemForSimpleDemo(const cXyz* i_pos, int i_itemNo, int
|
||||
fpc_ProcID fopAcM_createItem(const cXyz* i_pos, int i_itemNo, int i_itemBitNo, int i_roomNo,
|
||||
const csXyz* i_angle, const cXyz* i_scale, int param_7) {
|
||||
// clang-format off
|
||||
JUT_ASSERT(0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
JUT_ASSERT(0, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
// clang-format on
|
||||
|
||||
if (i_itemNo == fpcNm_ITEM_NONE) {
|
||||
@@ -1374,17 +1386,17 @@ fpc_ProcID fopAcM_createItem(const cXyz* i_pos, int i_itemNo, int i_itemBitNo, i
|
||||
case fpcNm_ITEM_SMALL_KEY:
|
||||
// "Small Key: Can't support map display, so program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("小さい鍵:マップ表示対応出来ないので、プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
case fpcNm_ITEM_KANTERA:
|
||||
// "Lantern: Program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("カンテラ:プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
case fpcNm_ITEM_LIGHT_DROP:
|
||||
// "Light Drop: Program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("光の雫:プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
#endif
|
||||
case fpcNm_ITEM_KAKERA_HEART:
|
||||
@@ -1405,7 +1417,7 @@ fpc_ProcID fopAcM_createItem(const cXyz* i_pos, int i_itemNo, int i_itemBitNo, i
|
||||
fopAc_ac_c* fopAcM_fastCreateItem2(const cXyz* i_pos, int i_itemNo, int i_itemBitNo, int i_roomNo,
|
||||
int param_5, const csXyz* i_angle, const cXyz* i_scale) {
|
||||
// clang-format off
|
||||
JUT_ASSERT(0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
JUT_ASSERT(0, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
// clang-format on
|
||||
|
||||
csXyz item_angle(csXyz::Zero);
|
||||
@@ -1432,17 +1444,17 @@ fopAc_ac_c* fopAcM_fastCreateItem2(const cXyz* i_pos, int i_itemNo, int i_itemBi
|
||||
case fpcNm_ITEM_SMALL_KEY:
|
||||
// "Small Key: Can't support map display, so program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("小さい鍵:マップ表示対応出来ないので、プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
case fpcNm_ITEM_KANTERA:
|
||||
// "Lantern: Program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("カンテラ:プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
case fpcNm_ITEM_LIGHT_DROP:
|
||||
// "Light Drop: Program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("光の雫:プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
#endif
|
||||
case fpcNm_ITEM_KAKERA_HEART:
|
||||
@@ -1467,7 +1479,7 @@ fopAc_ac_c* fopAcM_fastCreateItem(const cXyz* i_pos, int i_itemNo, int i_roomNo,
|
||||
const csXyz* i_angle, const cXyz* i_scale, f32* i_speedF,
|
||||
f32* i_speedY, int i_itemBitNo, int param_9,
|
||||
createFunc i_createFunc) {
|
||||
JUT_ASSERT(0 <= i_itemNo && i_itemNo < 256);
|
||||
JUT_ASSERT(0, 0 <= i_itemNo && i_itemNo < 256);
|
||||
|
||||
csXyz angle;
|
||||
if (i_itemNo == fpcNm_ITEM_NONE) {
|
||||
@@ -1492,17 +1504,17 @@ fopAc_ac_c* fopAcM_fastCreateItem(const cXyz* i_pos, int i_itemNo, int i_roomNo,
|
||||
case fpcNm_ITEM_SMALL_KEY:
|
||||
// "Small Key: Can't support map display, so program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("小さい鍵:マップ表示対応出来ないので、プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
case fpcNm_ITEM_KANTERA:
|
||||
// "Lantern: Program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("カンテラ:プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
case fpcNm_ITEM_LIGHT_DROP:
|
||||
// "Light Drop: Program generation is prohibited!\n"
|
||||
OS_REPORT_ERROR("光の雫:プログラム生成禁止!\n");
|
||||
JUT_ASSERT(0);
|
||||
JUT_ASSERT(0, 0);
|
||||
break;
|
||||
#endif
|
||||
case fpcNm_ITEM_KAKERA_HEART:
|
||||
@@ -1597,11 +1609,11 @@ void* enemySearchJugge(void* i_actor, void* i_data) {
|
||||
|
||||
/* 8001CA1C-8001CAD8 01735C 00BC+00 0/0 0/0 6/6 .text fopAcM_myRoomSearchEnemy__FSc */
|
||||
fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo) {
|
||||
JUT_ASSERT(roomNo >= 0);
|
||||
JUT_ASSERT(0, roomNo >= 0);
|
||||
|
||||
int procID = dStage_roomControl_c::getStatusProcID(roomNo);
|
||||
scene_class* roomProc = fopScnM_SearchByID(procID);
|
||||
JUT_ASSERT(roomProc != 0);
|
||||
JUT_ASSERT(0, roomProc != 0);
|
||||
|
||||
u32 actorID = ((daPy_py_c*)dComIfGp_getPlayer(0))->getGrabActorID();
|
||||
fopAc_ac_c* actor = fopAcM_SearchByID(actorID);
|
||||
|
||||
Reference in New Issue
Block a user