Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions DarkEdif/Inc/Windows/CFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ enum class CFCERROR {

FusionAPIImport HFILE FusionAPI File_OpenA(const char * fname, int mode);
FusionAPIImport HFILE FusionAPI File_CreateA(const char * fname);
FusionAPIImport int FusionAPI File_Read(HFILE hf, void * buf, unsigned int len);
FusionAPIImport int FusionAPI File_ReadAndCount(HFILE hf, void * buf, unsigned int len);
FusionAPIImport int FusionAPI File_Read(HFILE hf, void * buf, DWORD len);
FusionAPIImport int FusionAPI File_ReadAndCount(HFILE hf, void * buf, DWORD len);
FusionAPIImport int FusionAPI File_ReadShortIntelData(HFILE hf, void ** pBuf);
FusionAPIImport int FusionAPI File_ReadShortIntelString(HFILE hf, void ** pBuf);
FusionAPIImport int FusionAPI File_ReadLongIntelData(HFILE hf, void ** pBuf);
FusionAPIImport int FusionAPI File_Write(HFILE hf, void * buf, unsigned int len);
FusionAPIImport unsigned int FusionAPI File_GetPosition(HFILE hf);
FusionAPIImport unsigned int FusionAPI File_SeekBegin(HFILE hf, long pos);
FusionAPIImport unsigned int FusionAPI File_SeekCurrent(HFILE hf, long pos);
FusionAPIImport unsigned int FusionAPI File_SeekEnd(HFILE hf, long pos);
FusionAPIImport int FusionAPI File_Write(HFILE hf, void * buf, DWORD len);
FusionAPIImport DWORD FusionAPI File_GetPosition(HFILE hf);
FusionAPIImport DWORD FusionAPI File_SeekBegin(HFILE hf, long pos);
FusionAPIImport DWORD FusionAPI File_SeekCurrent(HFILE hf, long pos);
FusionAPIImport DWORD FusionAPI File_SeekEnd(HFILE hf, long pos);
FusionAPIImport long FusionAPI File_GetLength(HFILE hf);
FusionAPIImport void FusionAPI File_Close(HFILE hf);
FusionAPIImport BOOL FusionAPI File_ExistA(const char * pName);
Expand Down Expand Up @@ -106,14 +106,14 @@ class FusionAPIImport CInputBufFile : public CInputFile
static CInputBufFile * NewInstance();

int Create(HFILE hf);
int Create(HFILE hf, unsigned int dwOffset, unsigned int dwSize);
int Create(HFILE hf, DWORD dwOffset, DWORD dwSize);
int Create(const char * filename);
int Create(const char * filename, unsigned int dwOffset, unsigned int dwSize);
int Create(const char * filename, DWORD dwOffset, DWORD dwSize);
int Create(const UShortWCHAR * filename);
int Create(const UShortWCHAR * filename, unsigned int dwOffset, unsigned int dwSize);
int Create(const UShortWCHAR * filename, DWORD dwOffset, DWORD dwSize);

virtual int Read(unsigned char * dest, unsigned int lsize);
virtual int Read(unsigned char * dest, unsigned int lsize, LPDWORD pRead);
virtual int Read(unsigned char * dest, DWORD lsize);
virtual int Read(unsigned char * dest, DWORD lsize, LPDWORD pRead);
virtual int ReadByte(unsigned char * dest);
// virtual int ReadWord(LPWORD dest);
// virtual int ReadDWord(LPDWORD dest);
Expand All @@ -131,18 +131,18 @@ class FusionAPIImport CInputBufFile : public CInputFile
virtual UShortWCHAR * GetFileNameW();

protected:
int Attach(HANDLE hnd, unsigned int dwOffset, unsigned int dwSize);
int Attach(HANDLE hnd, DWORD dwOffset, DWORD dwSize);
private:
HFILE m_hf;
unsigned int m_curpos;
DWORD m_curpos;
unsigned char * m_buffer;
unsigned char * m_bufcurr;
unsigned int m_remains;
DWORD m_remains;
UShortWCHAR * m_fnameW;
char * m_fnameA;

unsigned int m_startOffset;
unsigned int m_length;
DWORD m_startOffset;
DWORD m_length;
};
typedef CInputBufFile * LPINPUTBUFFILE;

Expand Down Expand Up @@ -182,8 +182,8 @@ class FusionAPIImport CInputMemFile : public CInputFile
private:
unsigned char * m_buffer;
unsigned char * m_bufcurr;
unsigned int m_curpos;
unsigned int m_remains;
DWORD m_curpos;
DWORD m_remains;
BOOL m_bAutoDelete;
};
//typedef CInputMemFile * LPINPUTMEMFILE;
Expand All @@ -206,7 +206,7 @@ class FusionAPIImport COutputFile

virtual int Write(unsigned char * pb, UINT sz) = 0;
virtual int Flush() = 0;
virtual unsigned int GetLength() = 0;
virtual DWORD GetLength() = 0;

virtual long GetPosition() = 0;
virtual long Seek(long pos, int method) = 0;
Expand All @@ -224,14 +224,14 @@ class FusionAPIImport COutputMemFile : public COutputFile
virtual ~COutputMemFile();

int Create(UINT nBlockSize = 512);
int Create(unsigned char * buffer, unsigned int nBufferSize = 0x7FFFFFF);
int Create(unsigned char * buffer, DWORD nBufferSize = 0x7FFFFFF);
unsigned char * GetBuffer();
unsigned char * DetachBuffer();
static void FreeBuffer(unsigned char * pBuffer); // car il faut libérer à l'interieur de la DLL

virtual int Write(unsigned char * pb, UINT sz);
virtual int Flush();
virtual unsigned int GetLength();
virtual DWORD GetLength();

virtual long GetPosition();
virtual long Seek(long pos, int method);
Expand All @@ -242,9 +242,9 @@ class FusionAPIImport COutputMemFile : public COutputFile
private:
unsigned char * m_buffer;
unsigned char * m_curptr;
unsigned int m_totalsize;
unsigned int m_cursize;
unsigned int m_blocksize;
DWORD m_totalsize;
DWORD m_cursize;
DWORD m_blocksize;
BOOL m_bReallocable;
};

Expand All @@ -261,7 +261,7 @@ class FusionAPIImport COutputBufFile : public COutputFile

virtual int Write(unsigned char * pb, UINT sz);
virtual int Flush();
virtual unsigned int GetLength();
virtual DWORD GetLength();

virtual long GetPosition();
virtual long Seek(long pos, int method);
Expand All @@ -274,8 +274,8 @@ class FusionAPIImport COutputBufFile : public COutputFile
UShortWCHAR * m_fnameW;
unsigned char * m_buffer;
unsigned char * m_curptr;
unsigned int m_cursize;
unsigned int m_buffersize;
DWORD m_cursize;
DWORD m_buffersize;
BOOL m_bBuffered;
char * m_fnameA;
};
26 changes: 13 additions & 13 deletions DarkEdif/Inc/Windows/MMFWindowsMasterHeader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4298,7 +4298,7 @@ struct mv {
HPALETTE HPal256; // 256 color palette
unsigned short AppMode, // Screen mode with flags
ScrMode; // Screen mode (SM_8=256, SM_15=32768, SM_16=65536, SM_32=16 million colors)
unsigned int EditDXDocToClient, // Edit time only: top-left coordinates
DWORD EditDXDocToClient, // Edit time only: top-left coordinates
EditDYDocToClient;
CImageFilterMgr * ImgFilterMgr; // Image filter manager
CSoundFilterMgr * SndFilterMgr; // Sound filter manager
Expand All @@ -4315,7 +4315,7 @@ struct mv {

// Runtime
RunHeader * RunHdr; // Current RunHeader
unsigned int PextsHoldingGlobals; // Preferences (sound on/off)
DWORD PextsHoldingGlobals; // Preferences (sound on/off)
TCHAR * subType;
BOOL FullScreen; // Full screen mode
TCHAR * MainAppFileName; // App filename
Expand All @@ -4327,7 +4327,7 @@ struct mv {
TCHAR ** ExtList;
int NbDllTrans;
dllTrans* DllTransList;
unsigned int JoyCaps[32];
DWORD JoyCaps[32];
HHOOK HMsgHook;
int ModalLoop;
int ModalSubAppCount;
Expand All @@ -4337,7 +4337,7 @@ struct mv {
////////////

// Editor: Open Help file
void (CALLBACK * HelpA) (const char * pHelpFile, unsigned int nID, LPARAM lParam);
void (CALLBACK * HelpA) (const char * pHelpFile, DWORD nID, LPARAM lParam);

// Editor: Get default font for object creation
// pStyle can be NULL to ignore; cbSize is size of pStyle's buffer.
Expand All @@ -4358,29 +4358,29 @@ struct mv {
void (CALLBACK * UnregisterDialogBox) (HWND hDlg);

// Runtime: Add surface as backdrop object
void (CALLBACK * AddBackdrop) (cSurface * pSf, int x, int y, unsigned int dwInkEffect, unsigned int dwInkEffectParam, int nObstacleType, int nLayer);
void (CALLBACK * AddBackdrop) (cSurface * pSf, int x, int y, DWORD dwInkEffect, DWORD dwInkEffectParam, int nObstacleType, int nLayer);

// Runtime: Binary files
BOOL (CALLBACK * GetFileA)(const char * pPath, char * pFilePath, unsigned int dwFlags);
BOOL (CALLBACK * GetFileA)(const char * pPath, char * pFilePath, DWORD dwFlags);
void (CALLBACK * ReleaseFileA)(const char * pPath);
HANDLE (CALLBACK * OpenHFileA)(const char * pPath, unsigned int * pDwSize, unsigned int dwFlags);
HANDLE (CALLBACK * OpenHFileA)(const char * pPath, DWORD * pDwSize, DWORD dwFlags);
void (CALLBACK * CloseHFile)(HANDLE hf);

// Plugin: download file
int (CALLBACK * LoadNetFileA) (char * pFilename);

// Plugin: send command to Vitalize
int (CALLBACK * NetCommandA) (int, void *, unsigned int, void *, unsigned int);
int (CALLBACK * NetCommandA) (int, void *, DWORD, void *, DWORD);

// Editor & Runtime: Returns the version of MMF or of the runtime
// Return is a bitmask of three different flag sets; MMFVERSION_MASK, MMFBUILD_MASK, MMFVERFLAG_MASK
unsigned int (CALLBACK * GetVersion) ();
DWORD (CALLBACK * GetVersion) ();

// Editor & Runtime: callback function for properties or other functions
LRESULT (CALLBACK * CallFunction) (EDITDATA * edPtr, CallFunctionIDs nFnc, LPARAM lParam1, LPARAM lParam2, LPARAM lParam3);

// Editor: Open Help file (UNICODE)
void (CALLBACK * HelpW) (const wchar_t * pHelpFile, unsigned int nID, LPARAM lParam);
void (CALLBACK * HelpW) (const wchar_t * pHelpFile, DWORD nID, LPARAM lParam);

// Editor: Get default font for object creation (UNICODE)
// pStyle can be NULL to ignore; cbSize is size of pStyle's buffer in WCHARs.
Expand All @@ -4392,15 +4392,15 @@ struct mv {
BOOL (CALLBACK * EditAnimationW) (EDITDATA * edPtr, EditAnimationParamsW * Params, HWND Parent);

// Runtime: Binary files (UNICODE)
BOOL (CALLBACK * GetFileW)(const wchar_t * pPath, wchar_t * pFilePath, unsigned int dwFlags);
BOOL (CALLBACK * GetFileW)(const wchar_t * pPath, wchar_t * pFilePath, DWORD dwFlags);
void (CALLBACK * ReleaseFileW)(const wchar_t * pPath);
HANDLE (CALLBACK * OpenHFileW)(const wchar_t * pPath, unsigned int * pDwSize, unsigned int dwFlags);
HANDLE (CALLBACK * OpenHFileW)(const wchar_t * pPath, DWORD * pDwSize, DWORD dwFlags);

// Plugin: download file
int (CALLBACK * LoadNetFileW) (wchar_t * pFilename);

// Plugin: send command to Vitalize
int (CALLBACK * NetCommandW) (int, void *, unsigned int, void *, unsigned int);
int (CALLBACK * NetCommandW) (int, void *, DWORD, void *, DWORD);

// Place-holder for next versions
void * AdditionalFncs[6];
Expand Down