summaryrefslogtreecommitdiff
path: root/include/d/actor/d_a_npc_sola.h
blob: 0b13842f9c5558b08b570730f8db33ee7abea832 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#ifndef D_A_NPC_SOLA_H
#define D_A_NPC_SOLA_H

#include "d/actor/d_a_npc.h"

struct daNpc_solA_HIOParam {
    /* 0x00 */ daNpcT_HIOParam common;
};

class daNpc_solA_Param_c {
public:
    virtual ~daNpc_solA_Param_c() {}

    static daNpc_solA_HIOParam const m;
};

#if DEBUG
class daNpc_solA_HIO_c : public mDoHIO_entry_c {
public:
    daNpc_solA_HIO_c();

    void listenPropertyEvent(const JORPropertyEvent*);

    void genMessage(JORMContext*);

    daNpc_solA_HIOParam m;
};

#define NPC_SOLA_HIO_CLASS daNpc_solA_HIO_c
#else
#define NPC_SOLA_HIO_CLASS daNpc_solA_Param_c
#endif

/**
 * @ingroup actors-npcs
 * @class daNpc_solA_c
 * @brief  Soldier A (Castle Town?)
 *
 * @details
 *
 */
class daNpc_solA_c : public daNpcT_c {
public:
    typedef int (daNpc_solA_c::*cutFunc)(int);
    typedef int (daNpc_solA_c::*actionFunc)(void*);

    enum Joint {
        /* 0x00 */ JNT_CENTER,
        /* 0x01 */ JNT_BACKBONE1,
        /* 0x02 */ JNT_BACKBONE2,
        /* 0x03 */ JNT_NECK,
        /* 0x04 */ JNT_HEAD,
        /* 0x05 */ JNT_SHOULDERL,
        /* 0x06 */ JNT_ARM1L,
        /* 0x07 */ JNT_ARM2L,
        /* 0x08 */ JNT_HANDL,
        /* 0x09 */ JNT_FINGERL,
        /* 0x0A */ JNT_THUMBL,
        /* 0x0B */ JNT_SHOULDERR,
        /* 0x0C */ JNT_ARM1R,
        /* 0x0D */ JNT_ARM2R,
        /* 0x0E */ JNT_HANDR,
        /* 0x0F */ JNT_FINGERR,
        /* 0x10 */ JNT_THUMBR,
        /* 0x11 */ JNT_WAIST,
        /* 0x12 */ JNT_LEG1L,
        /* 0x13 */ JNT_LEG2L,
        /* 0x14 */ JNT_FOOTL,
        /* 0x15 */ JNT_LEG1R,
        /* 0x16 */ JNT_LEG2R,
        /* 0x17 */ JNT_FOOTR,
        /* 0x18 */ JNT_SAYA,
    };

    ~daNpc_solA_c();
    int create();
    int CreateHeap();
    int Delete();
    int Execute();
    int Draw();
    static BOOL createHeapCallBack(fopAc_ac_c*);
    static BOOL ctrlJointCallBack(J3DJoint*, int);
    bool getType();
    int getFlowNodeNo();
    int isDelete();
    void reset();
    void setParam();
    void setAfterTalkMotion();
    void srchActors();
    BOOL evtTalk();
    BOOL evtCutProc();
    void action();
    void beforeMove();
    void setAttnPos();
    void setCollision();
    int drawDbgInfo();
    void drawOtherMdl();
    int selectAction();
    int chkAction(int (daNpc_solA_c::*)(void*));
    int setAction(int (daNpc_solA_c::*)(void*));
    int wait(void*);
    int talk(void*);
    daNpc_solA_c(daNpcT_faceMotionAnmData_c const* param_1,
                                daNpcT_motionAnmData_c const* param_2,
                                daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3,
                                int param_4,
                                daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5,
                                int param_6, daNpcT_evtData_c const* param_7, char** param_8)
        : daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) {}
    s32 getHeadJointNo() { return JNT_HEAD; }
    s32 getNeckJointNo() { return JNT_NECK; }
    s32 getBackboneJointNo() { return JNT_BACKBONE1; }

    static char* mCutNameList[1];
    static cutFunc mCutList[1];

private:
    /* 0xE40 */ NPC_SOLA_HIO_CLASS* mpHIO;
    /* 0xE44 */ dCcD_Cyl mCyl;
    /* 0xF80 */ u8 field_0xf80;
    /* 0xF84 */ actionFunc mNextAction;
    /* 0xF90 */ actionFunc mAction;
    /* 0xF9c */ u8 field_0xf9c;
};

STATIC_ASSERT(sizeof(daNpc_solA_c) == 0xfa0);

#endif /* D_A_NPC_SOLA_H */