mirror of https://github.com/zeldaret/tp.git
d_a_npc_besu equivalent (#2510)
* beautify_anm_data v2.0 * d_a_npc_besu 50% done * d_a_npc_besu 70% done * d_a_npc_besu until wait + indent fix * d_a_npc_besu equivalent! * Mark d_a_npc_besu as equiv in configure py
This commit is contained in:
parent
a41de30a24
commit
712c880710
|
@ -1551,7 +1551,7 @@ config.libs = [
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_kytag11"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_kytag11"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_kytag14"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_kytag14"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_mg_fish"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_mg_fish"),
|
||||||
ActorRel(NonMatching, "d_a_npc_besu"),
|
ActorRel(Equivalent, "d_a_npc_besu"), # weak func order
|
||||||
ActorRel(Equivalent, "d_a_npc_fairy_seirei"),
|
ActorRel(Equivalent, "d_a_npc_fairy_seirei"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_fish"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_fish"),
|
||||||
ActorRel(Equivalent, "d_a_npc_henna"), # weak func order
|
ActorRel(Equivalent, "d_a_npc_henna"), # weak func order
|
||||||
|
|
|
@ -95,6 +95,12 @@ public:
|
||||||
mJointTree.makeHierarchy(joint, hierarchy, &mMaterialTable, &mShapeTable);
|
mJointTree.makeHierarchy(joint, hierarchy, &mMaterialTable, &mShapeTable);
|
||||||
mShapeTable.initShapeNodes(getDrawMtxData(), &getVertexData());
|
mShapeTable.initShapeNodes(getDrawMtxData(), &getVertexData());
|
||||||
}
|
}
|
||||||
|
void show() {
|
||||||
|
mShapeTable.show();
|
||||||
|
}
|
||||||
|
void hide() {
|
||||||
|
mShapeTable.hide();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class J3DModelLoader;
|
friend class J3DModelLoader;
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef D_A_NPC_BESU_H
|
#ifndef D_A_NPC_BESU_H
|
||||||
#define D_A_NPC_BESU_H
|
#define D_A_NPC_BESU_H
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
#include "SSystem/SComponent/c_counter.h"
|
||||||
|
#endif
|
||||||
#include "d/actor/d_a_npc.h"
|
#include "d/actor/d_a_npc.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,80 +14,128 @@
|
||||||
* @details
|
* @details
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class daNpc_Besu_c : public fopAc_ac_c {
|
class daNpc_Besu_c : public daNpcT_c {
|
||||||
public:
|
public:
|
||||||
|
typedef int (daNpc_Besu_c::*cutFunc)(int);
|
||||||
|
typedef int (daNpc_Besu_c::*actionFunc)(void*);
|
||||||
|
|
||||||
/* 80536E4C */ ~daNpc_Besu_c();
|
/* 80536E4C */ ~daNpc_Besu_c();
|
||||||
/* 8053701C */ void create();
|
/* 8053701C */ int create();
|
||||||
/* 805372FC */ void CreateHeap();
|
/* 805372FC */ int CreateHeap();
|
||||||
/* 80537914 */ void Delete();
|
/* 80537914 */ int Delete();
|
||||||
/* 80537948 */ void Execute();
|
/* 80537948 */ int Execute();
|
||||||
/* 80537968 */ void Draw();
|
/* 80537968 */ int Draw();
|
||||||
/* 805379FC */ void createHeapCallBack(fopAc_ac_c*);
|
/* 805379FC */ static int createHeapCallBack(fopAc_ac_c*);
|
||||||
/* 80537A1C */ void ctrlJointCallBack(J3DJoint*, int);
|
/* 80537A1C */ static int ctrlJointCallBack(J3DJoint*, int);
|
||||||
/* 80537A74 */ void getType();
|
/* 80537A74 */ u8 getType();
|
||||||
/* 80537B34 */ void isDelete();
|
/* 80537B34 */ BOOL isDelete();
|
||||||
/* 80537DE4 */ void reset();
|
/* 80537DE4 */ void reset();
|
||||||
/* 80537FD0 */ void chkNurse();
|
/* 80537FD0 */ BOOL chkNurse();
|
||||||
/* 80537FFC */ void chkBesu3();
|
/* 80537FFC */ BOOL chkBesu3();
|
||||||
/* 80538028 */ void afterJntAnm(int);
|
/* 80538028 */ void afterJntAnm(int);
|
||||||
/* 805380A4 */ void setParam();
|
/* 805380A4 */ void setParam();
|
||||||
/* 805382D0 */ void checkChangeEvt();
|
/* 805382D0 */ BOOL checkChangeEvt();
|
||||||
/* 80538490 */ void setAfterTalkMotion();
|
/* 80538490 */ void setAfterTalkMotion();
|
||||||
/* 8053853C */ void srchActors();
|
/* 8053853C */ void srchActors();
|
||||||
/* 805387D0 */ void evtTalk();
|
/* 805387D0 */ BOOL evtTalk();
|
||||||
/* 80538870 */ void evtCutProc();
|
/* 80538870 */ BOOL evtCutProc();
|
||||||
/* 80538938 */ void action();
|
/* 80538938 */ void action();
|
||||||
/* 80538B54 */ void beforeMove();
|
/* 80538B54 */ void beforeMove();
|
||||||
/* 80538C18 */ void setAttnPos();
|
/* 80538C18 */ void setAttnPos();
|
||||||
/* 805391B8 */ void setCollision();
|
/* 805391B8 */ void setCollision();
|
||||||
/* 80539494 */ bool drawDbgInfo();
|
/* 80539494 */ int drawDbgInfo();
|
||||||
/* 8053949C */ void drawOtherMdl();
|
/* 8053949C */ void drawOtherMdl();
|
||||||
/* 805395F4 */ void setCupAnm(int, int, f32);
|
/* 805395F4 */ int setCupAnm(int, int, f32);
|
||||||
/* 805396C4 */ void afterSetMotionAnm(int, int, f32, int);
|
/* 805396C4 */ bool afterSetMotionAnm(int, int, f32, int);
|
||||||
/* 805396F8 */ void getFaceMotionAnm(daNpcT_faceMotionAnmData_c);
|
/* 805396F8 */ daNpcT_faceMotionAnmData_c getFaceMotionAnm(daNpcT_faceMotionAnmData_c);
|
||||||
/* 805397B0 */ void changeAnm(int*, int*);
|
/* 805397B0 */ void changeAnm(int*, int*);
|
||||||
/* 80539840 */ void changeBck(int*, int*);
|
/* 80539840 */ void changeBck(int*, int*);
|
||||||
/* 805398DC */ void changeBtp(int*, int*);
|
/* 805398DC */ void changeBtp(int*, int*);
|
||||||
/* 80539968 */ void changeBtk(int*, int*);
|
/* 80539968 */ void changeBtk(int*, int*);
|
||||||
/* 80539994 */ void selectAction();
|
/* 80539994 */ int selectAction();
|
||||||
/* 80539ACC */ void chkAction(int (daNpc_Besu_c::*)(void*));
|
/* 80539ACC */ int chkAction(actionFunc);
|
||||||
/* 80539AF8 */ void setAction(int (daNpc_Besu_c::*)(void*));
|
/* 80539AF8 */ int setAction(actionFunc);
|
||||||
/* 80539BA0 */ void mop(int, int);
|
/* 80539BA0 */ void mop(int, int);
|
||||||
/* 80539CF4 */ void cutConversationAboutSaru(int);
|
/* 80539CF4 */ int cutConversationAboutSaru(int);
|
||||||
/* 80539E48 */ void cutConversationAboutPachinko(int);
|
/* 80539E48 */ int cutConversationAboutPachinko(int);
|
||||||
/* 8053A45C */ void cutConversationAboutWoodSwd(int);
|
/* 8053A45C */ int cutConversationAboutWoodSwd(int);
|
||||||
/* 8053A7A0 */ void cutSwdTutorial(int);
|
/* 8053A7A0 */ int cutSwdTutorial(int);
|
||||||
/* 8053AA6C */ void cutFindMonkey(int);
|
/* 8053AA6C */ int cutFindMonkey(int);
|
||||||
/* 8053AF5C */ void cutGetWoodSwd(int);
|
/* 8053AF5C */ int cutGetWoodSwd(int);
|
||||||
/* 8053B058 */ void cutCacaricoConversation(int);
|
/* 8053B058 */ int cutCacaricoConversation(int);
|
||||||
/* 8053B250 */ void cutSurprise(int);
|
/* 8053B250 */ int cutSurprise(int);
|
||||||
/* 8053B530 */ void cutConversationInHotel(int);
|
/* 8053B530 */ int cutConversationInHotel(int);
|
||||||
/* 8053B820 */ void cutConversationAboutDeathMt(int);
|
/* 8053B820 */ int cutConversationAboutDeathMt(int);
|
||||||
/* 8053BA60 */ void cutConversationAboutGoron(int);
|
/* 8053BA60 */ int cutConversationAboutGoron(int);
|
||||||
/* 8053BD18 */ void cutNurse(int);
|
/* 8053BD18 */ int cutNurse(int);
|
||||||
/* 8053BE84 */ void cutClothTry(int);
|
/* 8053BE84 */ int cutClothTry(int);
|
||||||
/* 8053BF60 */ void cutThankYou(int);
|
/* 8053BF60 */ int cutThankYou(int);
|
||||||
/* 8053C08C */ void wait(void*);
|
/* 8053C08C */ int wait(void*);
|
||||||
/* 8053CAA0 */ void swdTutorial(void*);
|
/* 8053CAA0 */ int swdTutorial(void*);
|
||||||
/* 8053CBB8 */ void nurse(void*);
|
/* 8053CBB8 */ int nurse(void*);
|
||||||
/* 8053CF78 */ void giveHotWater(void*);
|
/* 8053CF78 */ int giveHotWater(void*);
|
||||||
/* 8053D078 */ void talk(void*);
|
/* 8053D078 */ int talk(void*);
|
||||||
/* 8053E588 */ daNpc_Besu_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*,
|
/* 8053E588 */ daNpc_Besu_c(
|
||||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
|
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
|
||||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
|
daNpcT_motionAnmData_c const* i_motionAnmData,
|
||||||
daNpcT_evtData_c const*, char**);
|
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||||
/* 8053E6A8 */ s32 getEyeballMaterialNo();
|
int i_faceMotionStepNum,
|
||||||
/* 8053E6B0 */ s32 getHeadJointNo();
|
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||||
/* 8053E6B8 */ s32 getNeckJointNo();
|
int i_motionStepNum,
|
||||||
/* 8053E6C0 */ bool getBackboneJointNo();
|
daNpcT_evtData_c const* i_evtData,
|
||||||
/* 8053E6C8 */ void checkChangeJoint(int);
|
char** i_arcNames)
|
||||||
/* 8053E6D8 */ void checkRemoveJoint(int);
|
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||||
|
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||||
|
i_arcNames) {
|
||||||
|
// "construct"
|
||||||
|
OS_REPORT("|%06d:%x|daNpc_Besu_c -> コンストラクト\n", g_Counter.mCounter0, this);
|
||||||
|
}
|
||||||
|
/* 8053E6A8 */ s32 getEyeballMaterialNo() { return 2; }
|
||||||
|
/* 8053E6B0 */ s32 getHeadJointNo() { return 4; }
|
||||||
|
/* 8053E6B8 */ s32 getNeckJointNo() { return 3; }
|
||||||
|
/* 8053E6C0 */ s32 getBackboneJointNo() { return true; }
|
||||||
|
/* 8053E6C8 */ BOOL checkChangeJoint(int arg0) { return arg0 == 4; }
|
||||||
|
/* 8053E6D8 */ BOOL checkRemoveJoint(int arg0) { return arg0 == 6; }
|
||||||
|
|
||||||
|
u32 getFlowNodeNo() {
|
||||||
|
u16 nodeNo = home.angle.x;
|
||||||
|
u32 rv;
|
||||||
|
if (nodeNo == 0xffff) {
|
||||||
|
rv = -1;
|
||||||
|
} else {
|
||||||
|
rv = nodeNo;
|
||||||
|
}
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
|
||||||
|
u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; }
|
||||||
|
|
||||||
static char* mCutNameList[15];
|
static char* mCutNameList[15];
|
||||||
static u8 mCutList[180];
|
static cutFunc mCutList[15];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* 0x568 */ u8 field_0x568[0x1138 - 0x568];
|
/* 0x0E40 */ mDoExt_McaMorfSO* mpBesuMorf;
|
||||||
|
/* 0x0E44 */ u8 field_0xe44[0x0E48 - 0xE44];
|
||||||
|
/* 0x0E48 */ J3DModel* mpModel[1];
|
||||||
|
/* 0x0E4C */ dCcD_Cyl mCyl1;
|
||||||
|
/* 0x0F88 */ dCcD_Cyl mCyl2;
|
||||||
|
/* 0x10C4 */ u8 mType;
|
||||||
|
/* 0x10C8 */ daNpcT_ActorMngr_c mActorMngr[7];
|
||||||
|
/* 0x1100 */ actionFunc mNextAction;
|
||||||
|
/* 0x110C */ actionFunc mAction;
|
||||||
|
/* 0x1118 */ int field_0x1118;
|
||||||
|
/* 0x111C */ int field_0x111c;
|
||||||
|
/* 0x1120 */ int field_0x1120;
|
||||||
|
/* 0x1124 */ int field_0x1124;
|
||||||
|
/* 0x1128 */ int field_0x1128;
|
||||||
|
/* 0x112C */ u8 field_0x112c;
|
||||||
|
/* 0x112D */ u8 field_0x112d;
|
||||||
|
/* 0x112E */ u8 field_0x112e;
|
||||||
|
/* 0x112F */ u8 field_0x112f;
|
||||||
|
/* 0x1130 */ u8 field_0x1130;
|
||||||
|
/* 0x1131 */ u8 field_0x1131[0x1134 - 0x1131];
|
||||||
|
/* 0x1134 */ u8 field_0x1134;
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC_ASSERT(sizeof(daNpc_Besu_c) == 0x1138);
|
STATIC_ASSERT(sizeof(daNpc_Besu_c) == 0x1138);
|
||||||
|
@ -96,7 +147,7 @@ struct daNpc_Besu_HIOParam {
|
||||||
|
|
||||||
class daNpc_Besu_Param_c {
|
class daNpc_Besu_Param_c {
|
||||||
public:
|
public:
|
||||||
/* 8053E6E8 */ ~daNpc_Besu_Param_c();
|
/* 8053E6E8 */ virtual ~daNpc_Besu_Param_c() {}
|
||||||
|
|
||||||
static const daNpc_Besu_HIOParam m;
|
static const daNpc_Besu_HIOParam m;
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -29,6 +29,9 @@ SEQ_MOTION_PATTERN = r'SECTION_DATA static u8 l_motionSequenceData\[\d+\] = {'
|
||||||
HEAP_SIZE_TYPE = "int const heapSize"
|
HEAP_SIZE_TYPE = "int const heapSize"
|
||||||
HEAP_SIZE_PATTERN = r'SECTION_RODATA static u8 const heapSize\[\d+\] = {'
|
HEAP_SIZE_PATTERN = r'SECTION_RODATA static u8 const heapSize\[\d+\] = {'
|
||||||
|
|
||||||
|
BMD_DATA_TYPE = "int l_bmdData"
|
||||||
|
BMD_DATA_PATTERN = r'SECTION_DATA static u8 l_bmdData\[\d+\] = {'
|
||||||
|
|
||||||
PARAM_TYPE = "::m"
|
PARAM_TYPE = "::m"
|
||||||
PARAM_PATTERN = r'SECTION_RODATA u8 const (\w+_Param_c)::m\[\d+\] = {'
|
PARAM_PATTERN = r'SECTION_RODATA u8 const (\w+_Param_c)::m\[\d+\] = {'
|
||||||
|
|
||||||
|
@ -281,6 +284,10 @@ def build_anm_struct(byte_collection, anm_type):
|
||||||
elif anm_type is HEAP_SIZE_TYPE:
|
elif anm_type is HEAP_SIZE_TYPE:
|
||||||
piece_size = 4
|
piece_size = 4
|
||||||
instr_arr = ["h4"]
|
instr_arr = ["h4"]
|
||||||
|
elif anm_type is BMD_DATA_TYPE:
|
||||||
|
piece_size = 8
|
||||||
|
instr_arr = ["s4", "s4"]
|
||||||
|
is_array = True
|
||||||
|
|
||||||
if my_len % piece_size != 0:
|
if my_len % piece_size != 0:
|
||||||
print(f"Error: len() = '{my_len}' isn't divisble by '{piece_size}'")
|
print(f"Error: len() = '{my_len}' isn't divisble by '{piece_size}'")
|
||||||
|
@ -332,6 +339,9 @@ def build_anm_struct(byte_collection, anm_type):
|
||||||
cutoff_num = 4
|
cutoff_num = 4
|
||||||
|
|
||||||
res_str += "[{}]".format(int(res_len))
|
res_str += "[{}]".format(int(res_len))
|
||||||
|
if anm_type == BMD_DATA_TYPE:
|
||||||
|
res_str += "[2]"
|
||||||
|
|
||||||
res_str += " = {\n"
|
res_str += " = {\n"
|
||||||
cur_in_line = 0
|
cur_in_line = 0
|
||||||
cur_idx = 0
|
cur_idx = 0
|
||||||
|
@ -456,6 +466,9 @@ def run_beautify_anm_data(in_file, type=None, no_auto_float=False):
|
||||||
elif re.search(HEAP_SIZE_PATTERN, line):
|
elif re.search(HEAP_SIZE_PATTERN, line):
|
||||||
in_byte_array = True
|
in_byte_array = True
|
||||||
anm_type = HEAP_SIZE_TYPE
|
anm_type = HEAP_SIZE_TYPE
|
||||||
|
elif re.search(BMD_DATA_PATTERN, line):
|
||||||
|
in_byte_array = True
|
||||||
|
anm_type = BMD_DATA_TYPE
|
||||||
elif re.search(EVT_LIST_PATTERN, line):
|
elif re.search(EVT_LIST_PATTERN, line):
|
||||||
in_charptr_array = True
|
in_charptr_array = True
|
||||||
charptr_type = "l_evtList"
|
charptr_type = "l_evtList"
|
||||||
|
|
Loading…
Reference in New Issue