Refactor surrounding MxDSChunk utility functions (#1313)

This commit is contained in:
MS
2025-01-06 15:20:47 -05:00
committed by GitHub
parent 7c452e9453
commit 93815ca545
7 changed files with 127 additions and 111 deletions

View File

@@ -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; }