mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 13:08:33 -04:00
cleanup d_meter2_info / little JMessage work (#2460)
* d_meter2_info cleanup * parseBlock_next matching
This commit is contained in:
@@ -24,6 +24,11 @@ struct data {
|
||||
|
||||
struct TParse_TBlock : public JGadget::binary::TParseData_aligned<4> {
|
||||
TParse_TBlock(const void* data) : TParseData_aligned(data) {}
|
||||
|
||||
const char* get() const { return (char*)getRaw(); }
|
||||
u32 get_size() const { return *(u32*)(get() + 0x4); }
|
||||
const void* getNext() const { return (char*)getRaw() + get_size(); }
|
||||
u32 get_type() const { return *(u32*)(get() + 0x0); }
|
||||
};
|
||||
|
||||
struct TParse_TBlock_info : public TParse_TBlock {
|
||||
@@ -55,6 +60,18 @@ struct data {
|
||||
TParse_TBlock_color(const void* data) : TParse_TBlock(data) {}
|
||||
};
|
||||
|
||||
struct TParse_TBlock_messageText : public TParse_TBlock {
|
||||
TParse_TBlock_messageText(const void* data) : TParse_TBlock(data) {}
|
||||
|
||||
char* getContent() const { return (char*)getRaw() + 0x8; }
|
||||
};
|
||||
|
||||
struct TParse_TBlock_stringAttribute : public TParse_TBlock {
|
||||
TParse_TBlock_stringAttribute(const void* data) : TParse_TBlock(data) {}
|
||||
|
||||
char* getContent() const { return (char*)getRaw() + 0x8; }
|
||||
};
|
||||
|
||||
static u32 getTagCode(u32 tag) { return tag & 0xFFFF; }
|
||||
static u32 getTagGroup(u32 tag) { return (tag >> 0x10) & 0xFF; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user