mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Refactor surrounding MxDSChunk utility functions (#1313)
This commit is contained in:
@@ -35,10 +35,12 @@ public:
|
||||
}
|
||||
|
||||
static MxU32 GetHeaderSize();
|
||||
static MxU32* IntoType(MxU8* p_buffer) { return (MxU32*) p_buffer; }
|
||||
static MxU32* IntoLength(MxU8* p_buffer) { return (MxU32*) (p_buffer + 4); }
|
||||
static MxU32 Size(MxU32 p_dataSize) { return (p_dataSize & 1) + p_dataSize + 8; }
|
||||
static MxU8* End(MxU8* p_buffer) { return p_buffer + Size(*IntoLength(p_buffer)); }
|
||||
|
||||
// FUNCTION: BETA10 0x101641f0
|
||||
static MxU32 Size(MxU8* p_buffer) { return (*(MxU32*) (p_buffer + 4) & 1) + *(MxU32*) (p_buffer + 4) + 8; }
|
||||
|
||||
// FUNCTION: BETA10 0x10164220
|
||||
static MxU8* End(MxU8* p_buffer) { return p_buffer + Size(p_buffer); }
|
||||
|
||||
void SetChunkFlags(MxU16 p_flags) { m_flags = p_flags; }
|
||||
void SetObjectId(undefined4 p_objectid) { m_objectId = p_objectid; }
|
||||
|
||||
Reference in New Issue
Block a user