|
6 | 6 | /** |
7 | 7 | * @ingroup actors-npcs |
8 | 8 | * @class daNpc_Saru_c |
9 | | - * @brief Monkey (Ook?) |
| 9 | + * @brief Monkey NPC |
10 | 10 | * |
11 | 11 | * @details |
12 | 12 | * |
13 | 13 | */ |
14 | | -class daNpc_Saru_c : public fopAc_ac_c { |
| 14 | + |
| 15 | +#ifdef DEBUG |
| 16 | +class daNpc_Saru_HIO_c : public mDoHIO_entry_c { |
| 17 | + |
| 18 | +}; |
| 19 | +#endif |
| 20 | + |
| 21 | +class daNpc_Saru_Param_c { |
| 22 | +public: |
| 23 | + /* 80AC448C */ virtual ~daNpc_Saru_Param_c() {}; |
| 24 | + |
| 25 | + struct Data { |
| 26 | + /* 0x00 */ f32 field_0x00; |
| 27 | + /* 0x04 */ f32 mGravity; |
| 28 | + /* 0x08 */ f32 field_0x08; |
| 29 | + /* 0x0C */ f32 field_0x0c; |
| 30 | + /* 0x10 */ f32 mWeight; |
| 31 | + /* 0x14 */ f32 mCylH; |
| 32 | + /* 0x18 */ f32 mWallH; |
| 33 | + /* 0x1C */ f32 mWallR; |
| 34 | + /* 0x20 */ f32 mBodyDownAngle; |
| 35 | + /* 0x24 */ f32 mBodyUpAngle; |
| 36 | + /* 0x28 */ f32 mBodyRightAngle; |
| 37 | + /* 0x2C */ f32 mBodyLeftAngle; |
| 38 | + /* 0x30 */ f32 mHeadDownAngle; |
| 39 | + /* 0x34 */ f32 mHeadUpAngle; |
| 40 | + /* 0x38 */ f32 mHeadRightAngle; |
| 41 | + /* 0x3C */ f32 mHeadLeftAngle; |
| 42 | + /* 0x40 */ f32 field_0x40; |
| 43 | + /* 0x44 */ f32 mMorfFrames; |
| 44 | + /* 0x48 */ s16 field_0x48; |
| 45 | + /* 0x4A */ s16 field_0x4a; |
| 46 | + /* 0x4C */ s16 field_0x4c; |
| 47 | + /* 0x4E */ s16 field_0x4e; |
| 48 | + /* 0x50 */ f32 mAttnFovy; |
| 49 | + /* 0x54 */ f32 field_0x54; |
| 50 | + /* 0x58 */ f32 field_0x58; |
| 51 | + /* 0x5C */ f32 field_0x5c; |
| 52 | + /* 0x60 */ s16 field_0x60; |
| 53 | + /* 0x62 */ s16 field_0x62; |
| 54 | + /* 0x64 */ f32 field_0x64; |
| 55 | + /* 0x68 */ f32 field_0x68; |
| 56 | + /* 0x6C */ f32 field_0x6c; |
| 57 | + /* 0x70 */ f32 field_0x70; |
| 58 | + /* 0x74 */ f32 field_0x74; |
| 59 | + /* 0x78 */ f32 field_0x78; |
| 60 | + /* 0x7C */ f32 field_0x7c; |
| 61 | + /* 0x80 */ f32 field_0x80; |
| 62 | + /* 0x84 */ f32 field_0x84; |
| 63 | + /* 0x88 */ f32 field_0x88; |
| 64 | + /* 0x8C */ s16 field_0x8c; |
| 65 | + /* 0x8E */ s16 field_0x8e; |
| 66 | + }; |
| 67 | + |
| 68 | + static const Data m; |
| 69 | +}; |
| 70 | + |
| 71 | +class daNpc_Saru_c : public daNpcT_c { |
15 | 72 | public: |
| 73 | + typedef int (daNpc_Saru_c::*cutFunc)(int); |
| 74 | + typedef int (daNpc_Saru_c::*actionFunc)(void*); |
| 75 | + |
| 76 | + enum Type { |
| 77 | + TYPE_0, |
| 78 | + TYPE_1, |
| 79 | + TYPE_2, |
| 80 | + TYPE_3, |
| 81 | + }; |
| 82 | + |
16 | 83 | /* 80AC042C */ ~daNpc_Saru_c(); |
17 | | - /* 80AC0578 */ void create(); |
18 | | - /* 80AC082C */ void CreateHeap(); |
19 | | - /* 80AC0A54 */ void Delete(); |
20 | | - /* 80AC0A88 */ void Execute(); |
21 | | - /* 80AC0AA8 */ void Draw(); |
22 | | - /* 80AC0AEC */ void createHeapCallBack(fopAc_ac_c*); |
23 | | - /* 80AC0B0C */ void ctrlJointCallBack(J3DJoint*, int); |
24 | | - /* 80AC0B64 */ void srchYm(void*, void*); |
25 | | - /* 80AC0C0C */ void getType(); |
26 | | - /* 80AC0C58 */ void isDelete(); |
| 84 | + /* 80AC0578 */ int create(); |
| 85 | + /* 80AC082C */ int CreateHeap(); |
| 86 | + /* 80AC0A54 */ int Delete(); |
| 87 | + /* 80AC0A88 */ int Execute(); |
| 88 | + /* 80AC0AA8 */ int Draw(); |
| 89 | + /* 80AC0AEC */ static int createHeapCallBack(fopAc_ac_c*); |
| 90 | + /* 80AC0B0C */ static int ctrlJointCallBack(J3DJoint*, int); |
| 91 | + /* 80AC0B64 */ static void* srchYm(void*, void*); |
| 92 | + /* 80AC0C0C */ u8 getType(); |
| 93 | + /* 80AC0C58 */ int isDelete(); |
27 | 94 | /* 80AC0CE8 */ void reset(); |
28 | 95 | /* 80AC0EA4 */ void afterJntAnm(int); |
29 | | - /* 80AC0F28 */ void checkChangeEvt(); |
| 96 | + /* 80AC0F28 */ BOOL checkChangeEvt(); |
30 | 97 | /* 80AC0FDC */ void setParam(); |
31 | 98 | /* 80AC1110 */ void setAfterTalkMotion(); |
32 | 99 | /* 80AC1170 */ void srchActors(); |
33 | | - /* 80AC11D4 */ void evtTalk(); |
34 | | - /* 80AC1274 */ void evtCutProc(); |
| 100 | + /* 80AC11D4 */ BOOL evtTalk(); |
| 101 | + /* 80AC1274 */ BOOL evtCutProc(); |
35 | 102 | /* 80AC133C */ void action(); |
36 | 103 | /* 80AC14E4 */ void beforeMove(); |
37 | 104 | /* 80AC15B4 */ void setAttnPos(); |
38 | 105 | /* 80AC18A0 */ void setCollision(); |
39 | | - /* 80AC1A20 */ bool drawDbgInfo(); |
| 106 | + /* 80AC1A20 */ int drawDbgInfo(); |
40 | 107 | /* 80AC1A28 */ void drawOtherMdl(); |
41 | | - /* 80AC1B30 */ void selectAction(); |
42 | | - /* 80AC1B78 */ void chkAction(int (daNpc_Saru_c::*)(void*)); |
43 | | - /* 80AC1BA4 */ void setAction(int (daNpc_Saru_c::*)(void*)); |
| 108 | + /* 80AC1B30 */ int selectAction(); |
| 109 | + /* 80AC1B78 */ BOOL chkAction(int (daNpc_Saru_c::*)(void*)); |
| 110 | + /* 80AC1BA4 */ int setAction(int (daNpc_Saru_c::*)(void*)); |
44 | 111 | /* 80AC1C4C */ void setSe(); |
45 | | - /* 80AC216C */ void cutFindMonkey(int); |
46 | | - /* 80AC2368 */ void cutHelpMe(int); |
47 | | - /* 80AC2598 */ void cutYmLook(int); |
48 | | - /* 80AC28A4 */ void wait(void*); |
49 | | - /* 80AC2FD8 */ void talk(void*); |
50 | | - /* 80AC4394 */ daNpc_Saru_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*, |
51 | | - daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int, |
52 | | - daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int, |
53 | | - daNpcT_evtData_c const*, char**); |
| 112 | + /* 80AC216C */ int cutFindMonkey(int); |
| 113 | + /* 80AC2368 */ int cutHelpMe(int); |
| 114 | + /* 80AC2598 */ int cutYmLook(int); |
| 115 | + /* 80AC28A4 */ int wait(void*); |
| 116 | + /* 80AC2FD8 */ int talk(void*); |
| 117 | + /* 80AC4394 */ daNpc_Saru_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2, |
| 118 | + daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4, |
| 119 | + daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6, |
| 120 | + daNpcT_evtData_c const* param_7, char** param_8) : |
| 121 | + daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) |
| 122 | + {} |
54 | 123 | /* 80AC4474 */ s32 getHeadJointNo(); |
55 | 124 | /* 80AC447C */ s32 getNeckJointNo(); |
56 | | - /* 80AC4484 */ bool getBackboneJointNo(); |
57 | | - |
58 | | - static void* mCutNameList[4]; |
59 | | - static u8 mCutList[48]; |
| 125 | + /* 80AC4484 */ s32 getBackboneJointNo(); |
60 | 126 |
|
61 | | -private: |
62 | | - /* 0x568 */ u8 field_0x568[0xfe0 - 0x568]; |
63 | | -}; |
| 127 | + u32 getFlowNodeNo() { |
| 128 | + u16 rv = home.angle.x; |
| 129 | + if (rv == 0xffff) { |
| 130 | + return -1; |
| 131 | + } |
| 132 | + return rv; |
| 133 | + } |
64 | 134 |
|
65 | | -STATIC_ASSERT(sizeof(daNpc_Saru_c) == 0xfe0); |
| 135 | + u8 getPathID() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; } |
| 136 | + u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } |
66 | 137 |
|
67 | | -class daNpc_Saru_Param_c { |
68 | | -public: |
69 | | - /* 80AC448C */ ~daNpc_Saru_Param_c(); |
| 138 | + static char* mCutNameList[4]; |
| 139 | + static cutFunc mCutList[4]; |
70 | 140 |
|
71 | | - static u8 const m[144]; |
| 141 | +private: |
| 142 | + #ifdef DEBUG |
| 143 | + /* 0xE90 */ daNpc_Saru_HIO_c* field_0xe90; |
| 144 | + #endif |
| 145 | + /* 0xE40 */ u8 field_0xe40[0xe44 - 0xe40]; |
| 146 | + /* 0xE44 */ J3DModel* field_0xe44[2]; |
| 147 | + /* 0xE4C */ dCcD_Cyl field_0xe4c; |
| 148 | + /* 0xF88 */ u8 mType; |
| 149 | + /* 0xF8C */ daNpcT_ActorMngr_c mActrMngr[1]; |
| 150 | + /* 0xF94 */ daNpcT_Path_c mPath; |
| 151 | + /* 0xFBC */ actionFunc field_0xfbc; |
| 152 | + /* 0xFC8 */ actionFunc field_0xfc8; |
| 153 | + /* 0xFD4 */ int field_0xfd4; |
| 154 | + /* 0xFD8 */ u8 field_0xfd8; |
| 155 | + /* 0xFD9 */ u8 field_0xfd9; |
| 156 | + /* 0xFDC */ int field_0xfdc; |
72 | 157 | }; |
73 | 158 |
|
| 159 | +STATIC_ASSERT(sizeof(daNpc_Saru_c) == 0xfe0); |
74 | 160 |
|
75 | 161 | #endif /* D_A_NPC_SARU_H */ |
0 commit comments