Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_tresure.h
Go to the documentation of this file.
1#ifndef D_D_TRESURE_H
2#define D_D_TRESURE_H
3
4#include "dolphin/mtx/vec.h"
5
6class dTres_c {
7public:
8 struct data_s {
9 /* 0x00 */ u8 mNo;
10 /* 0x01 */ s8 mRoomNo;
11 /* 0x02 */ u8 mStatus;
12 /* 0x03 */ u8 mArg1;
13 /* 0x04 */ Vec mPos;
14 /* 0x10 */ u8 mSwBit;
15 /* 0x11 */ u8 mType;
16 /* 0x12 */ u8 mArg2;
17 /* 0x13 */ s8 mAngleY;
18 };
19
20 class typeGroupData_c : public data_s {
21 public:
22 data_s* getDataPointer() { return (data_s*)this; }
23 const data_s* getConstDataPointer() const { return (data_s*)this; }
27 u8 getNo() const { return mNo; }
28 u8 getStatus() const { return mStatus; }
30 void setRoomNo(s8 roomNo) { mRoomNo = roomNo; }
31 s8 getRoomNo() const { return mRoomNo; }
32 void setPos(const Vec& pos) { mPos = pos; }
33 u8 getSwBit() const { return mSwBit; }
34 const Vec* getPos() const { return &mPos; }
35 int getAngleY() const { return mAngleY; }
36
38 /* 0x18 */ u8 mTypeGroupNo;
39 }; // Size: 0x1C
40
41 struct list_class {
42 /* 0x0 */ int field_0x0;
44 /* 0x8 */ u8 mNumber;
45 };
46
50 /* 0x8 */ u8 mNumber;
51 };
52
53 /* 8009BBD8 */ static int createWork();
54 /* 8009BC18 */ static void create();
55 /* 8009BC60 */ static void remove();
56 /* 8009BC6C */ static void reset();
57 /* 8009BCB4 */ static void addData(dTres_c::list_class*, s8);
58 /* 8009BE28 */ static void checkTreasureBox(dTres_c::data_s*);
59 /* 8009C168 */ static void onStatus(u8, int, int);
60 /* 8009C1F0 */ static void offStatus(u8, int, int);
61 /* 8009C27C */ static int getBossIconFloorNo(int*);
62 /* 8009C360 */ static typeGroupData_c* getFirstData(u8);
64 /* 8009C3B4 */ static typeGroupData_c* getNextData(dTres_c::typeGroupData_c const*);
65 /* 8009C3CC */ static void setPosition(int, u8, Vec const*, int);
66 /* 8009C49C */ static int getTypeGroupNoToType(u8);
67 /* 8009C4B0 */ static u8 getTypeToTypeGroupNo(u8);
68
69 static int getTypeGroupNumber(int index) {
70 return mTypeGroupListAll[index].mNumber;
71 }
72
73 static void setPosition(int i_tboxNo, Vec const* i_pos) {
74 setPosition(i_tboxNo, 0, i_pos, -1);
75 }
76
77 static void setLightDropPostion(int i_tboxNo, const Vec* i_pos) {
78 setPosition(i_tboxNo, 4, i_pos, -1);
79 }
80
81 static u8 const typeToTypeGroup[17][2];
84 static u16 mNum;
85};
86
87#endif /* D_D_TRESURE_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
static u8 pos[12]
Definition d_a_obj_kago.cpp:839
static u16 data[4]
Definition d_vibration.cpp:114
static s32 status
Definition fstload.c:6
Definition d_a_hozelda.cpp:18
Definition d_menu_dmap_map.cpp:18
u8 mArg1
Definition d_tresure.h:12
s8 mAngleY
Definition d_tresure.h:17
u8 mType
Definition d_tresure.h:15
u8 mStatus
Definition d_tresure.h:11
u8 mNo
Definition d_tresure.h:9
Vec mPos
Definition d_tresure.h:13
u8 mArg2
Definition d_tresure.h:16
u8 mSwBit
Definition d_tresure.h:14
s8 mRoomNo
Definition d_tresure.h:10
Definition d_tresure.h:41
int field_0x0
Definition d_tresure.h:42
typeGroupData_c * field_0x4
Definition d_tresure.h:43
u8 mNumber
Definition d_tresure.h:44
Definition d_menu_dmap_map.cpp:20
const Vec * getPos() const
Definition d_tresure.h:34
u8 getSwBit() const
Definition d_tresure.h:33
void setPos(const Vec &pos)
Definition d_tresure.h:32
s8 getRoomNo() const
Definition d_tresure.h:31
void setNextDataPointer(typeGroupData_c *data)
Definition d_tresure.h:25
u8 getStatus() const
Definition d_tresure.h:28
data_s * getDataPointer()
Definition d_tresure.h:22
void setRoomNo(s8 roomNo)
Definition d_tresure.h:30
void setStatus(u8 status)
Definition d_tresure.h:29
typeGroupData_c * mNextData
Definition d_tresure.h:37
typeGroupData_c * getNextDataPointer() const
Definition d_tresure.h:24
u8 mTypeGroupNo
Definition d_tresure.h:38
const data_s * getConstDataPointer() const
Definition d_tresure.h:23
u8 getNo() const
Definition d_tresure.h:27
void setTypeGroupNo(u8 no)
Definition d_tresure.h:26
int getAngleY() const
Definition d_tresure.h:35
Definition d_tresure.h:47
typeGroupData_c * field_0x0
Definition d_tresure.h:48
typeGroupData_c * field_0x4
Definition d_tresure.h:49
u8 mNumber
Definition d_tresure.h:50
Definition d_menu_dmap_map.cpp:17
static u16 mNum
Definition d_tresure.h:84
static int createWork()
Definition d_tresure.cpp:27
static void onStatus(u8, int, int)
Definition d_tresure.cpp:155
static void setPosition(int, u8, Vec const *, int)
Definition d_tresure.cpp:247
static u8 getTypeToTypeGroupNo(u8)
static u8 const typeToTypeGroup[17][2]
Definition d_tresure.h:270
static typeGroupData_c * getFirstData(u8)
static int getTypeGroupNumber(int index)
Definition d_tresure.h:69
static void addData(dTres_c::list_class *, s8)
Definition d_tresure.cpp:67
static void remove()
Definition d_tresure.cpp:40
static typeGroupData_c * getNextData(dTres_c::typeGroupData_c *)
static void setPosition(int i_tboxNo, Vec const *i_pos)
Definition d_tresure.h:73
static void checkTreasureBox(dTres_c::data_s *)
Definition d_tresure.cpp:108
static void reset()
Definition d_tresure.cpp:52
static void offStatus(u8, int, int)
Definition d_tresure.cpp:171
static u8 mTypeGroupListAll[204+4]
Definition d_menu_dmap_map.cpp:26
static void setLightDropPostion(int i_tboxNo, const Vec *i_pos)
Definition d_tresure.h:77
static int getBossIconFloorNo(int *)
Definition d_tresure.cpp:187
void getNextData(dTres_c::typeGroupData_c *)
Definition d_tresure.cpp:227
static void create()
Definition d_tresure.cpp:33
static int getTypeGroupNoToType(u8)
Definition d_tresure.cpp:278
static typeGroupData_c * mTypeGroupData
Definition d_tresure.h:83
signed char s8
Definition types.h:4
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8