summaryrefslogtreecommitdiff
path: root/include/d/actor/d_a_obj_mirror_sand.h
blob: db27ccfaeb8d8aba49b15a4563367da783fb2f8f (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
#ifndef D_A_OBJ_MIRROR_SAND_H
#define D_A_OBJ_MIRROR_SAND_H

#include "d/d_com_inf_game.h"
#include "d/d_bg_w.h"

/**
 * @ingroup actors-objects
 * @class daObjMirrorSand_c
 * @brief Twilight Mirror Sand
 *
 * @details
 *
 */
class daObjMirrorSand_c : public fopAc_ac_c {
public:
    void initBaseMtx();
    void setBaseMtx();

    inline ~daObjMirrorSand_c();

    inline int createHeap();
    inline int create();
    inline int execute();
    inline int draw();

    inline void create_init();

    u8 getSwitchNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
    void setAnmSpeed(f32 speed) { mpBck->setPlaySpeed(speed); }

    bool isSwitch() {
        return fopAcM_isSwitch(this, getSwitchNo()) ||
               /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */
               dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) ||
               /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */
               dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]);
    }

private:
    /* 0x568 */ J3DModel* mpModel;
    /* 0x56C */ mDoExt_bckAnm* mpBck;
    /* 0x570 */ request_of_phase_process_class mPhase;
    /* 0x578 */ dBgW* mpCurrentBgw;
    /* 0x57C */ dBgW mBgw[2];
    /* 0x6FC */ Mtx mBgMtx;
};

STATIC_ASSERT(sizeof(daObjMirrorSand_c) == 0x72C);

#endif /* D_A_OBJ_MIRROR_SAND_H */