|
2 | 2 | #define D_A_OBJ_TKS_H |
3 | 3 |
|
4 | 4 | #include "f_op/f_op_actor_mng.h" |
| 5 | +#include "d/actor/d_a_npc.h" |
| 6 | + |
| 7 | +struct daObjTks_HIOParam { |
| 8 | + /* 0x00 */ daNpcF_HIOParam common; |
| 9 | + /* 0x6C */ f32 offset_x; |
| 10 | + /* 0x70 */ f32 offset_y; |
| 11 | + /* 0x74 */ f32 offset_z; |
| 12 | + /* 0x78 */ f32 spring_factor; |
| 13 | + /* 0x7C */ f32 spring_atten; |
| 14 | +}; |
| 15 | + |
| 16 | +class daObjTks_Param_c { |
| 17 | +public: |
| 18 | + /* 80D126D0 */ virtual ~daObjTks_Param_c() {} |
| 19 | + |
| 20 | + static const daObjTks_HIOParam m; |
| 21 | +}; |
5 | 22 |
|
6 | 23 | /** |
7 | 24 | * @ingroup actors-objects |
|
11 | 28 | * @details |
12 | 29 | * |
13 | 30 | */ |
14 | | -class daObjTks_c : public fopAc_ac_c { |
| 31 | +class daObjTks_c : public daNpcF_c { |
15 | 32 | public: |
16 | 33 | /* 80D0F28C */ daObjTks_c(); |
17 | | - /* 80D0F480 */ ~daObjTks_c(); |
18 | | - /* 80D0F640 */ void Create(); |
19 | | - /* 80D0F904 */ void CreateHeap(); |
20 | | - /* 80D0FD34 */ void Delete(); |
21 | | - /* 80D0FD68 */ void Execute(); |
22 | | - /* 80D0FE60 */ void Draw(); |
23 | | - /* 80D0FED0 */ void ctrlJoint(J3DJoint*, J3DModel*); |
24 | | - /* 80D10094 */ void createHeapCallBack(fopAc_ac_c*); |
25 | | - /* 80D100B4 */ void ctrlJointCallBack(J3DJoint*, int); |
26 | | - /* 80D10100 */ void setMtx(); |
27 | | - /* 80D10184 */ void setExpressionAnm(int, bool); |
28 | | - /* 80D102D0 */ void setExpressionBtp(int); |
29 | | - /* 80D103A4 */ void setMotion(int, f32, int); |
| 34 | + /* 80D0F480 */ virtual ~daObjTks_c(); |
| 35 | + |
| 36 | + /* 80D0F640 */ int Create(); |
| 37 | + /* 80D0F904 */ int CreateHeap(); |
| 38 | + /* 80D0FD34 */ int Delete(); |
| 39 | + /* 80D0FD68 */ int Execute(); |
| 40 | + /* 80D0FE60 */ int Draw(); |
| 41 | + /* 80D0FED0 */ int ctrlJoint(J3DJoint*, J3DModel*); |
| 42 | + /* 80D10094 */ static int createHeapCallBack(fopAc_ac_c*); |
| 43 | + /* 80D100B4 */ static int ctrlJointCallBack(J3DJoint*, int); |
30 | 44 | /* 80D103E8 */ void reset(); |
31 | | - /* 80D10578 */ void setAction(void (daObjTks_c::*)()); |
| 45 | + /* 80D10578 */ inline int setAction(void (daObjTks_c::*)()); |
32 | 46 | /* 80D10618 */ void wait(); |
33 | | - /* 80D106C8 */ void setExpression(int, f32); |
34 | 47 | /* 80D106F4 */ void talk(); |
35 | 48 | /* 80D10A80 */ void demo(); |
36 | | - /* 80D11104 */ bool setMotionAnm(int, f32); |
37 | 49 | /* 80D11228 */ void warp(); |
38 | | - /* 80D11670 */ void setParam(); |
39 | | - /* 80D116C8 */ void main(); |
40 | | - /* 80D118E8 */ void ctrlBtk(); |
41 | | - /* 80D119BC */ void setAttnPos(); |
42 | | - /* 80D11CB4 */ void lookat(); |
43 | | - /* 80D11E94 */ bool drawDbgInfo(); |
44 | | - /* 80D11E9C */ void drawOtherMdls(); |
| 50 | + /* 80D11CB4 */ inline void lookat(); |
| 51 | + |
| 52 | + /* 80D11670 */ virtual void setParam(); |
| 53 | + /* 80D116C8 */ virtual BOOL main(); |
| 54 | + /* 80D118E8 */ virtual BOOL ctrlBtk(); |
| 55 | + /* 80D10100 */ virtual void setMtx(); |
| 56 | + /* 80D119BC */ virtual void setAttnPos(); |
| 57 | + /* 80D10184 */ virtual bool setExpressionAnm(int, bool); |
| 58 | + /* 80D102D0 */ virtual bool setExpressionBtp(int); |
| 59 | + /* 80D106C8 */ virtual void setExpression(int, f32); |
| 60 | + /* 80D11104 */ virtual void setMotionAnm(int, f32); |
| 61 | + /* 80D103A4 */ virtual void setMotion(int, f32, int); |
| 62 | + /* 80D11E94 */ virtual BOOL drawDbgInfo(); |
| 63 | + /* 80D11E9C */ virtual void drawOtherMdls(); |
| 64 | + |
| 65 | + void calcSpringF(f32* param_0, f32 param_1, f32* param_2) { |
| 66 | + *param_2 = daObjTks_Param_c::m.spring_atten * (*param_2 + (daObjTks_Param_c::m.spring_factor * (*param_0 - param_1))); |
| 67 | + *param_0 += *param_2; |
| 68 | + } |
| 69 | + |
| 70 | + inline void playExpression(); |
| 71 | + inline void playMotion(); |
| 72 | + |
| 73 | + bool chkAction(void (daObjTks_c::*i_action)()) { return i_action == mAction; } |
45 | 74 |
|
46 | 75 | void setStart() { field_0xde0 = 1; } |
47 | 76 |
|
48 | | -private: |
49 | | - /* 0x568 */ u8 field_0x568[0xDE0 - 0x568]; |
| 77 | + void setLookMode(int i_mode) { |
| 78 | + if (i_mode >= 0 && i_mode < 6 && i_mode != mLookMode) { |
| 79 | + mLookMode = i_mode; |
| 80 | + } |
| 81 | + } |
| 82 | + |
| 83 | + void setExpressionTalkAfter() { |
| 84 | + (void)mExpression; |
| 85 | + setExpression(1, -1.0f); |
| 86 | + } |
| 87 | + |
| 88 | + /* 0xB48 */ Z2Creature mSound; |
| 89 | + /* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm; |
| 90 | + /* 0xBDC */ daNpcF_Lookat_c mLookat; |
| 91 | + /* 0xC78 */ u8 field_0xC78[0xC7C - 0xC78]; |
| 92 | + /* 0xC7C */ dCcD_Cyl mCcCyl; |
| 93 | + /* 0xDB8 */ void (daObjTks_c::*mAction)(); |
| 94 | + /* 0xDC4 */ request_of_phase_process_class mPhase; |
| 95 | + /* 0xDCC */ f32 field_0xdcc; |
| 96 | + /* 0xDD0 */ f32 field_0xdd0; |
| 97 | + /* 0xDD4 */ u8 field_0xDD4[0xDDC - 0xDD4]; |
| 98 | + /* 0xDDC */ s16 mLookMode; |
| 99 | + /* 0xDDE */ u16 field_0xdde; |
50 | 100 | /* 0xDE0 */ u8 field_0xde0; |
51 | | - /* 0xDE1 */ u8 field_0xde1[0xDE4 - 0xDE1]; |
| 101 | + /* 0xDE1 */ u8 field_0xde1; |
52 | 102 | }; |
53 | 103 |
|
54 | 104 | STATIC_ASSERT(sizeof(daObjTks_c) == 0xDE4); |
55 | 105 |
|
56 | | -class daObjTks_Param_c { |
57 | | -public: |
58 | | - /* 80D126D0 */ ~daObjTks_Param_c(); |
59 | | - |
60 | | - static u8 const m[128]; |
61 | | -}; |
62 | | - |
63 | 106 | #endif /* D_A_OBJ_TKS_H */ |
0 commit comments