mirror of https://github.com/zeldaret/tp
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:
parent
cabc703969
commit
e39af8edf5
22
configure.py
22
configure.py
|
|
@ -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"),
|
||||
|
|
@ -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"),
|
||||
|
|
@ -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"),
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ public:
|
|||
|
||||
const int getIdx() { return mIdx; }
|
||||
|
||||
dPath* getPathInfo() { return mPathInfo; }
|
||||
const dPath* getPathInfo() { return mPathInfo; }
|
||||
|
||||
void onReverse() {
|
||||
mDirection = 1;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -602,7 +602,6 @@ int daNpc_ykW_c::isDelete() {
|
|||
}
|
||||
}
|
||||
|
||||
// NONMATCHING - m_nextID load issue
|
||||
void daNpc_ykW_c::reset() {
|
||||
cXyz unkXyz1;
|
||||
csXyz unkSxyz1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue