summaryrefslogtreecommitdiff
path: root/include/SSystem/SComponent/c_bg_s.h
blob: 63aa41390df50941092bd59ab2173274c98fbe77 (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
#ifndef C_BG_S_H
#define C_BG_S_H

#include "SSystem/SComponent/c_bg_s_poly_info.h"
#include "SSystem/SComponent/c_m3d.h"
#include "dolphin/types.h"

class fopAc_ac_c;
class cBgS_ShdwDraw;
class cBgS_LinChk;
class cBgS_GndChk;
class cM3dGPla;
class cXyz;

class cBgS_ChkElm {
public:
    /* 0x00 */ cBgW* m_bgw_base_ptr;
    /* 0x04 */ u32 m_flags;
    /* 0x08 */ u32 m_actor_id;
    /* 0x0C */ fopAc_ac_c* m_actor_ptr;
    /* 0x10 vtable */

public:
    cBgS_ChkElm() { Init(); }
    void Init();
    void Release();

    virtual ~cBgS_ChkElm() {}
    virtual void Regist2(cBgW*, fpc_ProcID, void*);

    bool ChkUsed() const { return (m_flags & 1); }
};  // Size: 0x14

STATIC_ASSERT(sizeof(cBgS_ChkElm) == 0x14);

class cBgW;
class cBgS {
public:
    /* 0x0000 */ cBgS_ChkElm m_chk_element[256];
    /* 0x1400 vtable */

public:
    cBgS() {}

    cM3dGPla* GetTriPla(cBgS_PolyInfo& polyInfo) const {
        return GetTriPla(polyInfo.GetBgIndex(), polyInfo.GetPolyIndex());
    }
    s32 GetTriGrp(cBgS_PolyInfo& polyInfo) const {
        return GetTriGrp(polyInfo.GetBgIndex(), polyInfo.GetPolyIndex());
    }
    fopAc_ac_c* GetActorPointer(cBgS_PolyInfo& i_poly) const {
        return GetActorPointer(i_poly.GetBgIndex());
    }

    bool Regist(cBgW*, fpc_ProcID, void*);
    bool Release(cBgW*);
    bool LineCross(cBgS_LinChk*);
    f32 GroundCross(cBgS_GndChk*);
    static void* ConvDzb(void*);
    fopAc_ac_c* GetActorPointer(int) const;
    cBgW* GetBgWPointer(cBgS_PolyInfo&) const;
    bool ChkPolySafe(cBgS_PolyInfo&);
    s32 GetTriGrp(int, int) const;
    s32 GetGrpToRoomId(int, int) const;
    cM3dGPla* GetTriPla(int, int) const;
    void GetTriPnt(cBgS_PolyInfo&, cXyz*, cXyz*, cXyz*) const;
    void ShdwDraw(cBgS_ShdwDraw*);
    s32 GetGrpInf(cBgS_PolyInfo&, int) const;

    virtual ~cBgS() {}
    virtual void Ct();
    virtual void Dt();
    virtual void Move();
};  // Size: 0x1404

#endif /* C_BG_S_H */