Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_bg_pc.h
Go to the documentation of this file.
1#ifndef D_BG_D_BG_PC_H
2#define D_BG_D_BG_PC_H
3
4#include "dolphin/types.h"
5
6struct sBgPc {
7 /* 0x00 */ u32 code0;
8 /* 0x04 */ u32 code1;
9 /* 0x08 */ u32 code2;
10 /* 0x0C */ u32 code3;
11 /* 0x10 */ u32 code4;
12}; // Size: 0x14
13
15 /* 0x00004000 */ CODE_OBJ_THRU = 0x4000,
16 /* 0x00008000 */ CODE_CAM_THRU = 0x8000,
17 /* 0x00010000 */ CODE_LINK_THRU = 0x10000,
18 /* 0x00020000 */ CODE_ARROW_THRU = 0x20000,
19 /* 0x00040000 */ CODE_HS_STICK = 0x40000,
20 /* 0x00080000 */ CODE_BOOMERANG_THRU = 0x80000,
21 /* 0x00100000 */ CODE_ROPE_THRU = 0x100000,
22 /* 0x00200000 */ CODE_HORSE_NO_ENTRY = 0x200000,
23 /* 0x00400000 */ CODE_SHDW_THRU = 0x400000,
24 /* 0x00800000 */ CODE_BOMB_THRU = 0x800000,
25 /* 0x01000000 */ CODE_IRON_BALL_THRU = 0x1000000,
26 /* 0x02000000 */ CODE_ATTACK_THRU = 0x2000000,
27 /* 0x40000000 */ CODE_UNDERWATER_ROOF = 0x40000000,
28};
29
30class dBgPc {
31public:
32 void setCode(sBgPc&);
33
34 u32 getHorseNoEntry() const { return m_code.code0 >> 0x15 & 1; }
35 s32 getSpl() const { return m_code.code0 >> 0x18 & 0xF; }
36 u32 getMagnet() const { return m_code.code0 >> 0x1C & 0x3; }
37 u32 getMonkeyBars() const { return m_code.code0 >> 0x1F; }
38 s32 getWallCode() const { return m_code.code1 >> 0x8 & 0xF; }
39 u32 getAtt0Code() const { return m_code.code1 >> 0xC & 0xF; }
40 u32 getAtt1Code() const { return m_code.code1 >> 0x10 & 0x7; }
41 u32 getGroundCode() const { return m_code.code1 >> 0x13 & 0x1F; }
46 u32 getHSStick() const { return m_code.code0 & CODE_HS_STICK; }
54 u8 getRoom() const { return m_code.code4 >> 0x14; }
55 u8 getExit() const { return m_code.code0 & 0x3F; }
56 u8 getPolyCol() const { return m_code.code0 >> 6; }
57 u8 getLinkNo() const { return m_code.code1; }
58 u8 getCamMoveBG() const { return m_code.code2; }
59 u8 getRoomCam() const { return m_code.code2 >> 8; }
60 u8 getRoomPath() const { return m_code.code2 >> 0x10; }
61 u8 getRoomPathPnt() const { return m_code.code2 >> 0x18; }
62 u8 getRoomInf() const { return m_code.code4; }
63 u8 getSnd() const { return m_code.code4 >> 0xB; }
64 u32 maskNrm() { return m_code.code4 & 0x100; }
65
66 // BUG: Seems like this uses the same mask as maskNrm
67 u32 getWtr() { return m_code.code4 & 0x100; }
68 u32 getObjThrough() { return m_code.code0 & 0x4000; }
69 u32 getCamThrough() { return m_code.code0 & 0x8000; }
70 u32 getLinkThrough() { return m_code.code0 & 0x10000; }
71
72 /* 0x0 */ sBgPc m_code;
73};
74
75#endif /* D_BG_D_BG_PC_H */
Definition d_bg_pc.h:30
void setCode(sBgPc &)
Definition d_bg_pc.cpp:8
u8 getSnd() const
Definition d_bg_pc.h:63
u32 getAttackThrough() const
Definition d_bg_pc.h:53
u32 getBoomerangThrough() const
Definition d_bg_pc.h:47
u32 getAtt1Code() const
Definition d_bg_pc.h:40
u8 getRoomInf() const
Definition d_bg_pc.h:62
u32 getObjThrough()
Definition d_bg_pc.h:68
u32 getGroundCode() const
Definition d_bg_pc.h:41
u32 getHSStick() const
Definition d_bg_pc.h:46
u32 getCamThrough() const
Definition d_bg_pc.h:43
u32 getMonkeyBars() const
Definition d_bg_pc.h:37
u8 getExit() const
Definition d_bg_pc.h:55
s32 getSpl() const
Definition d_bg_pc.h:35
u32 getShdwThrough() const
Definition d_bg_pc.h:51
u8 getLinkNo() const
Definition d_bg_pc.h:57
u32 getAtt0Code() const
Definition d_bg_pc.h:39
u32 getBombThrough() const
Definition d_bg_pc.h:49
u32 getIronBallThrough() const
Definition d_bg_pc.h:50
u8 getRoomPath() const
Definition d_bg_pc.h:60
s32 getWallCode() const
Definition d_bg_pc.h:38
u8 getRoom() const
Definition d_bg_pc.h:54
u32 getUnderwaterRoof() const
Definition d_bg_pc.h:52
u32 getCamThrough()
Definition d_bg_pc.h:69
u8 getRoomPathPnt() const
Definition d_bg_pc.h:61
u8 getCamMoveBG() const
Definition d_bg_pc.h:58
u32 getMagnet() const
Definition d_bg_pc.h:36
u32 getRopeThrough() const
Definition d_bg_pc.h:48
u32 getLinkThrough() const
Definition d_bg_pc.h:44
u32 getHorseNoEntry() const
Definition d_bg_pc.h:34
u8 getPolyCol() const
Definition d_bg_pc.h:56
u32 getArrowThrough() const
Definition d_bg_pc.h:45
u32 maskNrm()
Definition d_bg_pc.h:64
sBgPc m_code
Definition d_bg_pc.h:72
u32 getWtr()
Definition d_bg_pc.h:67
u32 getObjThrough() const
Definition d_bg_pc.h:42
u8 getRoomCam() const
Definition d_bg_pc.h:59
u32 getLinkThrough()
Definition d_bg_pc.h:70
dBgPc_ECode
Definition d_bg_pc.h:14
@ CODE_ARROW_THRU
Definition d_bg_pc.h:18
@ CODE_ROPE_THRU
Definition d_bg_pc.h:21
@ CODE_IRON_BALL_THRU
Definition d_bg_pc.h:25
@ CODE_BOMB_THRU
Definition d_bg_pc.h:24
@ CODE_HS_STICK
Definition d_bg_pc.h:19
@ CODE_SHDW_THRU
Definition d_bg_pc.h:23
@ CODE_CAM_THRU
Definition d_bg_pc.h:16
@ CODE_ATTACK_THRU
Definition d_bg_pc.h:26
@ CODE_HORSE_NO_ENTRY
Definition d_bg_pc.h:22
@ CODE_UNDERWATER_ROOF
Definition d_bg_pc.h:27
@ CODE_OBJ_THRU
Definition d_bg_pc.h:15
@ CODE_LINK_THRU
Definition d_bg_pc.h:17
@ CODE_BOOMERANG_THRU
Definition d_bg_pc.h:20
Definition d_bg_pc.h:6
u32 code2
Definition d_bg_pc.h:9
u32 code0
Definition d_bg_pc.h:7
u32 code4
Definition d_bg_pc.h:11
u32 code1
Definition d_bg_pc.h:8
u32 code3
Definition d_bg_pc.h:10
unsigned long u32
Definition types.h:10
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8