more MxDSBuffer functions (#255)

* FUN_100c6f80

* AllocateBuffer

* Update mxdsbuffer.h

* Update mxdsbuffer.cpp

* Update mxdsbuffer.cpp

* Return reference

* Fix delete call

* Fix GetWriteOffset

* Remove cast

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2023-10-30 09:54:00 -04:00
committed by GitHub
parent 787d932825
commit f3b0de0609
5 changed files with 121 additions and 16 deletions

View File

@@ -4,6 +4,13 @@
#include "decomp.h"
#include "mxcore.h"
enum MxDSBufferType {
MxDSBufferType_Chunk = 0,
MxDSBufferType_Allocate = 1,
MxDSBufferType_Preallocated = 2,
MxDSBufferType_Unknown = 3,
};
// VTABLE 0x100dcca0
// SIZE 0x34
class MxDSBuffer : public MxCore {
@@ -18,20 +25,22 @@ public:
return "MxDSBuffer";
}
MxResult FUN_100c6780(void* p_buffer, MxU32 p_size);
MxResult AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode);
MxResult SetBufferPointer(MxU32* p_buffer, MxU32 p_size);
void FUN_100c6f80(MxU32 p_unk);
inline void* GetBuffer() { return m_pBuffer; }
inline MxU8* GetBuffer() { return m_pBuffer; }
inline MxU32 GetWriteOffset() { return m_writeOffset; }
private:
void* m_pBuffer;
void* m_pIntoBuffer;
void* m_pIntoBuffer2;
MxU8* m_pBuffer;
MxU8* m_pIntoBuffer;
MxU8* m_pIntoBuffer2;
undefined4 m_unk14;
undefined4 m_unk18;
undefined4 m_unk1c;
undefined2 m_unk20;
undefined4 m_mode;
MxDSBufferType m_mode;
MxU32 m_writeOffset;
MxU32 m_bytesRemaining;
undefined4 m_unk30;