mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-29 11:06:05 -05:00
07912eb05a
* Stubbed a bunch of classes and annotated them for later use. Heavily wip and more of pseudocode right now. * Converted pseudocode into real code! * Created a bunch more classes and added more information to exisiting ones Did not error check, this was pushed just for reference * More classes and implementation details. Still not checked for any errors * Fixed code and decided on a way to handle virtual table stubs * Some additional fixes * More smaller fixes * Added classes to project and made it compile * Fixed function adresses that caused the python script to fail * More classes and virtual function resolves. Builds and compares fine. * Again more classes and virtual function resolves. Builds and compares fine. * No clue, I guess forced update for line endings * Finished up some work, compiles fine. All functions are STUB annotated to not pollute reccmp.py output. * line ending change * rename GetClassName/IsClass Mirroring recent changes from master * further conform to current master * update project * cleanup * project only updates when you close msdev --------- Co-authored-by: Cydra <cydra95@gmail.com> Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
60 lines
1.7 KiB
C++
60 lines
1.7 KiB
C++
#ifndef MXDSFILE_H
|
|
#define MXDSFILE_H
|
|
|
|
#include "mxdssource.h"
|
|
#include "mxioinfo.h"
|
|
#include "mxstring.h"
|
|
|
|
// VTABLE 0x100dc890
|
|
class MxDSFile : public MxDSSource
|
|
{
|
|
public:
|
|
__declspec(dllexport) MxDSFile(const char *filename, unsigned long skipReadingChunks);
|
|
__declspec(dllexport) virtual ~MxDSFile(); // vtable+0x0
|
|
|
|
// OFFSET: LEGO1 0x100c0120
|
|
inline virtual const char *ClassName() const override // vtable+0x0c
|
|
{
|
|
// 0x10102594
|
|
return "MxDSFile";
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100c0130
|
|
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
|
|
{
|
|
return !strcmp(name, MxDSFile::ClassName()) || MxDSSource::IsA(name);
|
|
}
|
|
|
|
__declspec(dllexport) virtual long Open(unsigned long); // vtable+0x14
|
|
__declspec(dllexport) virtual long Close(); // vtable+0x18
|
|
__declspec(dllexport) virtual long Read(unsigned char *,unsigned long); // vtable+0x20
|
|
__declspec(dllexport) virtual long Seek(long,int); // vtable+0x24
|
|
__declspec(dllexport) virtual unsigned long GetBufferSize(); // vtable+0x28
|
|
__declspec(dllexport) virtual unsigned long GetStreamBuffersNum(); // vtable+0x2c
|
|
private:
|
|
long ReadChunks();
|
|
struct ChunkHeader {
|
|
ChunkHeader()
|
|
: majorVersion(0)
|
|
, minorVersion(0)
|
|
, bufferSize(0)
|
|
, streamBuffersNum(0)
|
|
{}
|
|
|
|
unsigned short majorVersion;
|
|
unsigned short minorVersion;
|
|
unsigned long bufferSize;
|
|
short streamBuffersNum;
|
|
short reserved;
|
|
};
|
|
|
|
MxString m_filename;
|
|
MXIOINFO m_io;
|
|
ChunkHeader m_header;
|
|
|
|
// If false, read chunks immediately on open, otherwise
|
|
// skip reading chunks until ReadChunks is explicitly called.
|
|
unsigned long m_skipReadingChunks;
|
|
};
|
|
|
|
#endif // MXDSFILE_H
|