summaryrefslogtreecommitdiff
path: root/include/d/actor/d_a_obj_mie.h
blob: 0f1df429be69bf9d5d82999fce198901901b45d9 (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
129
130
131
132
133
134
135
136
137
138
#ifndef D_A_OBJ_MIE_H
#define D_A_OBJ_MIE_H

#include "SSystem/SComponent/c_math.h"
#include "d/d_bg_s_acch.h"
#include "d/d_cc_d.h"
#include "f_op/f_op_actor_mng.h"

struct daObj_Mie_HIOParam {
    /* 0x00 */ f32 focus_offset;
    /* 0x04 */ f32 gravity;
    /* 0x08 */ f32 scale;
    /* 0x0C */ f32 real_shadow_size;
    /* 0x10 */ f32 weight;
    /* 0x14 */ f32 height;
    /* 0x18 */ f32 knee_length;
    /* 0x1C */ f32 width;
    /* 0x20 */ f32 firing_rate;
    /* 0x24 */ f32 launch_angle;
    /* 0x28 */ f32 floating_offset;
};

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

    static const daObj_Mie_HIOParam m;
};

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

    void listenPropertyEvent(const JORPropertyEvent*);

    void genMessage(JORMContext*);

    daObj_Mie_HIOParam m;
};

#define OBJ_MIE_HIO_CLASS daObj_Mie_HIO_c
#else
#define OBJ_MIE_HIO_CLASS daObj_Mie_Param_c
#endif

/**
 * @ingroup actors-objects
 * @class daObj_Mie_c
 * @brief Gengle (Cat)
 *
 * @details
 *
 */
class daObj_Mie_c : public fopAc_ac_c {
private:
    /* 0x568 */ OBJ_MIE_HIO_CLASS* mpHIO;
    /* 0x56C */ request_of_phase_process_class mPhase;
    /* 0x574 */ J3DModel* mModel;
    /* 0x578 */ dBgS_ObjAcch mAcch;
    /* 0x750 */ dCcD_Stts mStts;
    /* 0x78C */ dBgS_AcchCir mAcchCir;
    /* 0x7CC */ cBgS_GndChk mGndChk;
    /* 0x808 */ dCcD_Cyl mCyl;
    /* 0x944 */ cM3dGLin mLine;
    /* 0x960 */ dBgS_LinChk mLinChk;
    /* 0x9D0 */ u8 mType;
    /* 0x9D4 */ cXyz field_0x9d4;
    /* 0x9E0 */ cXyz field_0x9e0;
    /* 0x9EC */ csXyz field_0x9ec;
    /* 0x9F4 */ int field_0x9f4;
    /* 0x9F8 */ int field_0x9f8;
    /* 0x9FC */ f32 field_0x9fc;
    /* 0xA00 */ f32 field_0xa00;
    /* 0xA04 */ f32 field_0xa04;
    /* 0xA08 */ f32 field_0xa08;
    /* 0xA0C */ f32 field_0xa0c;
    /* 0xA10 */ s16 field_0xa10;
    /* 0xA12 */ s16 field_0xa12;
    /* 0xA14 */ s16 field_0xa14;
    /* 0xA16 */ s16 field_0xa16;
    /* 0xA18 */ s16 field_0xa18;
    /* 0xA18 */ int field_0xa1c;
    /* 0xA18 */ u32 field_0xa20[4];
    /* 0xA38 */ u32 field_0xa30;
    /* 0xA38 */ u32 field_0xa34;
    /* 0xA38 */ u32 field_0xa38;
    /* 0xA3C */ u32 field_0xa3c;
    /* 0xA40 */ u8 field_0xa40;
    /* 0xA41 */ u8 field_0xa41;
    /* 0xA42 */ u8 field_0xa42;
    /* 0xA43 */ u8 field_0xa43;
    /* 0xA44 */ u8 field_0xa44;
    /* 0xA45 */ u8 field_0xa45;
    /* 0xA46 */ u8 field_0xa46;
    /* 0xA47 */ u8 field_0xa47;
    /* 0xA48 */ int field_0xa48;
public:
    enum Type {
        TYPE_0,
    };

    virtual ~daObj_Mie_c();
    int create();
    int CreateHeap();
    int Delete();
    int Execute();
    int Draw();
    static int createHeapCallBack(fopAc_ac_c*);
    static void* srchPouyaa(void*, void*);
    void setEnvTevColor();
    void setRoomNo();
    void setMtx();
    s16 calcRollAngle(s16, int);
    int getWallAngle(s16, s16*);
    void setSmokePrtcl();
    void setWaterPrtcl();
    void setHamonPrtcl();

    u8 getType() { return TYPE_0; }
    void popup(f32 param_1, f32 param_2, cXyz* param_3) {
        if (param_3 != NULL) {
            current.pos = *param_3;
            home.pos = current.pos;
        }
        s16 sVar3 = cM_deg2s(param_2);
        speed.setall(0.0f);
        speed.y = param_1 * cM_ssin(sVar3);
        speedF = param_1 * cM_scos(sVar3);
        field_0xa14 = 0x4000;
        field_0xa44 = 1;
    }
};

STATIC_ASSERT(sizeof(daObj_Mie_c) == 0xa50);

#endif /* D_A_OBJ_MIE_H */