Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
fvb-data.h
Go to the documentation of this file.
1#ifndef FVB_DATA_H
2#define FVB_DATA_H
3
6
7using namespace JGadget::binary;
8
9namespace JStudio {
10namespace fvb {
11namespace data {
12
13extern const char ga4cSignature[4];
14
15const int PARAGRAPH_DATA = 1;
16
17typedef enum TEComposite {
18 /* 0x0 */ COMPOSITE_NONE,
19 /* 0x1 */ COMPOSITE_RAW,
20 /* 0x2 */ COMPOSITE_IDX,
21 /* 0x3 */ COMPOSITE_PARAM,
22 /* 0x4 */ COMPOSITE_ADD,
23 /* 0x5 */ COMPOSITE_SUB,
24 /* 0x6 */ COMPOSITE_MUL,
25 /* 0x7 */ COMPOSITE_DIV,
27};
28
29typedef const void* (*CompositeOperation)(TFunctionValue_composite::TData);
30
31struct TBlock {
32 /* 0x0 */ u32 size;
33 /* 0x4 */ u16 type;
34 /* 0x6 */ u16 id_size;
35 /* 0x8 */ u8 id[0];
36};
37
38struct THeader {
39 /* 0x00 */ char signature[4];
40 /* 0x04 */ u16 byte_order; // must be 0xFEFF
41 /* 0x06 */ u16 version; // 0-1 = obselete, 2-7 = OK
42 /* 0x08 */ u32 _8;
43 /* 0x0C */ u32 block_number;
44 /* 0x10 */ u8 content[0];
45};
46// Parses a THeader
48public:
49 TParse_THeader(const void* p) : TParseData_aligned<4>(p) {}
50
51 const THeader* get() const { return (THeader*)getRaw(); }
52 const void* getContent() const { return ((THeader*)getRaw())->content; }
53 const char* get_signature() const { return get()->signature; }
54 u16 get_byteOrder() const { return get()->byte_order; }
55 u16 get_version() const { return get()->version; }
56 u32 get_blockNumber() const { return get()->block_number; }
57};
58
59} // namespace data
60} // namespace fvb
61} // namespace JStudio
62
63#endif /* FVB_DATA_H */
Definition fvb-data.h:47
u16 get_byteOrder() const
Definition fvb-data.h:54
const char * get_signature() const
Definition fvb-data.h:53
TParse_THeader(const void *p)
Definition fvb-data.h:49
const THeader * get() const
Definition fvb-data.h:51
u32 get_blockNumber() const
Definition fvb-data.h:56
const void * getContent() const
Definition fvb-data.h:52
u16 get_version() const
Definition fvb-data.h:55
static u16 data[4]
Definition d_vibration.cpp:114
p
Definition e_acos.c:98
Definition binary.h:7
const char ga4cSignature[4]
Definition fvb-data.cpp:3
const int PARAGRAPH_DATA
Definition fvb-data.h:15
TEComposite
Definition fvb-data.h:17
@ COMPOSITE_RAW
Definition fvb-data.h:19
@ COMPOSITE_SUB
Definition fvb-data.h:23
@ COMPOSITE_MUL
Definition fvb-data.h:24
@ COMPOSITE_IDX
Definition fvb-data.h:20
@ COMPOSITE_NONE
Definition fvb-data.h:18
@ COMPOSITE_ENUM_SIZE
Definition fvb-data.h:26
@ COMPOSITE_PARAM
Definition fvb-data.h:21
@ COMPOSITE_ADD
Definition fvb-data.h:22
@ COMPOSITE_DIV
Definition fvb-data.h:25
Definition functionvalue.cpp:318
const void * getRaw() const
Definition binary.h:23
Definition functionvalue.h:174
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.h:38
u16 byte_order
Definition fvb-data.h:40
u8 content[0]
Definition fvb-data.h:44
u32 _8
Definition fvb-data.h:42
u32 block_number
Definition fvb-data.h:43
char signature[4]
Definition fvb-data.h:39
u16 version
Definition fvb-data.h:41
unsigned long u32
Definition types.h:10
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8