mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-10 08:03:13 +00:00
100% Match of MxDSFile (#51)
* 100% Match of MxDSFile * ...almost, MxDSFile::Open is still not quite matching but all of the other methods are 100% matching. * Turns out that most of the virtual methods and some of the members are actually on the MxDSSource base class, which I've pulled out as part of this. * In order to implement the methods I added the MXIOINFO class, which seems to be a thin wrapper around the MMIOINFO windows structure. We can tell this because MMIOINFO::~MMIOINFO was included in the DLL exports, and calls down to a function which deconstructs something looking exactly like MMIOINFO. * Add mxdssource.cpp * mattkc feedback * some accuracy improvements * Use FOURCC macro * Tirival solve in mxioinfo.cpp * Update mxdsfile.cpp 0xFFFFFFFF -> -1 --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
30
LEGO1/mxdssource.h
Normal file
30
LEGO1/mxdssource.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef MXDSSOURCE_H
|
||||
#define MXDSSOURCE_H
|
||||
|
||||
#include "mxcore.h"
|
||||
|
||||
class MxDSSource : public MxCore
|
||||
{
|
||||
public:
|
||||
MxDSSource()
|
||||
: m_lengthInDWords(0)
|
||||
, m_pBuffer(0)
|
||||
, m_position(-1)
|
||||
{}
|
||||
|
||||
virtual long Open(unsigned long) = 0;
|
||||
virtual long Close() = 0;
|
||||
virtual void SomethingWhichCallsRead(void* pUnknownObject);
|
||||
virtual long Read(unsigned char *, unsigned long) = 0;
|
||||
virtual long Seek(long, int) = 0;
|
||||
virtual unsigned long GetBufferSize() = 0;
|
||||
virtual unsigned long GetStreamBuffersNum() = 0;
|
||||
virtual long GetLengthInDWords();
|
||||
|
||||
protected:
|
||||
unsigned long m_lengthInDWords;
|
||||
void* m_pBuffer;
|
||||
long m_position;
|
||||
};
|
||||
|
||||
#endif // MXDSSOURCE_H
|
||||
Reference in New Issue
Block a user