d_a_npc_grd matching (#2821)

* d_a_npc_grd matching

* Fix regression

* Fix
This commit is contained in:
hev7 2025-11-19 02:21:48 +00:00 committed by GitHub
parent 8a39ebfa8b
commit 1b2fe5e2e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1196 additions and 1223 deletions

View File

@ -1844,7 +1844,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_kytag15"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_kytag16"),
ActorRel(NonMatching, "d_a_mant"),
ActorRel(MatchingFor("GZ2E01"), "d_a_mg_fshop"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01"), "d_a_mg_fshop"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_mirror"),
ActorRel(NonMatching, "d_a_movie_player", extra_cflags=["-O3,p"]),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_myna"),
@ -1860,8 +1860,8 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_chat", extra_cflags=[DANPCF_C_HACK]),
ActorRel(NonMatching, "d_a_npc_chin"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_clerka"),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_clerkb"),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_clerkt"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_clerkb"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_clerkt"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_coach"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_df"),
ActorRel(NonMatching, "d_a_npc_doc"),
@ -1873,7 +1873,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_gnd"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_gra", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_grc", extra_cflags=[DANPCF_C_HACK]),
ActorRel(NonMatching, "d_a_npc_grd"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_grd", extra_cflags=[DANPCF_C_HACK]),
ActorRel(NonMatching, "d_a_npc_grm"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_grmc"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_gro", extra_cflags=[DANPCF_C_HACK]),
@ -1889,8 +1889,8 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_inko"),
ActorRel(Equivalent, "d_a_npc_ins", extra_cflags=[DANPCF_C_HACK]), # weak func order
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_jagar"),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_kasi_hana", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_kasi_kyu", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_kasi_hana", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_kasi_kyu", extra_cflags=[DANPCF_C_HACK]),
ActorRel(Equivalent, "d_a_npc_kasi_mich", extra_cflags=[DANPCF_C_HACK]), # idk this why can't link
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01", "Shield"), "d_a_npc_kdk"),
ActorRel(NonMatching, "d_a_npc_kn"),

View File

@ -3,6 +3,31 @@
#include "d/actor/d_a_npc.h"
struct daNpc_Grd_HIOParam {
/* 0x00 */ daNpcF_HIOParam common;
};
class daNpc_Grd_Param_c {
public:
/* 80AF267C */ virtual ~daNpc_Grd_Param_c() {}
static daNpc_Grd_HIOParam const m;
};
#if DEBUG
class daNpc_Grd_HIO_c : public mDoHIO_entry_c {
public:
daNpc_Grd_HIO_c();
void listenPropertyEvent(const JORPropertyEvent*);
void genMessage(JORMContext*);
/* 0x8 */ daNpc_Grd_HIOParam m;
};
#define NPC_GRD_HIO_CLASS daNpc_Grd_HIO_c
#else
#define NPC_GRD_HIO_CLASS daNpc_Grd_Param_c
#endif
/**
* @ingroup actors-npcs
* @class daNpc_Grd_c
@ -11,63 +36,74 @@
* @details
*
*/
class daNpc_Grd_c : public fopAc_ac_c {
class daNpc_Grd_c : public daNpcF_c {
public:
typedef int (daNpc_Grd_c::*actionFunc)(void*);
typedef int (daNpc_Grd_c::*cutFunc)(int);
/* 809CFD2C */ daNpc_Grd_c();
/* 809CFF40 */ ~daNpc_Grd_c();
/* 809D0140 */ void create();
/* 809D0414 */ void CreateHeap();
/* 809D0858 */ void Delete();
/* 809D088C */ void Execute();
/* 809D08AC */ void Draw();
/* 809D093C */ void ctrlJoint(J3DJoint*, J3DModel*);
/* 809D0B70 */ void createHeapCallBack(fopAc_ac_c*);
/* 809D0B90 */ void ctrlJointCallBack(J3DJoint*, int);
/* 809D0140 */ int create();
/* 809D0414 */ int CreateHeap();
/* 809D0858 */ int Delete();
/* 809D088C */ int Execute();
/* 809D08AC */ int Draw();
/* 809D093C */ int ctrlJoint(J3DJoint*, J3DModel*);
/* 809D0B70 */ static int createHeapCallBack(fopAc_ac_c*);
/* 809D0B90 */ static int ctrlJointCallBack(J3DJoint*, int);
/* 809D0BDC */ void setParam();
/* 809D0D1C */ void main();
/* 809D0E9C */ void ctrlBtk();
/* 809D0D1C */ BOOL main();
/* 809D0E9C */ BOOL ctrlBtk();
/* 809D0F7C */ void setAttnPos();
/* 809D14BC */ void setExpressionAnm(int, bool);
/* 809D1670 */ void setExpressionBtp(int);
/* 809D14BC */ bool setExpressionAnm(int, bool);
/* 809D1670 */ bool setExpressionBtp(int);
/* 809D1794 */ void setExpression(int, f32);
/* 809D17C0 */ bool setMotionAnm(int, f32);
/* 809D17C0 */ void setMotionAnm(int, f32);
/* 809D1940 */ void setMotion(int, f32, int);
/* 809D1984 */ bool drawDbgInfo();
/* 809D1984 */ BOOL drawDbgInfo();
/* 809D198C */ void drawOtherMdls();
/* 809D1990 */ void getTypeFromParam();
/* 809D19B0 */ void isDelete();
/* 809D1990 */ u8 getTypeFromParam();
/* 809D19B0 */ int isDelete();
/* 809D1A1C */ void reset();
/* 809D1B9C */ void playExpression();
/* 809D1D00 */ void playMotion();
/* 809D1F50 */ void chkAction(int (daNpc_Grd_c::*)(void*));
/* 809D1F7C */ void setAction(int (daNpc_Grd_c::*)(void*));
/* 809D2024 */ void selectAction();
/* 809D1F50 */ int chkAction(actionFunc);
/* 809D1F7C */ int setAction(actionFunc);
/* 809D2024 */ int selectAction();
/* 809D20A4 */ void doNormalAction(int);
/* 809D21B8 */ void doEvent();
/* 809D21B8 */ BOOL doEvent();
/* 809D2470 */ void setLookMode(int);
/* 809D2494 */ void lookat();
/* 809D2730 */ void setExpressionTalkAfter();
/* 809D2768 */ void wait(void*);
/* 809D2970 */ void talk(void*);
/* 809D2B20 */ void test(void*);
/* 809D2C9C */ void ECut_nodToGrz(int);
/* 809D3994 */ void adjustShapeAngle();
/* 809D2768 */ int wait(void*);
/* 809D2970 */ int talk(void*);
/* 809D2B20 */ int test(void*);
/* 809D2C9C */ BOOL ECut_nodToGrz(int);
/* 809D3994 */ void adjustShapeAngle() {}
static char* mEvtCutNameList[2];
static u8 mEvtCutList[24];
static cutFunc mEvtCutList[2];
private:
/* 0x568 */ u8 field_0x568[0xe1c - 0x568];
/* 0xB48 */ Z2Creature mSound;
/* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm;
/* 0xBDC */ daNpcF_Lookat_c mLookat;
/* 0xC78 */ daNpcF_ActorMngr_c mActorMngr[3];
/* 0xC90 */ NPC_GRD_HIO_CLASS* mpHIO;
/* 0xC94 */ dCcD_Cyl mCyl;
/* 0xDD0 */ actionFunc mNextAction;
/* 0xDDC */ actionFunc mAction;
/* 0xDE8 */ request_of_phase_process_class mPhase[3];
/* 0xE00 */ int field_0xe00;
/* 0xE04 */ int field_0xe04;
/* 0xE08 */ int field_0xe08;
/* 0xE0C */ int field_0xe0c;
/* 0xE10 */ int mFlowID;
/* 0xE14 */ s16 mLookMode;
/* 0xE16 */ u16 mMode;
/* 0xE18 */ u8 mType;
};
STATIC_ASSERT(sizeof(daNpc_Grd_c) == 0xe1c);
class daNpc_Grd_Param_c {
public:
/* 809D3998 */ ~daNpc_Grd_Param_c();
static u8 const m[108];
};
#endif /* D_A_NPC_GRD_H */

View File

@ -1662,8 +1662,14 @@ static int daFshop_Create(fopAc_ac_c* actor) {
fopAcM_createChild(PROC_FSHOP, fopAcM_GetID(actor), 0xFFFFFF23, &actor->current.pos, fopAcM_GetRoomNo(actor), NULL, NULL, -1, NULL);
u8 sp10 = 1;
#if VERSION == VERSION_GCN_PAL || VERSION == VERSION_WII_PAL || PLATFORM_SHIELD
if (dComIfGs_getPalLanguage() == 1) {
#if VERSION == VERSION_GCN_PAL || VERSION == VERSION_WII_PAL
if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ENGLISH) {
sp10 = 2;
} else {
sp10 = 0;
}
#elif PLATFORM_SHIELD
if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_GERMAN) {
sp10 = 2;
} else {
sp10 = 0;

File diff suppressed because it is too large Load Diff