Files
dusklight/include/JSystem/JStudio/JStudio/fvb-data.h
T
TakaRikka f8979749e3 j2d / map_path work, d_drawlist / d_attention cleanup (#208)
* work on fop actor / actor mng, daalink, d_a_obj_item

* d_a_title mostly decompiled

* daalink / d_event / JMessage / dmsg_out_font work

* msg_scrn_base / msg_scrn_boss

* some work on mDo machine, d_menu_save, d_tresure, and various

* remove asm

* progress

* finish d_menu_save / d_pane_class_alpha / d_pane_class / rename some data

* rename more data

* remove asm / progress

* match all of d_pane_class

* fixes / some dKankyo doc

* bunch of j2d work. d_drawlist / d_attention cleanup

* progress / asm

* cleanup wip

* decompile JStage

* setup some more JStudio structs

* set up d_demo classes

* some d_demo work

* cleanup dolphin os stuff

* some initial dEvent documentation

* some At collision documentation

* match JUTConsole::doDraw

* dbgs work / split up some of d_a_alink into .inc files

* d_a_alink_spinner work
2022-08-30 15:22:17 -06:00

64 lines
1.6 KiB
C++

#ifndef FVB_DATA_H
#define FVB_DATA_H
#include "JSystem/JGadget/binary.h"
#include "JSystem/JStudio/JStudio/functionvalue.h"
using namespace JGadget::binary;
namespace JStudio {
namespace fvb {
namespace data {
extern const char ga4cSignature[4];
const int PARAGRAPH_DATA = 1;
typedef enum TEComposite {
/* 0x0 */ COMPOSITE_NONE,
/* 0x1 */ COMPOSITE_RAW,
/* 0x2 */ COMPOSITE_IDX,
/* 0x3 */ COMPOSITE_PARAM,
/* 0x4 */ COMPOSITE_ADD,
/* 0x5 */ COMPOSITE_SUB,
/* 0x6 */ COMPOSITE_MUL,
/* 0x7 */ COMPOSITE_DIV,
/* 0x8 */ COMPOSITE_ENUM_SIZE,
};
typedef const void* (*CompositeOperation)(TFunctionValue_composite::TData);
struct TBlock {
/* 0x0 */ u32 size;
/* 0x4 */ u16 type;
/* 0x6 */ u16 id_size;
/* 0x8 */ u8 id[0];
};
struct THeader {
/* 0x00 */ char signature[4];
/* 0x04 */ u16 byte_order; // must be 0xFEFF
/* 0x06 */ u16 version; // 0-1 = obselete, 2-7 = OK
/* 0x08 */ u32 _8;
/* 0x0C */ u32 block_number;
/* 0x10 */ u8 content[0];
};
// Parses a THeader
class TParse_THeader : public TParseData_aligned<4> {
public:
TParse_THeader(const void* p) : TParseData_aligned<4>(p) {}
const THeader* get() const { return (THeader*)getRaw(); }
const void* getContent() const { return ((THeader*)getRaw())->content; }
const char* get_signature() const { return get()->signature; }
u16 get_byteOrder() const { return get()->byte_order; }
u16 get_version() const { return get()->version; }
u32 get_blockNumber() const { return get()->block_number; }
};
} // namespace data
} // namespace fvb
} // namespace JStudio
#endif /* FVB_DATA_H */