Match 4 more functions (#2909)

* Match daNpcF_Lookat_c::adjustMoveDisAngle

* Match daNpc_ykM_c::reset and daNpc_ykW_c::reset

* Fakematch daNpcThe_c::main gameInfo load

* Update configure.py
This commit is contained in:
LagoLunatic 2025-12-02 21:18:28 -05:00 committed by GitHub
parent cabc703969
commit e39af8edf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 30 additions and 30 deletions

View File

@ -805,7 +805,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "d/d_meter2.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_msg_out_font.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_msg_class.cpp"),
Object(Equivalent, "d/d_msg_object.cpp"), # weak func order
Object(Equivalent, "d/d_msg_object.cpp"), # weak func order
Object(MatchingFor("GZ2P01", "GZ2J01"), "d/d_msg_unit.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_msg_scrn_3select.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_msg_scrn_arrow.cpp"),
@ -1069,7 +1069,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN, "ShieldD"), "JSystem/JAudio2/JAUBankTable.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUClusterSound.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUInitializer.cpp"),
Object(Equivalent, "JSystem/JAudio2/JAUSectionHeap.cpp"), # weak function order
Object(Equivalent, "JSystem/JAudio2/JAUSectionHeap.cpp"), # weak func order
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUSeqCollection.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUSeqDataBlockMgr.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUSoundAnimator.cpp"),
@ -1720,7 +1720,7 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_msg"),
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_push"),
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_telop"),
ActorRel(Equivalent, "d_a_tbox"), # weak func order
ActorRel(Equivalent, "d_a_tbox"), # weak func order
ActorRel(MatchingFor(ALL_GCN), "d_a_tbox2"),
ActorRel(MatchingFor(ALL_GCN), "d_a_vrbox"),
ActorRel(NonMatching, "d_a_vrbox2"),
@ -1731,7 +1731,7 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_disappear"),
ActorRel(Equivalent, "d_a_mg_rod"), # regalloc; weak func order; inlining issues
ActorRel(MatchingFor(ALL_GCN), "d_a_midna"),
ActorRel(Equivalent, "d_a_nbomb"), # weak func order
ActorRel(Equivalent, "d_a_nbomb"), # weak func order
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_life_container"),
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_yousei"),
ActorRel(MatchingFor(ALL_GCN), "d_a_spinner"),
@ -1963,12 +1963,12 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_myna"),
ActorRel(MatchingFor(ALL_GCN), "d_a_ni"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_aru"),
ActorRel(Equivalent, "d_a_npc_ash"), # weak func order (sinShort)
ActorRel(Equivalent, "d_a_npc_ashB"), # weak func order (sinShort)
ActorRel(Equivalent, "d_a_npc_ash"), # weak func order (sinShort)
ActorRel(Equivalent, "d_a_npc_ashB"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_bans"),
ActorRel(NonMatching, "d_a_npc_blue_ns"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_bou"),
ActorRel(Equivalent, "d_a_npc_bouS"), # weak func order (sinShort)
ActorRel(Equivalent, "d_a_npc_bouS"), # weak func order (sinShort)
ActorRel(Equivalent, "d_a_npc_cdn3"), # weak func order (~csXyz); vtable order
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_chat"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_chin"),
@ -1998,9 +1998,9 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_hanjo"),
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_npc_henna0"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_hoz"),
ActorRel(Equivalent, "d_a_npc_impal"), # weak func order
ActorRel(Equivalent, "d_a_npc_impal"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_inko"),
ActorRel(Equivalent, "d_a_npc_ins"), # weak func order
ActorRel(Equivalent, "d_a_npc_ins"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_jagar"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_kasi_hana"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_kasi_kyu"),
@ -2009,7 +2009,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_npc_kn"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_knj"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_kolinb"),
ActorRel(Equivalent, "d_a_npc_ks"), # weak func order
ActorRel(Equivalent, "d_a_npc_ks"), # weak func order
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_kyury"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_len"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_lf"),
@ -2030,7 +2030,7 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_pouya"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_prayer"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_raca"),
ActorRel(Equivalent, "d_a_npc_rafrel"), # weak func order
ActorRel(Equivalent, "d_a_npc_rafrel"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_saru"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_seib"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_seic"),
@ -2038,7 +2038,7 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_seira"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_seira2"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_seirei"),
ActorRel(Equivalent, "d_a_npc_shad"), # weak func order
ActorRel(Equivalent, "d_a_npc_shad"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_shaman"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_shoe"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_shop0"),
@ -2047,23 +2047,23 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_soldierA"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_soldierB"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_sq"),
ActorRel(NonMatching, "d_a_npc_the"),
ActorRel(Equivalent, "d_a_npc_the"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_theB"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_tk"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_tkc"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_tkj2"),
ActorRel(NonMatching, "d_a_npc_tks"), # weak func order (sinShort)
ActorRel(Equivalent, "d_a_npc_tks"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_toby"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_tr"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_uri"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_worm"),
ActorRel(NonMatching, "d_a_npc_wrestler"),
ActorRel(NonMatching, "d_a_npc_wrestler"), # regalloc; weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_yamid"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_yamis"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_yamit"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_yelia"),
ActorRel(NonMatching, "d_a_npc_ykm"),
ActorRel(NonMatching, "d_a_npc_ykw"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_ykm"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_ykw"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_zanb"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_zant"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_zelR"),
@ -2339,7 +2339,7 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_thashi"),
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_thdoor"),
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_timeFire"),
ActorRel(Equivalent, "d_a_obj_tks"), # weak function order
ActorRel(Equivalent, "d_a_obj_tks"), # weak func order (sinShort)
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_tmoon"),
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_toaru_maki"),
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_toby"),

View File

@ -196,7 +196,7 @@ public:
const int getIdx() { return mIdx; }
dPath* getPathInfo() { return mPathInfo; }
const dPath* getPathInfo() { return mPathInfo; }
void onReverse() {
mDirection = 1;

View File

@ -1,5 +1,7 @@
#include "d/actor/d_a_npc.h"
#include "d/actor/d_a_npc2.h"
#include "d/d_bg_w.h"
#include "d/d_debug_viewer.h"
static s32 daBaseNpc_chkPnt(cXyz param_0, dPnt* param_1, u16 param_2, u16 param_3, int param_4, int param_5);
static u16 daBaseNpc_putNurbs(dPnt* i_CPnts, int i_CPntNum, int i_maxPntNum, dPnt* o_curve_p, BOOL i_isClosed);

View File

@ -394,14 +394,13 @@ void daNpcF_Lookat_c::calc(fopAc_ac_c* i_actor, Mtx i_baseTransformMtx, csXyz**
}
}
// NONMATCHING - regalloc, matches debug
void daNpcF_Lookat_c::adjustMoveDisAngle(s16& delta, s16 angle, s16 min, s16 max) {
int newAngle = 0;
newAngle = angle + delta;
if (max < newAngle) {
if (angle < max) {
delta -= (newAngle - max);
delta = delta - (newAngle - max);
} else {
delta = 0;
}
@ -410,7 +409,7 @@ void daNpcF_Lookat_c::adjustMoveDisAngle(s16& delta, s16 angle, s16 min, s16 max
newAngle = angle + delta;
if (newAngle < min) {
if (min < angle) {
delta -= (newAngle - min);
delta = delta - (newAngle - min);
} else {
delta = 0;
}

View File

@ -1111,7 +1111,6 @@ void daNpcThe_c::setParam() {
gravity = mpHIO->m.common.gravity;
}
// NONMATCHING dComIfG_gameInfo issues
BOOL daNpcThe_c::main() {
if (!doEvent()) {
doNormalAction(1);
@ -1127,8 +1126,12 @@ BOOL daNpcThe_c::main() {
attention_info.flags = 0;
}
// TODO: gameInfo fake match to force reuse of pointer
dComIfG_inf_c* gameInfo = &g_dComIfG_gameInfo;
if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && mItemID != -1) {
dComIfGp_event_setItemPartnerId(mItemID);
// Fakematch, should be:
// dComIfGp_event_setItemPartnerId(mItemID);
gameInfo->play.getEvent().setPtI_Id(mItemID);
mItemID = -1;
}
@ -1139,7 +1142,7 @@ BOOL daNpcThe_c::main() {
eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo]]);
}
if (!strcmp(dComIfGp_getStartStageName(), "R_SP116")) {
eventInfo.onCondition(0x20);
eventInfo.onCondition(dEvtCnd_CANTALKITEM_e);
}
orderEvent(field_0xe1c, l_evtNames[mOrderEvtNo], 0xffff, 0x28, 0xff, 1);
}

View File

@ -1000,10 +1000,7 @@ void daNpc_ykM_c::reset() {
mRoomPath = NULL;
if (mType == TYPE_4 && mPath.chkNextId()) {
//TODO: Separate decl is fakematch, this is fixed by properly matching
// daNpcT_DmgStagger_c::initialize in debug but doing so breaks other functions.
dPath* path = mPath.getPathInfo();
mRoomPath = dPath_GetRoomPath(path->m_nextID, fopAcM_GetRoomNo(this));
mRoomPath = dPath_GetRoomPath(mPath.getPathInfo()->m_nextID, fopAcM_GetRoomNo(this));
}
}

View File

@ -602,7 +602,6 @@ int daNpc_ykW_c::isDelete() {
}
}
// NONMATCHING - m_nextID load issue
void daNpc_ykW_c::reset() {
cXyz unkXyz1;
csXyz unkSxyz1;