summaryrefslogtreecommitdiff
path: root/include/d/a/obj/d_a_obj_windmill.h
blob: a5c92955d7f712a0621d38b897303b1c35139888 (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
#ifndef D_A_OBJ_WINDMILL_H
#define D_A_OBJ_WINDMILL_H

#include "d/a/d_a_base.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/a/obj/d_a_obj_pinwheel.h"
#include "d/col/bg/d_bg_w.h"
#include "m/m3d/m_anmchr.h"
#include "m/m3d/m_anmmatclr.h"
#include "m/m3d/m_smdl.h"
#include "m/m_angle.h"
#include "m/m_vec.h"
#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
#include "toBeSorted/stage_render_stuff.h"

class dAcOwindmill_c : public dAcObjBase_c {
public:
    dAcOwindmill_c() : mStateMgr(*this), mCallback(this) {}
    virtual ~dAcOwindmill_c() {}

    virtual bool createHeap() override;
    virtual int create() override;
    virtual int doDelete() override;
    virtual int actorExecute() override;
    virtual int draw() override;

    STATE_FUNC_DECLARE(dAcOwindmill_c, Wait);
    STATE_FUNC_DECLARE(dAcOwindmill_c, CameraMove);
    STATE_FUNC_DECLARE(dAcOwindmill_c, Move);
    STATE_FUNC_DECLARE(dAcOwindmill_c, Collect);
    STATE_FUNC_DECLARE(dAcOwindmill_c, CollectStick);

private:
    bool isWindmillRepaired();
    bool isLightTowerRaised2();
    void attachPinwheel();

    /* 0x330 */ nw4r::g3d::ResFile mResFile;
    /* 0x334 */ m3d::smdl_c mMdl;
    /* 0x330 */ m3d::anmChr_c mAnmChr;
    /* 0x350 */ m3d::anmMatClr_c mAnmClr;
    /* 0x388 */ dBgW mBgW;
    /* 0x5C4 */ STATE_MGR_DECLARE(dAcOwindmill_c);
    /* 0x600 */ dScnCallback_c mCallback;
    /* 0x60C */ dAcRef_c<dAcOpinwheel_c> mPinwheel;
    /* 0x618 */ mVec3_c mWindmillPosition;
    /* 0x624 */ mAng mWindmillRotation;
    /* 0x626 */ s16 mTimer1;
    /* 0x628 */ s16 mTimer2;
    /* 0x62A */ s16 mTimer3;
    /* 0x62C */ u8 mSceneFlagInPlace;
    /* 0x62D */ u8 mSceneFlagBeingBlown;
    /* 0x62E */ u8 mCurrentStuckPos;
    /* 0x62F */ u8 mSetRotation;
    /* 0x630 */ f32 field_0x630;
    /* 0x634 */ f32 field_0x634;
    /* 0x638 */ bool mHasPropellor;
    /* 0x639 */ bool mHasPinwheel;
    /* 0x63A */ bool field_0x63A;

    static const s16 sStateTimer1_0x50;
    static const f32 sTargetHalf;
    static const f32 sTargetOne;
    static const s16 sStateTimer1_0xC;
    static const s16 sStateTimer1_0x32;
    static const s16 sStateTimer2_0xF;
    static const s16 s0xF_unused;

    static s32 sRotationIncrement1;
    static s32 sRotationIncrement2;
    static s32 sRotationIncrement3;
};

#endif