d_a_demo00 OK (#2817)

* Misc small matches

* Add J3DFrameCtrl::EMode_NULL enum

* Improve weak bss fakematch and remove a functionvalue fakematch

* demo00 OK
This commit is contained in:
LagoLunatic
2025-11-17 18:38:04 -05:00
committed by GitHub
parent 4ab97e8f26
commit bd2def28db
25 changed files with 1194 additions and 1113 deletions
+8 -4
View File
@@ -189,15 +189,17 @@ static int daAndsw2_actionOnAll(daAndsw2_c* i_this) {
case 0:
case 1:
case 5:
case 6:
case 6: {
BOOL temp_r0 = i_this->chkAllSw2() != 0;
var_r29 = temp_r0;
break;
}
case 2:
case 3:
case 3: {
BOOL temp_r0_2 = i_this->chkSwStatus() != 0;
var_r29 = temp_r0_2;
break;
}
case 4:
if (!dComIfGs_isSwitch(i_this->getSwbit(), fopAcM_GetRoomNo(i_this))) {
BOOL temp_r0 = i_this->chkSwStatus2() != 0;
@@ -302,15 +304,17 @@ static int daAndsw2_actionOff(daAndsw2_c* i_this) {
case 0:
case 1:
case 5:
case 6:
case 6: {
BOOL temp_r0 = i_this->chkAllSw2() != 0;
var_r29 = temp_r0;
break;
}
case 2:
case 3:
case 3: {
BOOL temp_r0_2 = i_this->chkSwStatus() != 0;
var_r29 = temp_r0_2;
break;
}
case 4:
break;
}
+2 -2
View File
@@ -55,7 +55,7 @@ int daBg_btkAnm_c::create(J3DModelData* i_modelData, J3DAnmTextureSRTKey* i_btk,
return 0;
}
if (!mpBtk->init(i_modelData, i_btk, i_anmPlay, -1, 1.0f, 0, -1)) {
if (!mpBtk->init(i_modelData, i_btk, i_anmPlay, J3DFrameCtrl::EMode_NULL, 1.0f, 0, -1)) {
return 0;
}
@@ -90,7 +90,7 @@ int daBg_brkAnm_c::create(J3DModelData* i_modelData, J3DAnmTevRegKey* i_brk, int
return 0;
}
if (!mpBrk->init(i_modelData, i_brk, i_anmPlay, -1, 1.0f, 0, -1)) {
if (!mpBrk->init(i_modelData, i_brk, i_anmPlay, J3DFrameCtrl::EMode_NULL, 1.0f, 0, -1)) {
return 0;
}
+5 -1
View File
@@ -117,7 +117,7 @@ static u8 const l_blurTop[12] = {
/* 804A2868-804A287A 000018 000C+06 0/0 0/0 0/0 .rodata l_blurRoot */
// unused
static u8 const l_blurRoot[12 + 6] = {
static u8 const l_blurRoot[12] = {
0xC2,
0x20,
0x00,
@@ -130,6 +130,10 @@ static u8 const l_blurRoot[12 + 6] = {
0x00,
0x00,
0x00,
};
// TODO: what is this?
static const u8 lbl_46_rodata_24[6] = {
0xB4,
0xA0,
0x8C,
+1056 -1003
View File
File diff suppressed because it is too large Load Diff
-2
View File
@@ -285,7 +285,6 @@ static int getPolyColor(cBgS_PolyInfo& i_polyInfo, int param_2, _GXColor* p_effP
/* 80765B70-80765E70 000B90 0300+00 1/1 0/0 0/0 .text e_rdb_attack__FP11e_rdb_class */
static void e_rdb_attack(e_rdb_class* i_this) {
// NONMATCHING
static u16 ap_name[3] = {
0x8A5C,
0x8A5D,
@@ -360,7 +359,6 @@ static void e_rdb_attack(e_rdb_class* i_this) {
/* 80765E70-80766188 000E90 0318+00 1/1 0/0 0/0 .text e_rdb_spin_attack__FP11e_rdb_class
*/
static void e_rdb_spin_attack(e_rdb_class* i_this) {
// NONMATCHING
static u16 ap_name[2] = {
0x8A5F,
0x8A60,
+15 -9
View File
@@ -1921,7 +1921,7 @@ static void e_wb_b_ikki(e_wb_class* i_this) {
i_this->field_0x1690 = 0;
}
break;
case 4:
case 4: {
dVar17 = l_HIO.mSingleRiderSpeed;
dVar16 = 5.0f;
i_this->mMovementType = 1;
@@ -1976,6 +1976,7 @@ static void e_wb_b_ikki(e_wb_class* i_this) {
}
local_d6 = 0x800;
break;
}
case 5:
if (a_this->speedF > 15.0f) {
i_this->mMovementType = 2;
@@ -2104,7 +2105,7 @@ static void e_wb_b_ikki2(e_wb_class* i_this) {
e_rd_class* rider = (e_rd_class*)fopAcM_SearchByID(i_this->field_0x1434);
switch (i_this->mActionMode) {
case -100:
case -100: {
int local_a0 = dComIfGp_getEventManager().getMyStaffId("RiderBoss", NULL, 0);
if (local_a0 != -1) {
dComIfGp_getEventManager().cutEnd(local_a0);
@@ -2112,7 +2113,8 @@ static void e_wb_b_ikki2(e_wb_class* i_this) {
anm_init(i_this, 0x2a, 10.0f, 2, 1.0f);
}
break;
case -99:
}
case -99: {
a_this->current.angle.y = 0x58f0;
turn_speed = 0;
local_b6 = 0;
@@ -2122,6 +2124,7 @@ static void e_wb_b_ikki2(e_wb_class* i_this) {
i_this->mActionMode = -98;
}
break;
}
case -98:
turn_speed = 0;
break;
@@ -3275,7 +3278,7 @@ static s8 e_wb_c_run(e_wb_class* i_this) {
i_this->mStatusFlags |= 0x20;
// fallthrough
case 1:
case 1: {
cXyz target_pos(-62943.0f, -9045.0f, 70997.0f);
local_10c = target_pos - a_this->current.pos;
s16 target_angle = cM_atan2s(local_10c.x, local_10c.z);
@@ -3291,7 +3294,7 @@ static s8 e_wb_c_run(e_wb_class* i_this) {
i_this->field_0x17e1 = 1;
}
break;
}
case 2:
if (i_this->field_0x7a6 == 0) {
anm_init(i_this, 0x1b, 3.0f, 0, 1.0f);
@@ -3326,7 +3329,7 @@ static s8 e_wb_c_run(e_wb_class* i_this) {
case 0xc:
i_this->mActionMode = 0xd;
// fallthrough
case 0xd:
case 0xd: {
local_10c = a_this->current.pos;
local_10c.y += 500.0f;
cStack_118 = coach->eyePos;
@@ -3431,7 +3434,7 @@ static s8 e_wb_c_run(e_wb_class* i_this) {
i_this->mMovementType = 1;
i_this->mPursuitFlag = 1;
break;
}
case 0x14:
anm_init(i_this, 0x25, 3.0f, 2, 1.0f);
i_this->mActionMode = 0x15;
@@ -4069,7 +4072,7 @@ static void demo_camera(e_wb_class* i_this) {
i_this->field_0x169e = 0;
}
break;
case 0x19:
case 0x19: {
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0);
a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
@@ -4089,6 +4092,7 @@ static void demo_camera(e_wb_class* i_this) {
} else {
i_this->field_0x170c = -200.0f;
}
}
case 0x1a:
mDoMtx_stack_c::YrotS(a_this->shape_angle.y);
local_3c.x = i_this->field_0x170c;
@@ -4644,7 +4648,7 @@ static void demo_camera(e_wb_class* i_this) {
i_this->field_0x16a0 = 0;
}
break;
case 0x3e:
case 0x3e: {
daObjCRVSTEEL_c* crvSteel = (daObjCRVSTEEL_c*)fopAcM_SearchByName(PROC_Obj_CRVSTEEL);
if (i_this->field_0x16a0 == 20) {
crvSteel->OpenSet(20.0f, 350.0f);
@@ -4677,6 +4681,7 @@ static void demo_camera(e_wb_class* i_this) {
i_this->field_0x169e = 0x3f;
i_this->field_0x16a0 = 0;
// fallthrough
}
case 0x3f:
if (i_this->field_0x16a0 == 40) {
rdb->field_0xfe4 = 1;
@@ -5916,4 +5921,5 @@ extern actor_process_profile_definition g_profile_E_WB = {
AUDIO_INSTANCES;
#include "JSystem/JAudio2/JAUSectionHeap.h"
template<>
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
+1 -2
View File
@@ -3365,8 +3365,7 @@ int daHorse_c::callHorseSubstance(cXyz const* i_pos) {
/* 80841468-808415B4 009628 014C+00 1/0 0/0 0/0 .text
* setHorsePosAndAngleSubstance__9daHorse_cFPC4cXyzs */
// NONMATCHING - small regalloc, equivalent
int daHorse_c::setHorsePosAndAngleSubstance(cXyz const* param_0, s16 param_1) {
void daHorse_c::setHorsePosAndAngleSubstance(cXyz const* param_0, s16 param_1) {
int i, j;
cXyz sp10(current.pos);
-1
View File
@@ -357,7 +357,6 @@ daNpc_grA_c::cut_type daNpc_grA_c::mEvtCutList[] = {
/* 809BE94C-809BEB24 0000EC 01D8+00 1/1 0/0 0/0 .text __ct__11daNpc_grA_cFv */
daNpc_grA_c::daNpc_grA_c() : daNpcF_c() {
// NONMATCHING
}
/* 809BEB64-809BEDA4 000304 0240+00 1/0 0/0 0/0 .text __dt__11daNpc_grA_cFv */
+10 -11
View File
@@ -763,7 +763,6 @@ BOOL daNpc_Sha_c::setAction(actionFunc action) {
/* 80AE45DC-80AE48D0 0018FC 02F4+00 1/1 0/0 0/0 .text getSceneChangeNoTableIx__11daNpc_Sha_cFv */
int daNpc_Sha_c::getSceneChangeNoTableIx() {
// NONMATCHING
int iVar2[48];
BOOL bool_array[48];
int sp_0x40 = 0;
@@ -778,7 +777,7 @@ int daNpc_Sha_c::getSceneChangeNoTableIx() {
u8 tmp_reg;
for (int i = 0; i < 6; i++) {
eventReg = dComIfGs_getEventReg(u16(mEvtBitLabels[i]));
eventReg = dComIfGs_getEventReg((u16)mEvtBitLabels[i]);
tmp_reg = 1;
for (int j = 0; j < 8; j++) {
@@ -799,10 +798,10 @@ int daNpc_Sha_c::getSceneChangeNoTableIx() {
for (sp_0x40 = 2; sp_0x40 != 0; sp_0x40--) {
for (int idx = 0; idx < 6; idx++) {
tmp_reg = dComIfGs_getTmpReg(mTmpBitLabels[idx]);
eventReg = dComIfGs_getEventReg(u16(mEvtBitLabels[idx]));
tmp_reg = dComIfGs_getTmpReg((u16)mTmpBitLabels[idx]);
eventReg = dComIfGs_getEventReg((u16)mEvtBitLabels[idx]);
tmp_reg |= eventReg;
dComIfGs_setTmpReg(mTmpBitLabels[idx], tmp_reg);
dComIfGs_setTmpReg((u16)mTmpBitLabels[idx], tmp_reg);
}
for (int m = 0; m < 48; m++) {
@@ -823,7 +822,7 @@ int daNpc_Sha_c::getSceneChangeNoTableIx() {
sp_0x28++;
}
eventReg = dComIfGs_getTmpReg(mTmpBitLabels[n]);
eventReg = dComIfGs_getTmpReg((u16)mTmpBitLabels[n]);
if ((tmp_reg & eventReg) == 0) {
iVar2[sp_0x3c] = sp_0x30;
sp_0x3c++;
@@ -874,7 +873,7 @@ void daNpc_Sha_c::setTempBit(int i_idx) {
u8 reg_r30 = 0;
u8 reg_r29 = 0;
if (i_idx < 48) {
reg_r30 = dComIfGs_getTmpReg(mTmpBitLabels[i_idx / 8]);
reg_r30 = dComIfGs_getTmpReg((u16)mTmpBitLabels[i_idx / 8]);
reg_r29 = 1;
if (i_idx % 8 != 0) {
@@ -884,7 +883,7 @@ void daNpc_Sha_c::setTempBit(int i_idx) {
}
reg_r30 |= reg_r29;
dComIfGs_setTmpReg(mTmpBitLabels[i_idx / 8], reg_r30);
dComIfGs_setTmpReg((u16)mTmpBitLabels[i_idx / 8], reg_r30);
}
}
@@ -1161,17 +1160,17 @@ int daNpc_Sha_c::test(void* param_1) {
}
/* 80AE711C-80AE7128 000404 000C+00 1/1 0/0 0/0 .data mEvtBitLabels__11daNpc_Sha_c */
u16 daNpc_Sha_c::mEvtBitLabels[6] = {
const u16 daNpc_Sha_c::mEvtBitLabels[6] = {
0xF0FF, 0xEFFF, 0xEEFF, 0xEDFF, 0xECFF, 0xEBFF,
};
/* 80AE7128-80AE7134 000410 000C+00 2/2 0/0 0/0 .data mTmpBitLabels__11daNpc_Sha_c */
u16 daNpc_Sha_c::mTmpBitLabels[6] = {
const u16 daNpc_Sha_c::mTmpBitLabels[6] = {
0xFAFF, 0xF9FF, 0xF8FF, 0xF7FF, 0xF6FF, 0xF5FF,
};
/* 80AE7134-80AE71F4 00041C 00C0+00 1/1 0/0 0/0 .data mSceneChangeNoTable__11daNpc_Sha_c */
int daNpc_Sha_c::mSceneChangeNoTable[48] = {
const int daNpc_Sha_c::mSceneChangeNoTable[48] = {
1, 2, 3, 4,
5, 6, 7, 8,
9, 0xA, 0xB, 0xC,
+1 -1
View File
@@ -167,7 +167,7 @@ int useHeapInit(fopAc_ac_c* i_this) {
J3DAnmTevRegKey* tev_anm = static_cast<J3DAnmTevRegKey*>(dComIfG_getObjectRes("Obj_Bef", bef_brk[a_this->mEffectType]));
if (!a_this->mpBrk->init(a_this->mpModel->getModelData(), tev_anm, 1,0,1.0f,0,-1)) {
if (!a_this->mpBrk->init(a_this->mpModel->getModelData(), tev_anm, 1, J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1)) {
return 0;
}
+1 -1
View File
@@ -2109,7 +2109,7 @@ void dPa_light8PcallBack::draw(JPABaseEmitter* param_1, JPABaseParticle* param_2
/* 8004E6A8-8004ED44 048FE8 069C+00 1/0 0/0 0/0 .text
* draw__25dPa_gen_b_light8PcallBackFP14JPABaseEmitterP15JPABaseParticle */
// NONMATCHING regalloc
// NONMATCHING - fpr regalloc
void dPa_gen_b_light8PcallBack::draw(JPABaseEmitter* param_1, JPABaseParticle* param_2) {
Mtx local_80;
JGeometry::TVec3<f32> local_8c;