d_a_obj_kanban2 & more OK (#2674)

* d_a_obj_kanban2 OK via gameInfo fakematch

Closes #1001

* Mark d_a_obj_kanban2 as matching for JP

* Mark npc_jagar as Matching

* d_a_tag_allmato OK via gameInfo fake match

* d_a_obj_wchain OK

* d_a_obj_so OK

---------

Co-authored-by: Max Roncace <me@caseif.net>
This commit is contained in:
YunataSavior
2025-09-20 12:09:06 -07:00
committed by GitHub
parent 72236276a6
commit affd5d7f95
13 changed files with 131 additions and 101 deletions
+1
View File
@@ -479,6 +479,7 @@ static void demo_camera(e_warpappear_class* i_this) {
i_this->field_0x5f8 = 0.0f;
}
// TODO: gameInfo fake match to force reuse of pointer
play = &g_dComIfG_gameInfo.play;
play->getEvent().onHindFlag(15);
+12 -3
View File
@@ -2219,10 +2219,15 @@ static void message_guide(npc_henna_class* i_this) {
return;
}
// TODO: fake match to force reuse of pointer
#if VERSION != VERSION_SHIELD_DEBUG
// TODO: gameInfo fake match to force reuse of pointer
dComIfG_play_c* play = &g_dComIfG_gameInfo.play;
if (play->getEvent().runCheck()) {
if (actor->eventInfo.checkCommandTalk() == 0) {
if (play->getEvent().runCheck())
#else
if (dComIfGp_event_runCheck())
#endif
{
if (!actor->eventInfo.checkCommandTalk()) {
return;
}
@@ -2251,7 +2256,11 @@ static void message_guide(npc_henna_class* i_this) {
}
if (i_this->mMsgFlow.doFlow(actor, NULL, 0) != 0) {
#if VERSION != VERSION_SHIELD_DEBUG
play->getEvent().reset();
#else
dComIfGp_event_reset();
#endif
i_this->mIsTalking = 0;
}
} else {
+1 -1
View File
@@ -5965,7 +5965,7 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) {
fopAcM_OnStatus(a_this, 0);
cLib_onBit<u32>(a_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e);
a_this->eventInfo.onCondition(dEvtCnd_CANTALK_e);
// TODO: fake match to force reuse of pointer
// TODO: gameInfo fake match to force reuse of pointer
dComIfG_play_c* play = &g_dComIfG_gameInfo.play;
if (play->getEvent().runCheck()) {
if (a_this->eventInfo.checkCommandTalk()) {
+12 -1
View File
@@ -1002,9 +1002,20 @@ void daObj_Kanban2_c::executeNormal() {
break;
case 1:
mInvulnerabilityTimer = 3;
if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk()) {
#if VERSION != VERSION_SHIELD_DEBUG
// TODO: gameInfo fake match to force reuse of pointer
dComIfG_play_c* play = &g_dComIfG_gameInfo.play;
if (play->getEvent().runCheck() && eventInfo.checkCommandTalk())
#else
if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk())
#endif
{
if (mMsgFlow.doFlow(this, NULL, 0)) {
#if VERSION != VERSION_SHIELD_DEBUG
play->getEvent().reset();
#else
dComIfGp_event_reset();
#endif
field_0x9fe = 0;
}
} else {
+4 -6
View File
@@ -417,14 +417,13 @@ static void action(obj_so_class* i_this) {
/* 80CE14DC-80CE2A64 0011FC 1588+00 1/1 0/0 0/0 .text part_move__FP12obj_so_class */
static void part_move(obj_so_class* i_this) {
// NONMATCHING
static u16 e_id[3] = {
0x82AB,
0x82AC,
0x82AD,
};
fopAc_ac_c* player = dComIfGp_getPlayer(0);
fopAc_ac_c* player = (fopAc_ac_c*) dComIfGp_getPlayer(0);
fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->actor;
cXyz spec, spf8, sp104;
s16 tempCos;
@@ -519,8 +518,7 @@ static void part_move(obj_so_class* i_this) {
}
} else {
i_this->field_0x8f0[i].y = -10.0f;
i_this->field_0x8f0[i].z = 0.0f;
i_this->field_0x8f0[i].x = 0.0f;
i_this->field_0x8f0[i].x = i_this->field_0x8f0[i].z = 0.0f;
if (daPy_getPlayerActorClass()->checkFrontRollCrash()) {
spec.x = player->current.pos.x - i_this->field_0x618[i].x;
spec.y = -(player->current.pos.y - i_this->field_0x618[i].y);
@@ -715,8 +713,8 @@ static void part_move(obj_so_class* i_this) {
spec.y = 0.0f;
spec.z = (50.0f - var_f29) * (JREG_F(1) + 100.0f);
MtxPosition(&spec, &spf8);
cLib_addCalcAngleS2(&i_this->field_0x1b20[i], spec.z, 2, 0x400);
cLib_addCalcAngleS2(&i_this->field_0x1b30[i], -spec.x, 2, 0x400);
cLib_addCalcAngleS2(&i_this->field_0x1b20[i], spf8.z, 2, 0x400);
cLib_addCalcAngleS2(&i_this->field_0x1b30[i], -spf8.x, 2, 0x400);
}
}
+24 -23
View File
@@ -130,10 +130,14 @@ s16 daObjWchain_c::getChainAngleZ(cXyz* param_0, int param_1) {
}
/* 80D3080C-80D310AC 00098C 08A0+00 1/1 0/0 0/0 .text setChainPos__13daObjWchain_cFv */
// NONMATCHING instruction ordering
void daObjWchain_c::setChainPos() {
cXyz prev_pos, vec1;
int i;
cXyz* chain_pos; // dbg r27
cXyz* chain_speed; // dbg sp_0x1C
csXyz* chain_angle; // dbg r28
s16* chain_rotation; // dbg r26
if (mRide) {
shape_angle.y = daPy_getLinkPlayerActorClass()->shape_angle.y;
shape_angle.z = 0;
@@ -151,17 +155,12 @@ void daObjWchain_c::setChainPos() {
static Vec const currentOffset = {0.0f, 0.0f, -53.75f};
mDoMtx_stack_c::multVec(&currentOffset, &current.pos);
csXyz* chain_angle;
cXyz* chain_speed;
cXyz* chain_pos;
int i;
s16* chain_rotation;
chain_pos = &mChainPos[0xf];
chain_angle = &mChainAngle[0xf];
chain_speed = &mChainSpeed[0xf];
chain_rotation = &mChainRotation[0xf];
prev_pos = current.pos;
int svar7 = shape_angle.z;
s16 svar7 = shape_angle.z;
for (i = 0xf; i >= 0; i--, chain_pos--, chain_angle--, chain_speed--, chain_rotation--) {
chain_angle->z += getChainAngleZ(chain_speed, abs((s16)(chain_angle->z - svar7)));
*chain_speed = (prev_pos - *chain_pos) * 0.75;
@@ -192,38 +191,40 @@ void daObjWchain_c::setChainPos() {
}
f32 fvar2 = mInitOutLength + mPullLength - 53.75f;
int local_68 = fvar2 * (1.0f / 17.5f);
int ivar5 = local_68 <= 0xf ? local_68 + 1 : 0x10;
int chain_no = 0x10 - ivar5;
if (local_68 > 0xF) {
local_68 = 0x10;
} else {
++local_68;
}
s16* chain_rotation;
cXyz* chain_speed;
cXyz* chain_pos;
csXyz* chain_angle;
f32 reg_f28 = (17.5f - (local_68 * 17.5f - fvar2));
int chain_no = 0x10 - local_68;
chain_pos = &mChainPos[chain_no];
chain_angle = &mChainAngle[chain_no];
chain_speed = &mChainSpeed[chain_no];
chain_rotation = &mChainRotation[chain_no];
chain_pos->set(
mRoofPos.x,
field_0x7a8 + (mRoofPos.y - (17.5f - (ivar5 * 17.5f - fvar2))),
field_0x7a8 + (mRoofPos.y - reg_f28),
mRoofPos.z
);
chain_angle->x = 0x4000;
*chain_rotation = 0;
chain_pos = mChainPos + 1 + chain_no;
chain_angle++;
chain_speed = mChainSpeed + 1 + chain_no;
chain_rotation++;
++chain_pos;
++chain_angle;
++chain_speed;
++chain_rotation;
mDoMtx_stack_c::YrotS(-shape_angle.y);
f32 prob = 0.2f;
cXyz local_90;
if (!mEnd && cM_rnd() < prob) {
f32 ang = cM_rnd() * 6.283185f;
f32 prob = 0.2f;
if (!mEnd && cM_rnd() < 0.2f) {
f32 ang = cM_rnd() * 6.2831855f;
local_90.set(cM_fsin(ang), 0.0f, cM_fcos(ang));
} else {
local_90 = cXyz::Zero;
}
for (int i = chain_no + 1; i < 0x10; i++, chain_pos++, chain_angle++, chain_speed++, chain_rotation++) {
for (i = chain_no + 1; i < 0x10; i++, chain_pos++, chain_angle++, chain_speed++, chain_rotation++) {
prev_pos = *chain_pos;
vec1 = *chain_pos - chain_pos[-1];
if (chain_speed->abs2XZ() < 0.04f && cM_rnd() < prob) {
@@ -284,7 +285,7 @@ int daObjWchain_c::execute() {
attention_info.flags &= ~fopAc_AttnFlag_LOCK_e;
}
attention_info.position = current.pos;
attention_info.position.y += 150.0f;
attention_info.position.y += 15.0f;
setMatrix();
+12 -2
View File
@@ -67,7 +67,6 @@ int daTag_AllMato_c::Delete() {
}
/* 804876B8-80487C5C 0001F8 05A4+00 1/1 0/0 0/0 .text Execute__15daTag_AllMato_cFv */
// NONMATCHING - issues with dComIfGp_getEventManager
int daTag_AllMato_c::Execute() {
camera_class* camera_p = NULL;
@@ -79,7 +78,14 @@ int daTag_AllMato_c::Execute() {
return 1;
}
if (dComIfGp_event_runCheck()) {
#if VERSION != VERSION_SHIELD_DEBUG
// TODO: gameInfo fake match to force reuse of pointer
dComIfG_play_c* play = &g_dComIfG_gameInfo.play;
if (play->getEvent().runCheck())
#else
if (dComIfGp_event_runCheck())
#endif
{
if (!eventInfo.checkCommandTalk()) {
if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEventIdx)) {
u16 evt_action = EVT_NONE;
@@ -119,7 +125,11 @@ int daTag_AllMato_c::Execute() {
}
dCam_getBody()->CorrectCenter();
#if VERSION != VERSION_SHIELD_DEBUG
play->getEvent().reset();
#else
dComIfGp_event_reset();
#endif
mEventIdx = -1;
}
} else {