Debug JStudio fix + match one retail func (#2378)

* Fix debug build

* Minor fixes

* Match daAlink_c::getDemoLookActor

* Fix JStudio paths in ShieldD splits

* Fix JStudio not compiling on debug

* Fix JStudio not compiling on retail, add fake header
This commit is contained in:
LagoLunatic
2025-04-06 20:57:52 -04:00
committed by GitHub
parent 98db9a297a
commit 4e30ad564a
12 changed files with 124 additions and 128 deletions
+3 -26
View File
@@ -328,13 +328,6 @@ void JFWDisplay::endRender() {
calcCombinationRatio();
}
/* ############################################################################################## */
/* 804511C4-804511C8 0006C4 0004+00 1/1 0/0 0/0 .sbss prevFrame$2597 */
static u32 prevFrame;
/* 804511C8-804511D0 0006C8 0008+00 1/1 0/0 0/0 .sbss None */
static s8 data_804511C8;
/* 80272AB0-80272C60 26D3F0 01B0+00 1/0 0/0 0/0 .text endFrame__10JFWDisplayFv */
void JFWDisplay::endFrame() {
JUTProcBar::getManager()->cpuEnd();
@@ -361,10 +354,7 @@ void JFWDisplay::endFrame() {
}
if (field_0x40) {
if (data_804511C8 == 0) {
prevFrame = VIGetRetraceCount();
data_804511C8 = 1;
}
static u32 prevFrame = VIGetRetraceCount();;
u32 retrace_cnt = VIGetRetraceCount();
JUTProcBar::getManager()->setCostFrame(retrace_cnt - prevFrame);
prevFrame = retrace_cnt;
@@ -378,24 +368,11 @@ void JFWDisplay::waitBlanking(int param_0) {
}
}
/* ############################################################################################## */
/* 804511D0-804511D4 0006D0 0004+00 1/1 0/0 0/0 .sbss nextTick$2642 */
static OSTime nextTick ALIGN_DECL(8);
/* 804511D8-804511DC 0006D8 0004+00 1/1 0/0 0/0 .sbss None */
static s8 data_804511D8;
/* 804511DC-804511E0 0006DC 0004+00 1/1 0/0 0/0 .sbss nextCount$2650 */
static u32 nextCount;
/* 804511E0-804511E8 0006E0 0008+00 1/1 0/0 0/0 .sbss None */
static s8 data_804511E0;
/* 80272CB0-80272DD0 26D5F0 0120+00 2/2 0/0 0/0 .text waitForTick__FUlUs */
static void waitForTick(u32 p1, u16 p2) {
if (p1 != 0) {
static s64 nextTick = OSGetTime();
s64 time = OSGetTime();
static OSTime nextTick = OSGetTime();
OSTime time = OSGetTime();
while (time < nextTick) {
JFWDisplay::getManager()->threadSleep((nextTick - time));
time = OSGetTime();
@@ -489,7 +489,7 @@ void TFunctionValueAttribute_range::range_set(f64 begin, f64 end) {
fEnd_ = end;
fDifference_ = end - begin;
ASSERT(fDifference_ >= TValue(0));
JUT_ASSERT(458, fDifference_ >= TValue(0));
}
// /* 80281A08-80281D18 27C348 0310+00 2/2 0/0 0/0 .text
@@ -1033,13 +1033,13 @@ void TFunctionValue_list_parameter::prepare() {
/* 80282F10-80282FE8 27D850 00D8+00 1/0 0/0 0/0 .text
* getValue__Q27JStudio29TFunctionValue_list_parameterFd */
f64 TFunctionValue_list_parameter::getValue(f64 pfData_) {
pfData_ = range_getParameter(pfData_, data_getValue_front(), data_getValue_back());
f64 TFunctionValue_list_parameter::getValue(f64 param_0) {
param_0 = range_getParameter(param_0, data_getValue_front(), data_getValue_back());
JUT_ASSERT(1395, pfData_!=0)
// TODO: change to actual function
//dat3 = JGadget::findUpperBound_binary_current(dat1, dat2, dat3, &pfData_);
dat3 = func_802835DC(dat1, dat2, dat3, pfData_);
dat3 = func_802835DC(dat1, dat2, dat3, param_0);
if (dat3 == dat1) {
return dat3.get()[1];
}
@@ -1052,7 +1052,7 @@ f64 TFunctionValue_list_parameter::getValue(f64 pfData_) {
const int suData_size = 1;
JUT_ASSERT(1411, (pfData_<=pf-suData_size)&&(pf<pfData_+suData_size*uData_));
JUT_ASSERT(1412, pfnUpdate_!=0);
return pfnUpdate_(*this, pfData_);
return pfnUpdate_(*this, param_0);
}
f64 TFunctionValue_list_parameter::update_INTERPOLATE_NONE_(
-1
View File
@@ -984,7 +984,6 @@ void daAlink_c::endDemoMode() {
}
/* 801180EC-80118170 112A2C 0084+00 2/2 0/0 0/0 .text getDemoLookActor__9daAlink_cFv */
// NONMATCHING - weird gameinfo load
fopAc_ac_c* daAlink_c::getDemoLookActor() {
if (mDemo.getParam0() == 1) {
return dComIfGp_event_getPt1();
+3 -2
View File
@@ -45,14 +45,15 @@ f32 const daL8Lift_c::mSpeed[16] = {
/* 80C88860-80C88928 000220 00C8+00 1/0 0/0 0/0 .text CreateHeap__10daL8Lift_cFv */
int daL8Lift_c::CreateHeap() {
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("L8Lift", 5);
JUT_ASSERT(190, modelData != 0);
mpModel = mDoExt_J3DModel__create(modelData, 0, 0x11000284);
if (!mpModel) {
return 0;
}
mBtk.init(modelData, (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("L8Lift", 8),
int res = mBtk.init(modelData, (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("L8Lift", 8),
1, 0, 1.0f, 0, -1);
JUT_ASSERT("d_a_obj_lv8Lift.cpp", 0xcf, "res == 1");
JUT_ASSERT(207, res == 1);
return 1;
}
+2 -2
View File
@@ -991,7 +991,7 @@ bool dCamera_c::restorePosEvCamera() {
/* 80090174-80090230 08AAB4 00BC+00 0/0 1/0 0/0 .text talktoEvCamera__9dCamera_cFv */
bool dCamera_c::talktoEvCamera() {
dComIfGp_event_getPt1();
fopAc_ac_c* r27 = (fopAc_ac_c*)dComIfGp_event_getPt1();
s32 style = mCamTypeData[mEventData.field_0xc].field_0x18[mIsWolf][3];
if (mCurCamStyleTimer == 0) {
@@ -1005,7 +1005,7 @@ bool dCamera_c::talktoEvCamera() {
#if DEBUG
if (mCurCamStyleTimer == 0 && mCamSetup.CheckFlag(0x40)) {
u32 id = mCamParam.Id(style);
OS_REPORT("camera: event: %16s = %d (%c%c%c%c)\n", "style", style, (u8)(id >> 0x18), (u8)(id >> 0x10), (u8)(id >> 0x8), (u8)(id));
OS_REPORT("camera: event: %16s = %d (%c%c%c%c)\n", "style", style, (id >> 0x18) & 0xFF, (id >> 0x10) & 0xFF, (id >> 0x8) & 0xFF, (id) & 0xFF);
}
#endif
+4 -4
View File
@@ -1106,22 +1106,22 @@ s32 fopAcM_orderTreasureEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_
/* 8001BB14-8001BB44 016454 0030+00 0/0 11/11 10/10 .text
* fopAcM_getTalkEventPartner__FPC10fopAc_ac_c */
fopAc_ac_c* fopAcM_getTalkEventPartner(fopAc_ac_c const*) {
return dComIfGp_event_getTalkPartner();
return (fopAc_ac_c*)dComIfGp_event_getTalkPartner();
}
/* 8001BB44-8001BB74 016484 0030+00 0/0 5/5 0/0 .text fopAcM_getItemEventPartner__FPC10fopAc_ac_c
*/
fopAc_ac_c* fopAcM_getItemEventPartner(fopAc_ac_c const*) {
return dComIfGp_event_getItemPartner();
return (fopAc_ac_c*)dComIfGp_event_getItemPartner();
}
/* 8001BB74-8001BBE8 0164B4 0074+00 0/0 1/1 0/0 .text fopAcM_getEventPartner__FPC10fopAc_ac_c */
fopAc_ac_c* fopAcM_getEventPartner(fopAc_ac_c const* i_actor) {
if (dComIfGp_event_getPt1() != i_actor) {
return dComIfGp_event_getPt1();
return (fopAc_ac_c*)dComIfGp_event_getPt1();
}
return dComIfGp_event_getPt2();
return (fopAc_ac_c*)dComIfGp_event_getPt2();
}
/* 8001BBE8-8001BC74 016528 008C+00 0/0 5/5 43/43 .text