Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
fvb-data-parse.h
Go to the documentation of this file.
1#ifndef FVB_DATA_PARSE_H
2#define FVB_DATA_PARSE_H
3
5
6namespace JStudio {
7namespace fvb {
8namespace data {
9
10class TParse_TBlock : public TParseData_aligned<4> {
11public:
12 TParse_TBlock(const void* content) : TParseData_aligned<4>(content) {}
13
14 const TBlock* get() const { return (TBlock*)getRaw(); }
15
16 u32 get_size() const { return get()->size; }
17 const void* getNext() const {
18 u32 size = get_size();
19 return (const void*)((u8*)getRaw() + size);
20 }
21 u16 get_type() const { return get()->type; }
22 u16 get_IDSize() const { return get()->id_size; }
23 const void* getBlockEnd_() const { return (u8*)getRaw() + sizeof(TBlock); }
24 const void* get_ID() const {
25 const void* ret = 0;
26 if (get_IDSize())
27 ret = getBlockEnd_();
28 return ret;
29 }
30 const void* getContent() const {
31 u32 size = align_roundUp(get_IDSize(), 4);
32 return (const void*)((int)getBlockEnd_() + size);
33 }
34};
35
36class TParse_TParagraph : public TParseData_aligned<4> {
37public:
38 struct TData {
39 /* 0x04 */ u32 u32Size;
40 /* 0x08 */ u32 u32Type;
41 /* 0x0C */ const void* pContent;
42 /* 0x10 */ const void* next;
43 };
44 TParse_TParagraph(const void* content) : TParseData_aligned<4>(content) {}
45
46 /* 802850AC */ void getData(JStudio::fvb::data::TParse_TParagraph::TData*) const;
47};
48
49} // namespace data
50} // namespace fvb
51} // namespace JStudio
52
53#endif /* FVB_DATA_PARSE_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition fvb-data-parse.h:10
TParse_TBlock(const void *content)
Definition fvb-data-parse.h:12
const void * getContent() const
Definition fvb-data-parse.h:30
u16 get_type() const
Definition fvb-data-parse.h:21
u16 get_IDSize() const
Definition fvb-data-parse.h:22
const void * get_ID() const
Definition fvb-data-parse.h:24
const void * getBlockEnd_() const
Definition fvb-data-parse.h:23
const TBlock * get() const
Definition fvb-data-parse.h:14
const void * getNext() const
Definition fvb-data-parse.h:17
u32 get_size() const
Definition fvb-data-parse.h:16
Definition fvb-data-parse.h:36
void getData(JStudio::fvb::data::TParse_TParagraph::TData *) const
Definition fvb-data-parse.cpp:26
TParse_TParagraph(const void *content)
Definition fvb-data-parse.h:44
static u16 data[4]
Definition d_vibration.cpp:114
Definition functionvalue.cpp:318
TParseData_aligned(const void *pContent)
Definition binary.h:31
const void * getRaw() const
Definition binary.h:23
Definition fvb-data.h:31
u32 size
Definition fvb-data.h:32
u16 type
Definition fvb-data.h:33
u16 id_size
Definition fvb-data.h:34
Definition fvb-data-parse.h:38
const void * next
Definition fvb-data-parse.h:42
u32 u32Type
Definition fvb-data-parse.h:40
u32 u32Size
Definition fvb-data-parse.h:39
const void * pContent
Definition fvb-data-parse.h:41
unsigned long u32
Definition types.h:10
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8