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 69de50f516
commit 6cdcda0f1d
7 changed files with 30 additions and 30 deletions
+2
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);
+2 -3
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;
}
+6 -3
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);
}
+1 -4
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));
}
}
-1
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;