mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Finish StreamProvider classes (#420)
* Finish StreamProvider classes * Fix variable name * Use FOURCC * Match FUN_100c7090 * Changes * Readability --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -20,6 +20,9 @@ public:
|
||||
|
||||
MxResult Run() override;
|
||||
MxResult StartWithTarget(MxDiskStreamProvider* p_target);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100d10a0
|
||||
// MxDiskStreamProviderThread::`scalar deleting destructor'
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100dd138
|
||||
@@ -55,6 +58,9 @@ public:
|
||||
virtual MxU32 GetLengthInDWords() override; // vtable+0x24
|
||||
virtual MxU32* GetBufferForDWords() override; // vtable+0x28
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100d1220
|
||||
// MxDiskStreamProvider::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
MxDiskStreamProviderThread m_thread; // 0x10
|
||||
MxSemaphore m_busySemaphore; // 0x2c
|
||||
@@ -64,7 +70,4 @@ private:
|
||||
MxStreamListMxDSAction m_list; // 0x54
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100d1220
|
||||
// MxDiskStreamProvider::`scalar deleting destructor'
|
||||
|
||||
#endif // MXDISKSTREAMPROVIDER_H
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
}
|
||||
|
||||
MxResult AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode);
|
||||
MxResult SetBufferPointer(MxU32* p_buffer, MxU32 p_size);
|
||||
MxResult SetBufferPointer(MxU8* p_buffer, MxU32 p_size);
|
||||
MxResult FUN_100c67b0(
|
||||
MxStreamController* p_controller,
|
||||
MxDSAction* p_action,
|
||||
@@ -52,20 +52,27 @@ public:
|
||||
MxDSStreamingAction** p_streamingAction,
|
||||
MxStreamChunk* p_header
|
||||
);
|
||||
static MxCore* ReadChunk(MxDSBuffer* p_buffer, MxU32* p_chunkData, MxU16 p_flags);
|
||||
MxU8* SkipToData();
|
||||
MxU8 ReleaseRef(MxDSChunk*);
|
||||
void AddRef(MxDSChunk* p_chunk);
|
||||
MxResult CalcBytesRemaining(MxU8* p_data);
|
||||
void FUN_100c6f80(MxU32 p_writeOffset);
|
||||
MxU8* FUN_100c6fa0(MxU8* p_data);
|
||||
MxResult FUN_100c7090(MxDSBuffer* p_buf);
|
||||
|
||||
static MxCore* ReadChunk(MxDSBuffer* p_buffer, MxU32* p_chunkData, MxU16 p_flags);
|
||||
static MxResult Append(MxU8* p_buffer1, MxU8* p_buffer2);
|
||||
|
||||
inline MxU8* GetBuffer() { return m_pBuffer; }
|
||||
inline MxU32 GetWriteOffset() { return m_writeOffset; }
|
||||
inline MxU32 GetBytesRemaining() { return m_bytesRemaining; }
|
||||
inline MxU8** GetBufferRef() { return &m_pBuffer; }
|
||||
inline undefined4 GetUnknown14() { return m_unk0x14; }
|
||||
inline MxU16 GetRefCount() { return m_refcount; }
|
||||
inline MxDSBufferType GetMode() { return m_mode; }
|
||||
inline MxU32 GetWriteOffset() { return m_writeOffset; }
|
||||
inline MxU32 GetBytesRemaining() { return m_bytesRemaining; }
|
||||
inline void SetUnknown14(undefined4 p_unk0x14) { m_unk0x14 = p_unk0x14; }
|
||||
inline void SetUnknown1c(undefined4 p_unk0x1c) { m_unk0x1c = p_unk0x1c; }
|
||||
inline void SetMode(MxDSBufferType p_mode) { m_mode = p_mode; }
|
||||
inline void SetUnk30(MxDSStreamingAction* p_unk0x30) { m_unk0x30 = p_unk0x30; }
|
||||
|
||||
private:
|
||||
|
@@ -33,7 +33,11 @@ public:
|
||||
return !strcmp(p_name, MxDSChunk::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
||||
static MxU32 ReturnE();
|
||||
static MxU32 GetHeaderSize();
|
||||
inline static MxU32* IntoType(MxU8* p_buffer) { return (MxU32*) p_buffer; }
|
||||
inline static MxU32* IntoLength(MxU8* p_buffer) { return (MxU32*) (p_buffer + 4); }
|
||||
inline static MxU32 Size(MxU32 p_dataSize) { return (p_dataSize & 1) + p_dataSize + 8; }
|
||||
inline static MxU8* End(MxU8* p_buffer) { return p_buffer + Size(*IntoLength(p_buffer)); }
|
||||
|
||||
inline void SetFlags(MxU16 p_flags) { m_flags = p_flags; }
|
||||
inline void SetObjectId(undefined4 p_objectid) { m_objectId = p_objectid; }
|
||||
|
@@ -41,6 +41,7 @@ public:
|
||||
inline void SetUnknown94(MxU32 p_unk0x94) { m_unk0x94 = p_unk0x94; }
|
||||
inline void SetUnknown9c(MxS32 p_unk0x9c) { m_unk0x9c = p_unk0x9c; }
|
||||
inline void SetUnknowna0(MxDSBuffer* p_unk0xa0) { m_unk0xa0 = p_unk0xa0; }
|
||||
inline void SetUnknowna4(MxDSBuffer* p_unk0xa4) { m_unk0xa4 = p_unk0xa4; }
|
||||
inline void SetBufferOffset(MxU32 p_bufferOffset) { m_bufferOffset = p_bufferOffset; }
|
||||
|
||||
private:
|
||||
|
@@ -29,17 +29,19 @@ public:
|
||||
virtual MxU32 GetLengthInDWords() override; // vtable+0x24
|
||||
virtual MxU32* GetBufferForDWords() override; // vtable+0x28
|
||||
|
||||
inline MxU32* GetBufferOfFileSize() { return m_pBufferOfFileSize; }
|
||||
inline MxU8* GetBufferOfFileSize() { return m_pBufferOfFileSize; }
|
||||
|
||||
protected:
|
||||
MxU32 m_bufferSize; // 0x10
|
||||
MxU32 m_fileSize; // 0x14
|
||||
MxU32* m_pBufferOfFileSize; // 0x18
|
||||
MxU32 m_lengthInDWords; // 0x1c
|
||||
MxU32* m_bufferForDWords; // 0x20
|
||||
MxU32 m_bufferSize; // 0x10
|
||||
MxU32 m_fileSize; // 0x14
|
||||
MxU8* m_pBufferOfFileSize; // 0x18
|
||||
MxU32 m_lengthInDWords; // 0x1c
|
||||
MxU32* m_bufferForDWords; // 0x20
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100d0a30
|
||||
// MxRAMStreamProvider::`scalar deleting destructor'
|
||||
|
||||
MxU32 ReadData(MxU8* p_fileSizeBuffer, MxU32 p_fileSize);
|
||||
|
||||
#endif // MXRAMSTREAMPROVIDER_H
|
||||
|
Reference in New Issue
Block a user