diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index cc0bd8ab..cda6d9ff 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -159,15 +159,15 @@ MxDSObject *CreateStreamObject(MxDSFile *p_file, MxS16 p_ofs) return NULL; } - if (p_file->Read(&tmp_chunk.ckid, 8) == 0 && tmp_chunk.ckid == FOURCC('M', 'x', 'S', 't')) { - if (p_file->Read(&tmp_chunk.ckid, 8) == 0 && tmp_chunk.ckid == FOURCC('M', 'x', 'O', 'b')) { + if (p_file->Read((MxU8*)&tmp_chunk.ckid, 8) == 0 && tmp_chunk.ckid == FOURCC('M', 'x', 'S', 't')) { + if (p_file->Read((MxU8*)&tmp_chunk.ckid, 8) == 0 && tmp_chunk.ckid == FOURCC('M', 'x', 'O', 'b')) { buf = new char[tmp_chunk.cksize]; if (!buf) { return NULL; } - if (p_file->Read(buf, tmp_chunk.cksize) != 0) { + if (p_file->Read((MxU8*)buf, tmp_chunk.cksize) != 0) { return NULL; } diff --git a/LEGO1/mxdsfile.cpp b/LEGO1/mxdsfile.cpp index 6d1bcb71..ca6e96fb 100644 --- a/LEGO1/mxdsfile.cpp +++ b/LEGO1/mxdsfile.cpp @@ -47,7 +47,7 @@ MxLong MxDSFile::Open(MxULong uStyle) } // OFFSET: LEGO1 0x100cc780 -MxResult MxDSFile::Read(void *p_buf, MxULong p_nbytes) +MxResult MxDSFile::Read(unsigned char *p_buf, MxULong p_nbytes) { if (m_io.Read(p_buf, p_nbytes) != p_nbytes) return FAILURE; diff --git a/LEGO1/mxdsfile.h b/LEGO1/mxdsfile.h index 931d862c..d46a6153 100644 --- a/LEGO1/mxdsfile.h +++ b/LEGO1/mxdsfile.h @@ -28,7 +28,7 @@ class MxDSFile : public MxDSSource __declspec(dllexport) virtual MxLong Open(MxULong); // vtable+0x14 __declspec(dllexport) virtual MxLong Close(); // vtable+0x18 - __declspec(dllexport) virtual MxResult Read(void *,MxULong); // vtable+0x20 + __declspec(dllexport) virtual MxResult Read(unsigned char *,MxULong); // vtable+0x20 __declspec(dllexport) virtual MxLong Seek(MxLong,int); // vtable+0x24 __declspec(dllexport) virtual MxULong GetBufferSize(); // vtable+0x28 __declspec(dllexport) virtual MxULong GetStreamBuffersNum(); // vtable+0x2c diff --git a/LEGO1/mxdssource.h b/LEGO1/mxdssource.h index 0c78c059..67cbc6c7 100644 --- a/LEGO1/mxdssource.h +++ b/LEGO1/mxdssource.h @@ -29,7 +29,7 @@ class MxDSSource : public MxCore virtual MxLong Open(MxULong) = 0; virtual MxLong Close() = 0; virtual void SomethingWhichCallsRead(void* pUnknownObject); - virtual MxResult Read(void *, MxULong) = 0; + virtual MxResult Read(unsigned char *, MxULong) = 0; virtual MxLong Seek(MxLong, int) = 0; virtual MxULong GetBufferSize() = 0; virtual MxULong GetStreamBuffersNum() = 0;