summaryrefslogtreecommitdiff
path: root/include/d/actor/d_a_obj_master_sword.h
blob: e99b8832d7f76fb556bff3ec526510c30469fd46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef D_A_OBJ_MASTER_SWORD_H
#define D_A_OBJ_MASTER_SWORD_H

#include "f_op/f_op_actor_mng.h"
#include "d/d_cc_d.h"

class daObjMasterSword_c;
typedef void (daObjMasterSword_c::*actionFunc)();

struct daObjMasterSword_Attr_c {
    f32 field_0x0;
};

/**
 * @ingroup actors-objects
 * @class daObjMasterSword_c
 * @brief Master Sword
 *
 * @details
 *
*/

class daObjMasterSword_c : public fopAc_ac_c {
public:
    enum Mode_e {
        MODE_0_e,
    };

    void initWait();
    void executeWait();
    static int createHeapCallBack(fopAc_ac_c* i_this);
    int CreateHeap();
    int create();
    inline void create_init();
    ~daObjMasterSword_c();
    int draw();

    inline void initCollision();
    inline void setCollision();
    inline void initBaseMtx();
    inline void setAction(Mode_e i_mode);
    inline void callInit();
    inline void callExecute();
    inline int execute();

    f32 attr() const { return mAttr.field_0x0; }

    u8 getEventID() { return (fopAcM_GetParam(this) >> 0x10) & 0xFF; }
    u16 getFlagNo() { return fopAcM_GetParam(this) & 0xFFFF; }

    static daObjMasterSword_Attr_c const mAttr;
    static actionFunc ActionTable[];

private:
    /* 0x568 */ J3DModel* mpModel;
    /* 0x56C */ request_of_phase_process_class mPhase;
    /* 0x574 */ mDoExt_btkAnm mBtk;
    /* 0x58C */ mDoExt_brkAnm mBrk;
    /* 0x5A4 */ dCcD_Stts mCcStts;
    /* 0x5E0 */ dCcD_Cyl mCyl;
    /* 0x71C */ actionFunc* mActionFunc;
    /* 0x720 */ Mode_e mMode;
    /* 0x724 */ u32 mShadowKey;
    /* 0x728 */ cBgS_PolyInfo field_0x728;
    /* 0x738 */ f32 field_0x738;
};

STATIC_ASSERT(sizeof(daObjMasterSword_c) == 0x73C);

#endif /* D_A_OBJ_MASTER_SWORD_H */