diff --git a/3rdParty/PKWare/explode.cpp b/3rdParty/PKWare/explode.cpp index 8d69af30..2702c4bf 100644 --- a/3rdParty/PKWare/explode.cpp +++ b/3rdParty/PKWare/explode.cpp @@ -127,7 +127,7 @@ static unsigned short ChCodeAsc[] = //----------------------------------------------------------------------------- // Local functions -static void GenDecodeTabs( +static void PKWAREAPI GenDecodeTabs( unsigned char * positions, // [out] Table of positions unsigned char * start_indexes, // [in] Table of start indexes unsigned char * length_bits, // [in] Table of lengths. Each length is stored as number of bits @@ -148,7 +148,7 @@ static void GenDecodeTabs( } } -static void GenAscTabs(TDcmpStruct * pWork) +static void PKWAREAPI GenAscTabs(TDcmpStruct * pWork) { unsigned short * pChCodeAsc = &ChCodeAsc[0xFF]; unsigned int acc, add; @@ -227,7 +227,7 @@ static void GenAscTabs(TDcmpStruct * pWork) // Returns: PKDCL_OK: Operation was successful // PKDCL_STREAM_END: There are no more bits in the input buffer -static int WasteBits(TDcmpStruct * pWork, unsigned int nBits) +static int PKWAREAPI WasteBits(TDcmpStruct * pWork, unsigned int nBits) { // If number of bits required is less than number of (bits in the buffer) ? if(nBits <= pWork->extra_bits) @@ -267,7 +267,7 @@ static int WasteBits(TDcmpStruct * pWork, unsigned int nBits) // 0x305: End of stream // 0x306: Error -static unsigned int DecodeLit(TDcmpStruct * pWork) +static unsigned int PKWAREAPI DecodeLit(TDcmpStruct * pWork) { unsigned int extra_length_bits; // Number of bits of extra literal length unsigned int length_code; // Length code @@ -357,7 +357,7 @@ static unsigned int DecodeLit(TDcmpStruct * pWork) // Decodes the distance of the repetition, backwards relative to the // current output buffer position -static unsigned int DecodeDist(TDcmpStruct * pWork, unsigned int rep_length) +static unsigned int PKWAREAPI DecodeDist(TDcmpStruct * pWork, unsigned int rep_length) { unsigned int dist_pos_code; // Distance position code unsigned int dist_pos_bits; // Number of bits of distance position @@ -388,7 +388,7 @@ static unsigned int DecodeDist(TDcmpStruct * pWork, unsigned int rep_length) return distance + 1; } -static unsigned int Expand(TDcmpStruct * pWork) +static unsigned int PKWAREAPI Expand(TDcmpStruct * pWork) { unsigned int next_literal; // Literal decoded from the compressed data unsigned int result; // Value to be returned @@ -470,9 +470,9 @@ static unsigned int Expand(TDcmpStruct * pWork) //----------------------------------------------------------------------------- // Main exploding function. -unsigned int explode( - unsigned int (*read_buf)(char *buf, unsigned int *size, void *param), - void (*write_buf)(char *buf, unsigned int *size, void *param), +unsigned int PKWAREAPI explode( + unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param), + void (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param), char *work_buf, void *param) { diff --git a/3rdParty/PKWare/implode.cpp b/3rdParty/PKWare/implode.cpp index 68eb6646..2ea8949d 100644 --- a/3rdParty/PKWare/implode.cpp +++ b/3rdParty/PKWare/implode.cpp @@ -136,7 +136,7 @@ static unsigned short ChCodeAsc[] = // Every element of "hash_to_index" will contain lowest index to the // "pair_hash_offsets" table, effectively giving offset of the first // occurence of the given PAIR_HASH in the input data. -static void SortBuffer(TCmpStruct * pWork, unsigned char * buffer_begin, unsigned char * buffer_end) +static void PKWAREAPI SortBuffer(TCmpStruct * pWork, unsigned char * buffer_begin, unsigned char * buffer_end) { unsigned short * phash_to_index; unsigned char * buffer_ptr; @@ -182,7 +182,7 @@ static void SortBuffer(TCmpStruct * pWork, unsigned char * buffer_begin, unsigne } } -static void FlushBuf(TCmpStruct * pWork) +static void PKWAREAPI FlushBuf(TCmpStruct * pWork) { unsigned char save_ch1; unsigned char save_ch2; @@ -202,7 +202,7 @@ static void FlushBuf(TCmpStruct * pWork) pWork->out_buff[pWork->out_bytes] = save_ch2; } -static void OutputBits(TCmpStruct * pWork, unsigned int nbits, unsigned long bit_buff) +static void PKWAREAPI OutputBits(TCmpStruct * pWork, unsigned int nbits, unsigned long bit_buff) { unsigned int out_bits; @@ -244,7 +244,7 @@ static void OutputBits(TCmpStruct * pWork, unsigned int nbits, unsigned long bit // (a previous occurence of the current byte sequence) // Returns length of the repetition, and stores the backward distance // to pWork structure. -static unsigned int FindRep(TCmpStruct * pWork, unsigned char * input_data) +static unsigned int PKWAREAPI FindRep(TCmpStruct * pWork, unsigned char * input_data) { unsigned short * phash_to_index; // Pointer into pWork->phash_to_index table unsigned short * phash_offs; // Pointer to the table containing offsets of each PAIR_HASH @@ -500,7 +500,7 @@ static unsigned int FindRep(TCmpStruct * pWork, unsigned char * input_data) } } -static void WriteCmpData(TCmpStruct * pWork) +static void PKWAREAPI WriteCmpData(TCmpStruct * pWork) { unsigned char * input_data_end; // Pointer to the end of the input data unsigned char * input_data = pWork->work_buff + pWork->dsize_bytes + 0x204; @@ -685,9 +685,9 @@ __Exit: //----------------------------------------------------------------------------- // Main imploding function -unsigned int PKEXPORT implode( - unsigned int (*read_buf)(char *buf, unsigned int *size, void *param), - void (*write_buf)(char *buf, unsigned int *size, void *param), +unsigned int PKWAREAPI implode( + unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param), + void (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param), char *work_buf, void *param, unsigned int *type, diff --git a/3rdParty/PKWare/pkware.h b/3rdParty/PKWare/pkware.h index 6218044b..37ec0b80 100644 --- a/3rdParty/PKWare/pkware.h +++ b/3rdParty/PKWare/pkware.h @@ -30,11 +30,11 @@ //----------------------------------------------------------------------------- // Define calling convention -#ifndef PKEXPORT +#ifndef PKWAREAPI #ifdef WIN32 -#define PKEXPORT __cdecl // Use for normal __cdecl calling +#define PKWAREAPI __cdecl // Use for normal __cdecl calling #else -#define PKEXPORT +#define PKWAREAPI #endif #endif @@ -58,8 +58,8 @@ typedef struct unsigned short offs09AE; // 09AE: void * param; // 09B0: User parameter - unsigned int (*read_buf)(char *buf, unsigned int *size, void *param); // 9B4 - void (*write_buf)(char *buf, unsigned int *size, void *param); // 9B8 + unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param); // 9B4 + void (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param); // 9B8 unsigned short offs09BC[0x204]; // 09BC: unsigned long offs0DC4; // 0DC4: @@ -89,8 +89,8 @@ typedef struct unsigned int in_pos; // 001C: Position in in_buff unsigned long in_bytes; // 0020: Number of bytes in input buffer void * param; // 0024: Custom parameter - unsigned int (*read_buf)(char *buf, unsigned int *size, void *param); // Pointer to function that reads data from the input stream - void (*write_buf)(char *buf, unsigned int *size, void *param);// Pointer to function that writes data to the output stream + unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param); // Pointer to function that reads data from the input stream + void (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param);// Pointer to function that writes data to the output stream unsigned char out_buff[0x2204]; // 0030: Output circle buffer. // 0x0000 - 0x0FFF: Previous uncompressed data, kept for repetitions @@ -120,18 +120,18 @@ typedef struct extern "C" { #endif -unsigned int PKEXPORT implode( - unsigned int (*read_buf)(char *buf, unsigned int *size, void *param), - void (*write_buf)(char *buf, unsigned int *size, void *param), +unsigned int PKWAREAPI implode( + unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param), + void (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param), char *work_buf, void *param, unsigned int *type, unsigned int *dsize); -unsigned int PKEXPORT explode( - unsigned int (*read_buf)(char *buf, unsigned int *size, void *param), - void (*write_buf)(char *buf, unsigned int *size, void *param), +unsigned int PKWAREAPI explode( + unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param), + void (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param), char *work_buf, void *param); diff --git a/3rdParty/Storm/Source/storm.h b/3rdParty/Storm/Source/storm.h index e5651a11..b44c0968 100644 --- a/3rdParty/Storm/Source/storm.h +++ b/3rdParty/Storm/Source/storm.h @@ -1215,7 +1215,7 @@ void STORMAPI SRgn529i(int handle, int a2, int a3); * * Returns TRUE if the user chose to continue execution, FALSE otherwise. */ -BOOL +BOOL __cdecl SErrDisplayErrorFmt( DWORD dwErrMsg, const char *logfilename, @@ -1269,7 +1269,7 @@ char *STORMAPI SStrChrR(const char *string, char c); * * Returns the number of characters written. */ -unsigned int +unsigned int __cdecl SStrVPrintf( char *dest, unsigned int size, diff --git a/Diablo.dsp b/Diablo.dsp index 1fb13830..74de5c39 100644 --- a/Diablo.dsp +++ b/Diablo.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /TC /c +# ADD CPP /nologo /Gr /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /TC /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -70,7 +70,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /O1 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /TC /c +# ADD CPP /nologo /Gr /MTd /W3 /Gm /GX /Zi /O1 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /TC /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" @@ -97,7 +97,7 @@ LINK32=link.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # SUBTRACT BASE CPP /WX -# ADD CPP /nologo /MT /W3 /GX /Zi /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FAs /YX /FD /TC /c +# ADD CPP /nologo /Gr /MT /W3 /GX /Zi /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FAs /YX /FD /TC /c # SUBTRACT CPP /WX # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 diff --git a/MakefileVC b/MakefileVC index eb1a64f9..c0bcd69e 100644 --- a/MakefileVC +++ b/MakefileVC @@ -36,7 +36,7 @@ else VC6_LINK = wine $(VC6_BIN_DIR)/link.exe endif -CFLAGS=/nologo /c /TC /GX /W3 /O1 /I $(VC6_INC_DIR) /FD /MT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fp"Diablo.pch" /YX /Gm /Zi /FAs +CFLAGS=/nologo /c /TC /GX /W3 /O1 /I $(VC6_INC_DIR) /FD /Gr /MT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fp"Diablo.pch" /YX /Gm /Zi /FAs LINKFLAGS=/nologo /subsystem:windows /machine:I386 /incremental:no ifeq ($(MAKE_BUILD),pdb) diff --git a/Source/_render.cpp b/Source/_render.cpp index 9e106845..f1f6ce06 100644 --- a/Source/_render.cpp +++ b/Source/_render.cpp @@ -1,4 +1,4 @@ -__declspec(naked) void __fastcall drawTopArchesUpperScreen(BYTE *pBuff) +__declspec(naked) void drawTopArchesUpperScreen(BYTE *pBuff) { __asm { push ebx @@ -2303,7 +2303,7 @@ __declspec(naked) void __fastcall drawTopArchesUpperScreen(BYTE *pBuff) } } -__declspec(naked) void __fastcall drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask) +__declspec(naked) void drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask) { __asm { push ebx @@ -3460,7 +3460,7 @@ __declspec(naked) void __fastcall drawBottomArchesUpperScreen(BYTE *pBuff, unsig } } -__declspec(naked) void __fastcall drawUpperScreen(BYTE *pBuff) +__declspec(naked) void drawUpperScreen(BYTE *pBuff) { __asm { push ebx @@ -4646,7 +4646,7 @@ __declspec(naked) void __fastcall drawUpperScreen(BYTE *pBuff) } } -__declspec(naked) void __fastcall drawTopArchesLowerScreen(BYTE *pBuff) +__declspec(naked) void drawTopArchesLowerScreen(BYTE *pBuff) { __asm { push ebx @@ -7350,7 +7350,7 @@ __declspec(naked) void __fastcall drawTopArchesLowerScreen(BYTE *pBuff) } } -__declspec(naked) void __fastcall drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask) +__declspec(naked) void drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask) { __asm { push ebx @@ -8815,7 +8815,7 @@ __declspec(naked) void __fastcall drawBottomArchesLowerScreen(BYTE *pBuff, unsig } } -__declspec(naked) void __fastcall drawLowerScreen(BYTE *pBuff) +__declspec(naked) void drawLowerScreen(BYTE *pBuff) { __asm { push ebx @@ -10199,7 +10199,7 @@ __declspec(naked) void __fastcall drawLowerScreen(BYTE *pBuff) } } -__declspec(naked) void __fastcall world_draw_black_tile(BYTE *pBuff) +__declspec(naked) void world_draw_black_tile(BYTE *pBuff) { __asm { push ebx diff --git a/Source/appfat.cpp b/Source/appfat.cpp index 6a82175b..2dd9f9b5 100644 --- a/Source/appfat.cpp +++ b/Source/appfat.cpp @@ -14,7 +14,7 @@ int cleanup_thread_id; // } //} -char *__fastcall GetErrorStr(DWORD error_code) +char *GetErrorStr(DWORD error_code) { DWORD upper_code; int size; @@ -46,7 +46,7 @@ char *__fastcall GetErrorStr(DWORD error_code) return sz_error_buf; } -void __fastcall TraceErrorDD(HRESULT hError, char *pszBuffer, DWORD dwMaxChars) +void TraceErrorDD(HRESULT hError, char *pszBuffer, DWORD dwMaxChars) { const char *szError; @@ -356,7 +356,7 @@ void __fastcall TraceErrorDD(HRESULT hError, char *pszBuffer, DWORD dwMaxChars) strncpy(pszBuffer, szError, dwMaxChars); } -void __fastcall TraceErrorDS(HRESULT hError, char *pszBuffer, DWORD dwMaxChars) +void TraceErrorDS(HRESULT hError, char *pszBuffer, DWORD dwMaxChars) { const char *szError; @@ -411,12 +411,12 @@ void __fastcall TraceErrorDS(HRESULT hError, char *pszBuffer, DWORD dwMaxChars) strncpy(pszBuffer, szError, dwMaxChars); } -char *__cdecl TraceLastError() +char *TraceLastError() { return GetErrorStr(GetLastError()); } -void app_fatal(const char *pszFmt, ...) +void __cdecl app_fatal(const char *pszFmt, ...) { va_list va; @@ -432,7 +432,7 @@ void app_fatal(const char *pszFmt, ...) exit(1); } -void __fastcall MsgBox(const char *pszFmt, va_list va) +void MsgBox(const char *pszFmt, va_list va) { char Text[256]; // [esp+0h] [ebp-100h] @@ -442,7 +442,7 @@ void __fastcall MsgBox(const char *pszFmt, va_list va) MessageBox(ghMainWnd, Text, "ERROR", MB_TASKMODAL | MB_ICONHAND); } -void __cdecl FreeDlg() +void FreeDlg() { if (terminating && cleanup_thread_id != GetCurrentThreadId()) Sleep(20000); @@ -461,7 +461,7 @@ void __cdecl FreeDlg() ShowCursor(TRUE); } -void DrawDlg(char *pszFmt, ...) +void __cdecl DrawDlg(char *pszFmt, ...) { char text[256]; // [esp+0h] [ebp-100h] va_list arglist; // [esp+10Ch] [ebp+Ch] @@ -473,13 +473,13 @@ void DrawDlg(char *pszFmt, ...) } #ifdef _DEBUG -void __fastcall assert_fail(int nLineNo, const char *pszFile, const char *pszFail) +void assert_fail(int nLineNo, const char *pszFile, const char *pszFail) { app_fatal("assertion failed (%d:%s)\n%s", nLineNo, pszFile, pszFail); } #endif -void __fastcall DDErrMsg(DWORD error_code, int log_line_nr, char *log_file_path) +void DDErrMsg(DWORD error_code, int log_line_nr, char *log_file_path) { char *msg; @@ -489,7 +489,7 @@ void __fastcall DDErrMsg(DWORD error_code, int log_line_nr, char *log_file_path) } } -void __fastcall DSErrMsg(DWORD error_code, int log_line_nr, char *log_file_path) +void DSErrMsg(DWORD error_code, int log_line_nr, char *log_file_path) { char *msg; @@ -499,7 +499,7 @@ void __fastcall DSErrMsg(DWORD error_code, int log_line_nr, char *log_file_path) } } -void __fastcall center_window(HWND hDlg) +void center_window(HWND hDlg) { LONG w, h; int screenW, screenH; @@ -519,7 +519,7 @@ void __fastcall center_window(HWND hDlg) } } -void __fastcall ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr) +void ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr) { char *size; LPARAM dwInitParam[128]; @@ -557,7 +557,7 @@ BOOL __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, char *text) return TRUE; } -void __fastcall TextDlg(HWND hDlg, char *text) +void TextDlg(HWND hDlg, char *text) { center_window(hDlg); @@ -565,7 +565,7 @@ void __fastcall TextDlg(HWND hDlg, char *text) SetDlgItemText(hDlg, 1000, text); } -void __fastcall ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr) +void ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr) { char *size; LPARAM dwInitParam[128]; @@ -578,7 +578,7 @@ void __fastcall ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, DialogBoxParam(ghInst, MAKEINTRESOURCE(template_id), ghMainWnd, (DLGPROC)FuncDlg, (LPARAM)dwInitParam); } -void __fastcall FileErrDlg(const char *error) +void FileErrDlg(const char *error) { FreeDlg(); @@ -591,7 +591,7 @@ void __fastcall FileErrDlg(const char *error) app_fatal(NULL); } -void __fastcall DiskFreeDlg(char *error) +void DiskFreeDlg(char *error) { FreeDlg(); @@ -601,7 +601,7 @@ void __fastcall DiskFreeDlg(char *error) app_fatal(NULL); } -BOOL __cdecl InsertCDDlg() +BOOL InsertCDDlg() { int nResult; @@ -616,7 +616,7 @@ BOOL __cdecl InsertCDDlg() return nResult == 1; } -void __fastcall DirErrorDlg(char *error) +void DirErrorDlg(char *error) { FreeDlg(); diff --git a/Source/appfat.h b/Source/appfat.h index 31187b7f..bab1a4c2 100644 --- a/Source/appfat.h +++ b/Source/appfat.h @@ -6,27 +6,27 @@ extern char sz_error_buf[256]; extern int terminating; // weak extern int cleanup_thread_id; // weak -char *__fastcall GetErrorStr(DWORD error_code); -void __fastcall TraceErrorDD(HRESULT hError, char *pszBuffer, DWORD dwMaxChars); -void __fastcall TraceErrorDS(HRESULT hError, char *pszBuffer, DWORD dwMaxChars); -char *__cdecl TraceLastError(); -void app_fatal(const char *pszFmt, ...); -void __fastcall MsgBox(const char *pszFmt, va_list va); -void __cdecl FreeDlg(); -void DrawDlg(char *pszFmt, ...); +char *GetErrorStr(DWORD error_code); +void TraceErrorDD(HRESULT hError, char *pszBuffer, DWORD dwMaxChars); +void TraceErrorDS(HRESULT hError, char *pszBuffer, DWORD dwMaxChars); +char *TraceLastError(); +void __cdecl app_fatal(const char *pszFmt, ...); +void MsgBox(const char *pszFmt, va_list va); +void FreeDlg(); +void __cdecl DrawDlg(char *pszFmt, ...); #ifdef _DEBUG -void __fastcall assert_fail(int nLineNo, const char *pszFile, const char *pszFail); +void assert_fail(int nLineNo, const char *pszFile, const char *pszFail); #endif -void __fastcall DDErrMsg(DWORD error_code, int log_line_nr, char *log_file_path); -void __fastcall DSErrMsg(DWORD error_code, int log_line_nr, char *log_file_path); -void __fastcall center_window(HWND hDlg); -void __fastcall ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr); +void DDErrMsg(DWORD error_code, int log_line_nr, char *log_file_path); +void DSErrMsg(DWORD error_code, int log_line_nr, char *log_file_path); +void center_window(HWND hDlg); +void ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr); BOOL __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, char *text); -void __fastcall TextDlg(HWND hDlg, char *text); -void __fastcall ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr); -void __fastcall FileErrDlg(const char *error); -void __fastcall DiskFreeDlg(char *error); -BOOL __cdecl InsertCDDlg(); -void __fastcall DirErrorDlg(char *error); +void TextDlg(HWND hDlg, char *text); +void ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr); +void FileErrDlg(const char *error); +void DiskFreeDlg(char *error); +BOOL InsertCDDlg(); +void DirErrorDlg(char *error); #endif /* __APPFAT_H__ */ diff --git a/Source/automap.cpp b/Source/automap.cpp index b5ab68b4..94224c6a 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -36,7 +36,7 @@ int AMPlayerY; // weak #define MAPFLAG_SQUARE 0x40 #define MAPFLAG_STAIRS 0x80 -void __cdecl InitAutomapOnce() +void InitAutomapOnce() { automapflag = FALSE; AutoMapScale = 50; @@ -47,7 +47,7 @@ void __cdecl InitAutomapOnce() AMPlayerY = 2; } -void __cdecl InitAutomap() +void InitAutomap() { unsigned char b1, b2; unsigned int dwTiles; @@ -108,38 +108,38 @@ void __cdecl InitAutomap() } } -void __cdecl StartAutomap() +void StartAutomap() { AutoMapXOfs = 0; AutoMapYOfs = 0; automapflag = TRUE; } -void __cdecl AutomapUp() +void AutomapUp() { --AutoMapXOfs; --AutoMapYOfs; } -void __cdecl AutomapDown() +void AutomapDown() { ++AutoMapXOfs; ++AutoMapYOfs; } -void __cdecl AutomapLeft() +void AutomapLeft() { --AutoMapXOfs; ++AutoMapYOfs; } -void __cdecl AutomapRight() +void AutomapRight() { ++AutoMapXOfs; --AutoMapYOfs; } -void __cdecl AutomapZoomIn() +void AutomapZoomIn() { if (AutoMapScale < 200) { AutoMapScale += 5; @@ -151,7 +151,7 @@ void __cdecl AutomapZoomIn() } } -void __cdecl AutomapZoomOut() +void AutomapZoomOut() { if (AutoMapScale > 50) { AutoMapScale -= 5; @@ -163,7 +163,7 @@ void __cdecl AutomapZoomOut() } } -void __cdecl DrawAutomap() +void DrawAutomap() { int cells; int sx, sy; @@ -251,7 +251,7 @@ void __cdecl DrawAutomap() // 69BD04: using guessed type int questlog; // 69CF0C: using guessed type int gpBufEnd; -void __fastcall DrawAutomapType(int sx, int sy, WORD automap_type) +void DrawAutomapType(int sx, int sy, WORD automap_type) { BOOL do_vert; BOOL do_horz; @@ -436,7 +436,7 @@ void __fastcall DrawAutomapType(int sx, int sy, WORD automap_type) } } -void __cdecl DrawAutomapPlr() +void DrawAutomapPlr() { int px, py; int x, y; @@ -507,7 +507,7 @@ void __cdecl DrawAutomapPlr() } } -WORD __fastcall GetAutomapType(int x, int y, BOOL view) +WORD GetAutomapType(int x, int y, BOOL view) { if (view) { if (x == -1 && y >= 0 && y < DMAXY && automapview[0][y]) @@ -533,7 +533,7 @@ WORD __fastcall GetAutomapType(int x, int y, BOOL view) return 0; } -void __cdecl DrawAutomapGame() +void DrawAutomapGame() { char desc[256]; int nextline = 20; @@ -556,7 +556,7 @@ void __cdecl DrawAutomapGame() } } -void __fastcall SetAutomapView(int x, int y) +void SetAutomapView(int x, int y) { WORD maptype, solid; int xx, yy; @@ -628,7 +628,7 @@ void __fastcall SetAutomapView(int x, int y) } } -void __cdecl AutomapZoomReset() +void AutomapZoomReset() { AutoMapXOfs = 0; AutoMapYOfs = 0; diff --git a/Source/automap.h b/Source/automap.h index 1231b160..5f7b6cb0 100644 --- a/Source/automap.h +++ b/Source/automap.h @@ -15,21 +15,21 @@ extern int AutoMapYPos; // weak extern int AMPlayerX; // weak extern int AMPlayerY; // weak -void __cdecl InitAutomapOnce(); -void __cdecl InitAutomap(); -void __cdecl StartAutomap(); -void __cdecl AutomapUp(); -void __cdecl AutomapDown(); -void __cdecl AutomapLeft(); -void __cdecl AutomapRight(); -void __cdecl AutomapZoomIn(); -void __cdecl AutomapZoomOut(); -void __cdecl DrawAutomap(); -void __fastcall DrawAutomapType(int screen_x, int screen_y, WORD automap_type); -void __cdecl DrawAutomapPlr(); -WORD __fastcall GetAutomapType(int x, int y, BOOL view); -void __cdecl DrawAutomapGame(); -void __fastcall SetAutomapView(int x, int y); -void __cdecl AutomapZoomReset(); +void InitAutomapOnce(); +void InitAutomap(); +void StartAutomap(); +void AutomapUp(); +void AutomapDown(); +void AutomapLeft(); +void AutomapRight(); +void AutomapZoomIn(); +void AutomapZoomOut(); +void DrawAutomap(); +void DrawAutomapType(int screen_x, int screen_y, WORD automap_type); +void DrawAutomapPlr(); +WORD GetAutomapType(int x, int y, BOOL view); +void DrawAutomapGame(); +void SetAutomapView(int x, int y); +void AutomapZoomReset(); #endif /* __AUTOMAP_H__ */ diff --git a/Source/capture.cpp b/Source/capture.cpp index 8997010c..bee7f1e8 100644 --- a/Source/capture.cpp +++ b/Source/capture.cpp @@ -2,7 +2,7 @@ #include "../types.h" -void __cdecl CaptureScreen() +void CaptureScreen() { HANDLE hObject; PALETTEENTRY palette[256]; @@ -42,7 +42,7 @@ void __cdecl CaptureScreen() } } -BOOL __fastcall CaptureHdr(HANDLE hFile, short width, short height) +BOOL CaptureHdr(HANDLE hFile, short width, short height) { DWORD lpNumBytes; PCXHeader Buffer; @@ -62,7 +62,7 @@ BOOL __fastcall CaptureHdr(HANDLE hFile, short width, short height) return WriteFile(hFile, &Buffer, sizeof(Buffer), &lpNumBytes, NULL) && lpNumBytes == sizeof(Buffer); } -BOOL __fastcall CapturePal(HANDLE hFile, PALETTEENTRY *palette) +BOOL CapturePal(HANDLE hFile, PALETTEENTRY *palette) { DWORD NumberOfBytesWritten; BYTE pcx_palette[769]; @@ -78,7 +78,7 @@ BOOL __fastcall CapturePal(HANDLE hFile, PALETTEENTRY *palette) return WriteFile(hFile, pcx_palette, 769, &NumberOfBytesWritten, 0) && NumberOfBytesWritten == 769; } -BOOL __fastcall CapturePix(HANDLE hFile, WORD width, WORD height, WORD stride, BYTE *pixels) +BOOL CapturePix(HANDLE hFile, WORD width, WORD height, WORD stride, BYTE *pixels) { int writeSize; DWORD lpNumBytes; @@ -98,7 +98,7 @@ BOOL __fastcall CapturePix(HANDLE hFile, WORD width, WORD height, WORD stride, B return TRUE; } -BYTE *__fastcall CaptureEnc(BYTE *src, BYTE *dst, int width) +BYTE *CaptureEnc(BYTE *src, BYTE *dst, int width) { int rleLength; @@ -132,7 +132,7 @@ BYTE *__fastcall CaptureEnc(BYTE *src, BYTE *dst, int width) return dst; } -HANDLE __fastcall CaptureFile(char *dst_path) +HANDLE CaptureFile(char *dst_path) { BOOLEAN num_used[100]; int free_num, hFind; @@ -160,7 +160,7 @@ HANDLE __fastcall CaptureFile(char *dst_path) return INVALID_HANDLE_VALUE; } -void __fastcall RedPalette(PALETTEENTRY *pal) +void RedPalette(PALETTEENTRY *pal) { PALETTEENTRY red[256]; int i; diff --git a/Source/capture.h b/Source/capture.h index 63e57e99..f284b613 100644 --- a/Source/capture.h +++ b/Source/capture.h @@ -2,12 +2,12 @@ #ifndef __CAPTURE_H__ #define __CAPTURE_H__ -void __cdecl CaptureScreen(); -BOOL __fastcall CaptureHdr(HANDLE hFile, short width, short height); -BOOL __fastcall CapturePal(HANDLE hFile, PALETTEENTRY *palette); -BOOL __fastcall CapturePix(HANDLE hFile, WORD width, WORD height, WORD stride, BYTE *pixels); -BYTE *__fastcall CaptureEnc(BYTE *src, BYTE *dst, int width); -HANDLE __fastcall CaptureFile(char *dst_path); -void __fastcall RedPalette(PALETTEENTRY *pal); +void CaptureScreen(); +BOOL CaptureHdr(HANDLE hFile, short width, short height); +BOOL CapturePal(HANDLE hFile, PALETTEENTRY *palette); +BOOL CapturePix(HANDLE hFile, WORD width, WORD height, WORD stride, BYTE *pixels); +BYTE *CaptureEnc(BYTE *src, BYTE *dst, int width); +HANDLE CaptureFile(char *dst_path); +void RedPalette(PALETTEENTRY *pal); #endif /* __CAPTURE_H__ */ diff --git a/Source/codec.cpp b/Source/codec.cpp index 4af11d51..b844f4c8 100644 --- a/Source/codec.cpp +++ b/Source/codec.cpp @@ -2,7 +2,7 @@ #include "../types.h" -int __fastcall codec_decode(void *pbSrcDst, int size, char *pszPassword) +int codec_decode(void *pbSrcDst, int size, char *pszPassword) { unsigned int v3; // ebx char *v4; // esi @@ -57,7 +57,7 @@ LABEL_14: } // 4034D9: using guessed type char var_98[128]; -void __fastcall codec_init_key(int unused, char *pszPassword) +void codec_init_key(int unused, char *pszPassword) { int i, ch, n; char key[136]; // last 64 bytes are the SHA1 @@ -96,14 +96,14 @@ void __fastcall codec_init_key(int unused, char *pszPassword) // 4035DB: using guessed type char var_58[64]; // 4035DB: using guessed type char dst[20]; -int __fastcall codec_get_encoded_len(int dwSrcBytes) +int codec_get_encoded_len(int dwSrcBytes) { if (dwSrcBytes & 0x3F) dwSrcBytes += 64 - (dwSrcBytes & 0x3F); return dwSrcBytes + 8; } -void __fastcall codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword) +void codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword) { char *v4; // esi char v5; // bl diff --git a/Source/codec.h b/Source/codec.h index 3d271fbb..c4e3003a 100644 --- a/Source/codec.h +++ b/Source/codec.h @@ -2,9 +2,9 @@ #ifndef __CODEC_H__ #define __CODEC_H__ -int __fastcall codec_decode(void *pbSrcDst, int size, char *pszPassword); -void __fastcall codec_init_key(int unused, char *pszPassword); -int __fastcall codec_get_encoded_len(int dwSrcBytes); -void __fastcall codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword); +int codec_decode(void *pbSrcDst, int size, char *pszPassword); +void codec_init_key(int unused, char *pszPassword); +int codec_get_encoded_len(int dwSrcBytes); +void codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword); #endif /* __CODEC_H__ */ diff --git a/Source/control.cpp b/Source/control.cpp index 5a0fcaec..e2fa6038 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -175,7 +175,7 @@ int SpellPages[6][7] = { { -1, -1, -1, -1, -1, -1, -1 } }; -void __fastcall DrawSpellCel(int xp, int yp, BYTE *Trans, int nCel, int w) +void DrawSpellCel(int xp, int yp, BYTE *Trans, int nCel, int w) { BYTE *dst, *tbl, *end; @@ -299,7 +299,7 @@ void __fastcall DrawSpellCel(int xp, int yp, BYTE *Trans, int nCel, int w) #endif } -void __fastcall SetSpellTrans(char t) +void SetSpellTrans(char t) { int i; @@ -356,7 +356,7 @@ void __fastcall SetSpellTrans(char t) } } -void __cdecl DrawSpell() +void DrawSpell() { int v0; // ebp char v1; // cl @@ -389,7 +389,7 @@ void __cdecl DrawSpell() DrawSpellCel(629, 631, (BYTE *)pSpellCels, (char)SpellITbl[v3], 56); } -void __cdecl DrawSpellList() +void DrawSpellList() { int v0; // esi signed int v1; // edi @@ -578,7 +578,7 @@ void __cdecl DrawSpellList() // 4B8834: using guessed type int pSpell; // 4B8954: using guessed type int pSplType; -void __cdecl SetSpell() +void SetSpell() { int v0; // eax @@ -596,7 +596,7 @@ void __cdecl SetSpell() // 4B8C98: using guessed type int spselflag; // 52571C: using guessed type int drawpanflag; -void __fastcall SetSpeedSpell(int slot) +void SetSpeedSpell(int slot) { int v1; // esi signed int v3; // ebp @@ -621,7 +621,7 @@ void __fastcall SetSpeedSpell(int slot) // 4B8834: using guessed type int pSpell; // 4B8954: using guessed type int pSplType; -void __fastcall ToggleSpell(int slot) +void ToggleSpell(int slot) { unsigned __int64 spells; @@ -652,7 +652,7 @@ void __fastcall ToggleSpell(int slot) } // 52571C: using guessed type int drawpanflag; -void __fastcall CPrintString(int nOffset, int nCel, char col) +void CPrintString(int nOffset, int nCel, char col) { /// ASSERT: assert(gpBuffer); @@ -944,7 +944,7 @@ void __fastcall CPrintString(int nOffset, int nCel, char col) #endif } -void __fastcall AddPanelString(char *str, BOOL just) +void AddPanelString(char *str, BOOL just) { strcpy(&panelstr[64 * pnumlines], str); pstrjust[pnumlines] = just; @@ -953,13 +953,13 @@ void __fastcall AddPanelString(char *str, BOOL just) pnumlines++; } -void __cdecl ClearPanel() +void ClearPanel() { pnumlines = 0; pinfoflag = FALSE; } -void __fastcall DrawPanelBox(int x, int y, int w, int h, int sx, int sy) +void DrawPanelBox(int x, int y, int w, int h, int sx, int sy) { int nSrcOff, nDstOff; @@ -1034,7 +1034,7 @@ void __fastcall DrawPanelBox(int x, int y, int w, int h, int sx, int sy) #endif } -void __fastcall SetFlaskHeight(BYTE *pCelBuff, int min, int max, int c, int r) +void SetFlaskHeight(BYTE *pCelBuff, int min, int max, int c, int r) { int nSrcOff, nDstOff, w; @@ -1069,7 +1069,7 @@ void __fastcall SetFlaskHeight(BYTE *pCelBuff, int min, int max, int c, int r) #endif } -void __fastcall DrawFlask(BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int nDstOff, int h) +void DrawFlask(BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int nDstOff, int h) { #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) __asm { @@ -1112,7 +1112,7 @@ void __fastcall DrawFlask(BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int n #endif } -void __cdecl DrawLifeFlask() +void DrawLifeFlask() { int filled = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; plr[myplr]._pHPPer = filled; @@ -1129,7 +1129,7 @@ void __cdecl DrawLifeFlask() DrawFlask(pBtmBuff, 640, 640 * filled + 2029, gpBuffer, 768 * filled + 768 * 499 + 173, 13 - filled); } -void __cdecl UpdateLifeFlask() +void UpdateLifeFlask() { int filled = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; plr[myplr]._pHPPer = filled; @@ -1144,7 +1144,7 @@ void __cdecl UpdateLifeFlask() DrawPanelBox(96, 85 - filled, 88, filled, 160, 581 - filled); } -void __cdecl DrawManaFlask() +void DrawManaFlask() { int filled = plr[myplr]._pManaPer; if (filled > 80) @@ -1159,7 +1159,7 @@ void __cdecl DrawManaFlask() DrawFlask(pBtmBuff, 640, 640 * filled + 2029 + 366, gpBuffer, 768 * filled + 768 * 499 + 173 + 366, 13 - filled); } -void __cdecl control_update_life_mana() +void control_update_life_mana() { int manaPer; int maxMana = plr[myplr]._pMaxMana; @@ -1176,7 +1176,7 @@ void __cdecl control_update_life_mana() plr[myplr]._pHPPer = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; } -void __cdecl UpdateManaFlask() +void UpdateManaFlask() { int filled; int maxMana = plr[myplr]._pMaxMana; @@ -1203,7 +1203,7 @@ void __cdecl UpdateManaFlask() DrawSpell(); } -void __cdecl InitControlPan() +void InitControlPan() { size_t v0; // esi void *v1; // ecx @@ -1302,14 +1302,14 @@ void __cdecl InitControlPan() // 4B8C98: using guessed type int spselflag; // 679660: using guessed type char gbMaxPlayers; -void __cdecl ClearCtrlPan() +void ClearCtrlPan() { DrawPanelBox(0, sgbPlrTalkTbl + 16, 640, 128, 64, 512); DrawInfoBox(); } // 4B8840: using guessed type int sgbPlrTalkTbl; -void __cdecl DrawCtrlPan() +void DrawCtrlPan() { signed int v0; // edi int *v1; // esi @@ -1339,7 +1339,7 @@ void __cdecl DrawCtrlPan() // 484368: using guessed type int FriendlyMode; // 4B8A7C: using guessed type int numpanbtns; -void __cdecl DoSpeedBook() +void DoSpeedBook() { unsigned __int64 spells, spell; int xo, yo, X, Y, i, j; @@ -1393,7 +1393,7 @@ void __cdecl DoSpeedBook() } // 4B8C98: using guessed type int spselflag; -void __cdecl DoPanBtn() +void DoPanBtn() { int v0; // edx int v1; // ebx @@ -1430,7 +1430,7 @@ void __cdecl DoPanBtn() // 4B8C90: using guessed type int panbtndown; // 4B8C98: using guessed type int spselflag; -void __fastcall control_set_button_down(int btn_id) +void control_set_button_down(int btn_id) { panbtn[btn_id] = 1; drawbtnflag = 1; @@ -1438,7 +1438,7 @@ void __fastcall control_set_button_down(int btn_id) } // 4B8C90: using guessed type int panbtndown; -void __cdecl control_check_btn_press() +void control_check_btn_press() { int v0; // edx int v1; // esi @@ -1459,7 +1459,7 @@ void __cdecl control_check_btn_press() } } -void __cdecl DoAutoMap() +void DoAutoMap() { if (currlevel || gbMaxPlayers != 1) { if (automapflag) @@ -1472,7 +1472,7 @@ void __cdecl DoAutoMap() } // 679660: using guessed type char gbMaxPlayers; -void __cdecl CheckPanelInfo() +void CheckPanelInfo() { int v0; // edi int v1; // eax @@ -1594,7 +1594,7 @@ void __cdecl CheckPanelInfo() // 4B8C98: using guessed type int spselflag; // 4B8CB8: using guessed type char pcursinvitem; -void __cdecl CheckBtnUp() +void CheckBtnUp() { signed int v0; // esi int *v1; // eax @@ -1679,7 +1679,7 @@ void __cdecl CheckBtnUp() // 646D00: using guessed type char qtextflag; // 69BD04: using guessed type int questlog; -void __cdecl FreeControlPan() +void FreeControlPan() { void *ptr; @@ -1733,7 +1733,7 @@ void __cdecl FreeControlPan() mem_free_dbg(ptr); } -int __fastcall control_WriteStringToBuffer(char *str) +int control_WriteStringToBuffer(char *str) { signed int v1; // edx unsigned char v2; // al @@ -1749,7 +1749,7 @@ int __fastcall control_WriteStringToBuffer(char *str) return 0; } -void __cdecl DrawInfoBox() +void DrawInfoBox() { int v0; // ecx int v1; // eax @@ -1857,7 +1857,7 @@ LABEL_33: // 4B8CC1: using guessed type char pcursobj; // 4B8CC2: using guessed type char pcursplr; -void __fastcall control_print_info_str(int y, char *str, BOOLEAN center, int lines) +void control_print_info_str(int y, char *str, BOOLEAN center, int lines) { int v4; // edi char *v5; // ebx @@ -1907,7 +1907,7 @@ void __fastcall control_print_info_str(int y, char *str, BOOLEAN center, int lin } // 4B883C: using guessed type int infoclr; -void __fastcall PrintGameStr(int x, int y, char *str, int color) +void PrintGameStr(int x, int y, char *str, int color) { char *v4; // edi int v5; // esi @@ -1925,7 +1925,7 @@ void __fastcall PrintGameStr(int x, int y, char *str, int color) } } -void __cdecl DrawChr() +void DrawChr() { int v1; // ecx int v2; // ecx @@ -2150,7 +2150,7 @@ void __cdecl DrawChr() ADD_PlrStringXY(143, 332, 174, a4, a5[0]); } -void __fastcall ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col) +void ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col) { int v5; // eax char *v6; // edx @@ -2196,7 +2196,7 @@ void __fastcall ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col) } } -void __fastcall MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base) +void MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base) { char *v6; // ebx unsigned char v7; // al @@ -2242,14 +2242,14 @@ void __fastcall MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, } } -void __cdecl CheckLvlBtn() +void CheckLvlBtn() { if (!lvlbtndown && MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335) lvlbtndown = 1; } // 4B851C: using guessed type int lvlbtndown; -void __cdecl ReleaseLvlBtn() +void ReleaseLvlBtn() { if (MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335) chrflag = 1; @@ -2257,7 +2257,7 @@ void __cdecl ReleaseLvlBtn() } // 4B851C: using guessed type int lvlbtndown; -void __cdecl DrawLevelUpIcon() +void DrawLevelUpIcon() { int v0; // esi @@ -2270,7 +2270,7 @@ void __cdecl DrawLevelUpIcon() // 4B851C: using guessed type int lvlbtndown; // 6AA705: using guessed type char stextflag; -void __cdecl CheckChrBtns() +void CheckChrBtns() { int pc, i; @@ -2308,7 +2308,7 @@ void __cdecl CheckChrBtns() } } -void __cdecl ReleaseChrBtns() +void ReleaseChrBtns() { signed int v0; // esi int *v1; // eax @@ -2355,7 +2355,7 @@ void __cdecl ReleaseChrBtns() } while (v0 < 4); } -void __cdecl DrawDurIcon() +void DrawDurIcon() { int v0; // edx PlayerStruct *v1; // esi @@ -2377,7 +2377,7 @@ void __cdecl DrawDurIcon() // 4B8968: using guessed type int sbookflag; // 69BD04: using guessed type int questlog; -int __fastcall DrawDurIcon4Item(ItemStruct *pItem, int x, int c) +int DrawDurIcon4Item(ItemStruct *pItem, int x, int c) { int v3; // eax int v4; // edi @@ -2436,7 +2436,7 @@ LABEL_18: return v4 - 40; } -void __cdecl RedBack() +void RedBack() { int idx; @@ -2513,7 +2513,7 @@ void __cdecl RedBack() } // 525728: using guessed type int light4flag; -char __fastcall GetSBookTrans(int ii, BOOL townok) +char GetSBookTrans(int ii, BOOL townok) { char result = RSPLTYPE_SPELL; if ((__int64)1 << (ii - 1) & plr[myplr]._pISpells) @@ -2534,7 +2534,7 @@ char __fastcall GetSBookTrans(int ii, BOOL townok) return result; } -void __cdecl DrawSpellBook() +void DrawSpellBook() { __int64 v0; // edi __int64 v1; // ebp @@ -2602,7 +2602,7 @@ void __cdecl DrawSpellBook() } // 4B8950: using guessed type int sbooktab; -void __fastcall PrintSBookStr(int x, int y, BOOLEAN cjustflag, char *pszStr, int bright) +void PrintSBookStr(int x, int y, BOOLEAN cjustflag, char *pszStr, int bright) { char *v5; // ebx signed int v6; // eax @@ -2649,7 +2649,7 @@ void __fastcall PrintSBookStr(int x, int y, BOOLEAN cjustflag, char *pszStr, int } } -void __cdecl CheckSBook() +void CheckSBook() { if (MouseX >= 331 && MouseX < 368 && MouseY >= 18 && MouseY < 314) { int spell = SpellPages[sbooktab][(MouseY - 18) / 43]; @@ -2672,7 +2672,7 @@ void __cdecl CheckSBook() // 4B8950: using guessed type int sbooktab; // 52571C: using guessed type int drawpanflag; -char *__fastcall get_pieces_str(int nGold) +char *get_pieces_str(int nGold) { char *result; // eax @@ -2682,7 +2682,7 @@ char *__fastcall get_pieces_str(int nGold) return result; } -void __fastcall DrawGoldSplit(int amount) +void DrawGoldSplit(int amount) { int v1; // ebp char *v2; // eax @@ -2716,7 +2716,7 @@ void __fastcall DrawGoldSplit(int amount) frame_4B8800 = (frame_4B8800 & 7) + 1; } -void __fastcall control_drop_gold(char vkey) +void control_drop_gold(char vkey) { char v1; // bl int v2; // eax @@ -2766,7 +2766,7 @@ void __fastcall control_drop_gold(char vkey) } // 406C40: using guessed type char var_8[8]; -void __fastcall control_remove_gold(int pnum, int gold_index) +void control_remove_gold(int pnum, int gold_index) { int v2; // edi int v3; // esi @@ -2805,7 +2805,7 @@ void __fastcall control_remove_gold(int pnum, int gold_index) plr[v3]._pGold = v8; } -void __fastcall control_set_gold_curs(int pnum) +void control_set_gold_curs(int pnum) { if (plr[pnum].HoldItem._ivalue >= 2500) { plr[pnum].HoldItem._iCurs = ICURS_GOLD_LARGE; @@ -2818,7 +2818,7 @@ void __fastcall control_set_gold_curs(int pnum) SetCursor_(plr[pnum].HoldItem._iCurs + CURSOR_FIRSTITEM); } -void __cdecl DrawTalkPan() +void DrawTalkPan() { int v0; // esi signed int v1; // edi @@ -2894,7 +2894,7 @@ void __cdecl DrawTalkPan() // 4B8840: using guessed type int sgbPlrTalkTbl; // 4B8960: using guessed type int talkflag; -char *__fastcall control_print_talk_msg(char *msg, int x, int y, int *a4, int just) +char *control_print_talk_msg(char *msg, int x, int y, int *a4, int just) { int v5; // edx char *v6; // ebx @@ -2929,7 +2929,7 @@ char *__fastcall control_print_talk_msg(char *msg, int x, int y, int *a4, int ju return v6; } -int __cdecl control_check_talk_btn() +int control_check_talk_btn() { int v0; // ecx int result; // eax @@ -2953,7 +2953,7 @@ int __cdecl control_check_talk_btn() } // 4B8960: using guessed type int talkflag; -void __cdecl control_release_talk_btn() +void control_release_talk_btn() { signed int v0; // ecx int v1; // eax @@ -2981,7 +2981,7 @@ void __cdecl control_release_talk_btn() } // 4B8960: using guessed type int talkflag; -void __cdecl control_reset_talk_msg() +void control_reset_talk_msg() { signed int v1; // ecx @@ -2996,7 +2996,7 @@ void __cdecl control_reset_talk_msg() NetSendCmdString(v0, sgszTalkMsg); } -void __cdecl control_type_message() +void control_type_message() { if (gbMaxPlayers != 1) { sgszTalkMsg[0] = 0; @@ -3017,7 +3017,7 @@ void __cdecl control_type_message() // 52571C: using guessed type int drawpanflag; // 679660: using guessed type char gbMaxPlayers; -void __cdecl control_reset_talk() +void control_reset_talk() { talkflag = 0; sgbPlrTalkTbl = 0; @@ -3027,7 +3027,7 @@ void __cdecl control_reset_talk() // 4B8960: using guessed type int talkflag; // 52571C: using guessed type int drawpanflag; -int __fastcall control_talk_last_key(int a1) +int control_talk_last_key(int a1) { char v1; // bl signed int v3; // eax @@ -3045,7 +3045,7 @@ int __fastcall control_talk_last_key(int a1) // 4B8960: using guessed type int talkflag; // 679660: using guessed type char gbMaxPlayers; -int __fastcall control_presskeys(int a1) +int control_presskeys(int a1) { signed int v1; // eax char v2; // cl @@ -3080,7 +3080,7 @@ int __fastcall control_presskeys(int a1) // 4B8960: using guessed type int talkflag; // 679660: using guessed type char gbMaxPlayers; -void __cdecl control_press_enter() +void control_press_enter() { signed int v0; // esi char(*v1)[80]; // ebp @@ -3120,7 +3120,7 @@ void __cdecl control_press_enter() // 4B84CC: using guessed type char sgbNextTalkSave; // 4B84CD: using guessed type char sgbTalkSavePos; -void __fastcall control_up_down(char a1) +void control_up_down(char a1) { unsigned char v1; // al int v2; // esi diff --git a/Source/control.h b/Source/control.h index 1fb736e5..e3fe0753 100644 --- a/Source/control.h +++ b/Source/control.h @@ -53,71 +53,71 @@ extern int panbtndown; // weak extern void *pTalkPanel; // idb extern int spselflag; // weak -void __fastcall DrawSpellCel(int xp, int yp, BYTE *Trans, int nCel, int w); -void __fastcall SetSpellTrans(char t); -void __cdecl DrawSpell(); -void __cdecl DrawSpellList(); -void __cdecl SetSpell(); -void __fastcall SetSpeedSpell(int slot); -void __fastcall ToggleSpell(int slot); -void __fastcall CPrintString(int nOffset, int nCel, char col); -void __fastcall AddPanelString(char *str, BOOL just); -void __cdecl ClearPanel(); -void __fastcall DrawPanelBox(int x, int y, int w, int h, int sx, int sy); -void __cdecl InitPanelStr(); -void __fastcall SetFlaskHeight(BYTE *pCelBuff, int min, int max, int c, int r); -void __fastcall DrawFlask(BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int nDstOff, int h); -void __cdecl DrawLifeFlask(); -void __cdecl UpdateLifeFlask(); -void __cdecl DrawManaFlask(); -void __cdecl control_update_life_mana(); -void __cdecl UpdateManaFlask(); -void __cdecl InitControlPan(); -void __cdecl ClearCtrlPan(); -void __cdecl DrawCtrlPan(); -void __cdecl DoSpeedBook(); -void __cdecl DoPanBtn(); -void __fastcall control_set_button_down(int btn_id); -void __cdecl control_check_btn_press(); -void __cdecl DoAutoMap(); -void __cdecl CheckPanelInfo(); -void __cdecl CheckBtnUp(); -void __cdecl FreeControlPan(); -int __fastcall control_WriteStringToBuffer(char *str); -void __cdecl DrawInfoBox(); -void __fastcall control_print_info_str(int y, char *str, BOOLEAN center, int lines); -void __fastcall PrintGameStr(int x, int y, char *str, int color); -void __cdecl DrawChr(); -void __fastcall ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col); -void __fastcall MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base); -void __cdecl CheckLvlBtn(); -void __cdecl ReleaseLvlBtn(); -void __cdecl DrawLevelUpIcon(); -void __cdecl CheckChrBtns(); -void __cdecl ReleaseChrBtns(); -void __cdecl DrawDurIcon(); -int __fastcall DrawDurIcon4Item(ItemStruct *pItem, int x, int c); -void __cdecl RedBack(); -char __fastcall GetSBookTrans(int ii, BOOL townok); -void __cdecl DrawSpellBook(); -void __fastcall PrintSBookStr(int x, int y, BOOLEAN cjustflag, char *pszStr, int bright); -void __cdecl CheckSBook(); -char *__fastcall get_pieces_str(int nGold); -void __fastcall DrawGoldSplit(int amount); -void __fastcall control_drop_gold(char vkey); -void __fastcall control_remove_gold(int pnum, int gold_index); -void __fastcall control_set_gold_curs(int pnum); -void __cdecl DrawTalkPan(); -char *__fastcall control_print_talk_msg(char *msg, int x, int y, int *a4, int just); -int __cdecl control_check_talk_btn(); -void __cdecl control_release_talk_btn(); -void __cdecl control_reset_talk_msg(); -void __cdecl control_type_message(); -void __cdecl control_reset_talk(); -int __fastcall control_talk_last_key(int a1); -int __fastcall control_presskeys(int a1); -void __cdecl control_press_enter(); -void __fastcall control_up_down(char a1); +void DrawSpellCel(int xp, int yp, BYTE *Trans, int nCel, int w); +void SetSpellTrans(char t); +void DrawSpell(); +void DrawSpellList(); +void SetSpell(); +void SetSpeedSpell(int slot); +void ToggleSpell(int slot); +void CPrintString(int nOffset, int nCel, char col); +void AddPanelString(char *str, BOOL just); +void ClearPanel(); +void DrawPanelBox(int x, int y, int w, int h, int sx, int sy); +void InitPanelStr(); +void SetFlaskHeight(BYTE *pCelBuff, int min, int max, int c, int r); +void DrawFlask(BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int nDstOff, int h); +void DrawLifeFlask(); +void UpdateLifeFlask(); +void DrawManaFlask(); +void control_update_life_mana(); +void UpdateManaFlask(); +void InitControlPan(); +void ClearCtrlPan(); +void DrawCtrlPan(); +void DoSpeedBook(); +void DoPanBtn(); +void control_set_button_down(int btn_id); +void control_check_btn_press(); +void DoAutoMap(); +void CheckPanelInfo(); +void CheckBtnUp(); +void FreeControlPan(); +int control_WriteStringToBuffer(char *str); +void DrawInfoBox(); +void control_print_info_str(int y, char *str, BOOLEAN center, int lines); +void PrintGameStr(int x, int y, char *str, int color); +void DrawChr(); +void ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col); +void MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base); +void CheckLvlBtn(); +void ReleaseLvlBtn(); +void DrawLevelUpIcon(); +void CheckChrBtns(); +void ReleaseChrBtns(); +void DrawDurIcon(); +int DrawDurIcon4Item(ItemStruct *pItem, int x, int c); +void RedBack(); +char GetSBookTrans(int ii, BOOL townok); +void DrawSpellBook(); +void PrintSBookStr(int x, int y, BOOLEAN cjustflag, char *pszStr, int bright); +void CheckSBook(); +char *get_pieces_str(int nGold); +void DrawGoldSplit(int amount); +void control_drop_gold(char vkey); +void control_remove_gold(int pnum, int gold_index); +void control_set_gold_curs(int pnum); +void DrawTalkPan(); +char *control_print_talk_msg(char *msg, int x, int y, int *a4, int just); +int control_check_talk_btn(); +void control_release_talk_btn(); +void control_reset_talk_msg(); +void control_type_message(); +void control_reset_talk(); +int control_talk_last_key(int a1); +int control_presskeys(int a1); +void control_press_enter(); +void control_up_down(char a1); /* rdata */ extern const unsigned char fontframe[127]; diff --git a/Source/cursor.cpp b/Source/cursor.cpp index efc41661..dd032bb6 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -68,14 +68,14 @@ const int InvItemHeight[180] = { 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28 }; -void __cdecl InitCursor() +void InitCursor() { /// ASSERT: assert(! pCursCels); pCursCels = LoadFileInMem("Data\\Inv\\Objcurs.CEL", 0); ClearCursor(); } -void __cdecl FreeCursor() +void FreeCursor() { void *p; @@ -86,7 +86,7 @@ void __cdecl FreeCursor() ClearCursor(); } -void __fastcall SetICursor(int i) +void SetICursor(int i) { icursW = InvItemWidth[i]; icursH = InvItemHeight[i]; @@ -96,7 +96,7 @@ void __fastcall SetICursor(int i) // 4B8CB4: using guessed type int icursH; // 4B8CBC: using guessed type int icursW; -void __fastcall SetCursor_(int i) +void SetCursor_(int i) { pcurs = i; cursW = InvItemWidth[i]; @@ -105,12 +105,12 @@ void __fastcall SetCursor_(int i) } // 4B8C9C: using guessed type int cursH; -void __fastcall NewCursor(int i) +void NewCursor(int i) { SetCursor_(i); } -void __cdecl InitLevelCursor() +void InitLevelCursor() { SetCursor_(CURSOR_HAND); cursmx = ViewX; @@ -127,7 +127,7 @@ void __cdecl InitLevelCursor() // 4B8CC2: using guessed type char pcursplr; // 4B8CCC: using guessed type int dword_4B8CCC; -void __cdecl CheckTown() +void CheckTown() { int i, mx; @@ -153,7 +153,7 @@ void __cdecl CheckTown() } } -void __cdecl CheckRportal() +void CheckRportal() { int i, mx; @@ -183,7 +183,7 @@ void __cdecl CheckRportal() } // 5CF31D: using guessed type char setlevel; -void __cdecl CheckCursMove() +void CheckCursMove() { int mos_x; // esi MAPDST int mos_y; // edi MAPDST diff --git a/Source/cursor.h b/Source/cursor.h index 7cddd567..2787a698 100644 --- a/Source/cursor.h +++ b/Source/cursor.h @@ -19,15 +19,15 @@ extern int cursmy; extern int dword_4B8CCC; // weak extern int pcurs; // idb -void __cdecl InitCursor(); -void __cdecl FreeCursor(); -void __fastcall SetICursor(int i); -void __fastcall SetCursor_(int i); -void __fastcall NewCursor(int i); -void __cdecl InitLevelCursor(); -void __cdecl CheckTown(); -void __cdecl CheckRportal(); -void __cdecl CheckCursMove(); +void InitCursor(); +void FreeCursor(); +void SetICursor(int i); +void SetCursor_(int i); +void NewCursor(int i); +void InitLevelCursor(); +void CheckTown(); +void CheckRportal(); +void CheckCursMove(); /* rdata */ extern const int InvItemWidth[180]; diff --git a/Source/dead.cpp b/Source/dead.cpp index 068642a3..dcc69bcb 100644 --- a/Source/dead.cpp +++ b/Source/dead.cpp @@ -7,7 +7,7 @@ int spurtndx; DeadStruct dead[MAXDEAD]; int stonendx; -void __cdecl InitDead() +void InitDead() { int mtypes[MAXMONSTERS]; int i; @@ -69,12 +69,12 @@ void __cdecl InitDead() /// ASSERT: assert(nd <= MAXDEAD); } -void __fastcall AddDead(int dx, int dy, char dv, int ddir) +void AddDead(int dx, int dy, char dv, int ddir) { dDead[dx][dy] = (dv & 0x1F) + (ddir << 5); } -void __cdecl SetDead() +void SetDead() { int mi; int i; diff --git a/Source/dead.h b/Source/dead.h index cc482e1a..df8caaca 100644 --- a/Source/dead.h +++ b/Source/dead.h @@ -6,8 +6,8 @@ extern int spurtndx; // weak extern DeadStruct dead[MAXDEAD]; extern int stonendx; -void __cdecl InitDead(); -void __fastcall AddDead(int dx, int dy, char dv, int ddir); -void __cdecl SetDead(); +void InitDead(); +void AddDead(int dx, int dy, char dv, int ddir); +void SetDead(); #endif /* __DEAD_H__ */ diff --git a/Source/debug.cpp b/Source/debug.cpp index f9a59175..08274a6e 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -6,21 +6,21 @@ void *pSquareCel; char dMonsDbg[NUMLEVELS][MAXDUNX][MAXDUNY]; char dFlagDbg[NUMLEVELS][MAXDUNX][MAXDUNY]; -void __cdecl LoadDebugGFX() +void LoadDebugGFX() { if (visiondebug) pSquareCel = LoadFileInMem("Data\\Square.CEL", 0); } // 525720: using guessed type int visiondebug; -void __cdecl FreeDebugGFX() +void FreeDebugGFX() { void *temp = pSquareCel; pSquareCel = NULL; mem_free_dbg(temp); } -void __cdecl CheckDungeonClear() +void CheckDungeonClear() { int i; int j; @@ -39,7 +39,7 @@ void __cdecl CheckDungeonClear() } #ifdef _DEBUG -void __cdecl GiveGoldCheat() +void GiveGoldCheat() { int i; // esi int ni; // ebp @@ -57,7 +57,7 @@ void __cdecl GiveGoldCheat() } } -void __cdecl StoresCheat() +void StoresCheat() { int i; // eax @@ -74,7 +74,7 @@ void __cdecl StoresCheat() SpawnWitch(30); } -void __cdecl TakeGoldCheat() +void TakeGoldCheat() { int i; // esi char ig; // cl @@ -93,7 +93,7 @@ void __cdecl TakeGoldCheat() plr[myplr]._pGold = 0; } -void __cdecl MaxSpellsCheat() +void MaxSpellsCheat() { int i; @@ -105,13 +105,13 @@ void __cdecl MaxSpellsCheat() } } -void __fastcall SetSpellLevelCheat(char spl, int spllvl) +void SetSpellLevelCheat(char spl, int spllvl) { plr[myplr]._pMemSpells |= (__int64)1 << (spl - 1); plr[myplr]._pSplLvl[spl] = spllvl; } -void __cdecl SetAllSpellsCheat() +void SetAllSpellsCheat() { SetSpellLevelCheat(SPL_FIREBOLT, 8); SetSpellLevelCheat(SPL_CBOLT, 11); @@ -137,7 +137,7 @@ void __cdecl SetAllSpellsCheat() SetSpellLevelCheat(SPL_BONESPIRIT, 1); } -void __fastcall PrintDebugPlayer(BOOLEAN bNextPlayer) +void PrintDebugPlayer(BOOLEAN bNextPlayer) { char dstr[128]; // [esp+Ch] [ebp-80h] @@ -161,7 +161,7 @@ void __fastcall PrintDebugPlayer(BOOLEAN bNextPlayer) } } -void __cdecl PrintDebugQuest() +void PrintDebugQuest() { char dstr[128]; // [esp+0h] [ebp-80h] @@ -171,7 +171,7 @@ void __cdecl PrintDebugQuest() dbgqst = 0; } -void __fastcall PrintDebugMonster(int m) +void PrintDebugMonster(int m) { BOOLEAN bActive; // ecx int i; // eax @@ -197,7 +197,7 @@ void __fastcall PrintDebugMonster(int m) NetSendCmdString(1 << myplr, dstr); } -void __cdecl GetDebugMonster() +void GetDebugMonster() { int v0; // ecx int v1; // eax @@ -216,7 +216,7 @@ void __cdecl GetDebugMonster() PrintDebugMonster(v0); } -void __cdecl NextDebugMonster() +void NextDebugMonster() { char dstr[128]; // [esp+0h] [ebp-80h] diff --git a/Source/debug.h b/Source/debug.h index 0ebfc564..6f974348 100644 --- a/Source/debug.h +++ b/Source/debug.h @@ -6,21 +6,21 @@ extern void *pSquareCel; extern char dMonsDbg[NUMLEVELS][MAXDUNX][MAXDUNY]; extern char dFlagDbg[NUMLEVELS][MAXDUNX][MAXDUNY]; -void __cdecl LoadDebugGFX(); -void __cdecl FreeDebugGFX(); -void __cdecl CheckDungeonClear(); +void LoadDebugGFX(); +void FreeDebugGFX(); +void CheckDungeonClear(); #ifdef _DEBUG -void __cdecl GiveGoldCheat(); -void __cdecl StoresCheat(); -void __cdecl TakeGoldCheat(); -void __cdecl MaxSpellsCheat(); -void __fastcall SetSpellLevelCheat(char spl, int spllvl); -void __cdecl SetAllSpellsCheat(); -void __fastcall PrintDebugPlayer(BOOLEAN bNextPlayer); -void __cdecl PrintDebugQuest(); -void __fastcall PrintDebugMonster(int m); -void __cdecl GetDebugMonster(); -void __cdecl NextDebugMonster(); +void GiveGoldCheat(); +void StoresCheat(); +void TakeGoldCheat(); +void MaxSpellsCheat(); +void SetSpellLevelCheat(char spl, int spllvl); +void SetAllSpellsCheat(); +void PrintDebugPlayer(BOOLEAN bNextPlayer); +void PrintDebugQuest(); +void PrintDebugMonster(int m); +void GetDebugMonster(); +void NextDebugMonster(); #endif #endif /* __DEBUG_H__ */ diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 3b5e69dd..198dbee2 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -64,7 +64,7 @@ char *spszMsgTbl[4] = { }; // weak char *spszMsgKeyTbl[4] = { "F9", "F10", "F11", "F12" }; // weak -void __cdecl FreeGameMem() +void FreeGameMem() { music_stop(); @@ -81,7 +81,7 @@ void __cdecl FreeGameMem() FreeTownerGFX(); } -BOOL __fastcall StartGame(BOOL bNewGame, BOOL bSinglePlayer) +BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer) { BOOL fExitProgram; unsigned int uMsg; @@ -120,7 +120,7 @@ BOOL __fastcall StartGame(BOOL bNewGame, BOOL bSinglePlayer) } // 678640: using guessed type char byte_678640; -void __fastcall run_game_loop(unsigned int uMsg) +void run_game_loop(unsigned int uMsg) { //int v3; // eax BOOLEAN v5; // zf @@ -194,7 +194,7 @@ void __fastcall run_game_loop(unsigned int uMsg) // 52571C: using guessed type int drawpanflag; // 679660: using guessed type char gbMaxPlayers; -void __fastcall start_game(unsigned int uMsg) +void start_game(unsigned int uMsg) { cineflag = FALSE; zoomflag = 1; @@ -213,7 +213,7 @@ void __fastcall start_game(unsigned int uMsg) // 525718: using guessed type char cineflag; // 525748: using guessed type char sgbMouseDown; -void __cdecl free_game() +void free_game() { int i; // esi @@ -233,7 +233,7 @@ void __cdecl free_game() FreeGameMem(); } -BOOL __cdecl diablo_get_not_running() +BOOL diablo_get_not_running() { SetLastError(0); CreateEvent(NULL, FALSE, FALSE, "DiabloEvent"); @@ -313,7 +313,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi return FALSE; } -void __fastcall diablo_parse_flags(char *args) +void diablo_parse_flags(char *args) { #ifdef _DEBUG int n; // edi @@ -427,7 +427,7 @@ void __fastcall diablo_parse_flags(char *args) // 52A548: using guessed type char gbBackBuf; // 52A549: using guessed type char gbEmulate; -void __cdecl diablo_init_screen() +void diablo_init_screen() { int i; @@ -445,7 +445,7 @@ void __cdecl diablo_init_screen() ClrDiabloMsg(); } -BOOL __fastcall diablo_find_window(LPCSTR lpClassName) +BOOL diablo_find_window(LPCSTR lpClassName) { HWND result; // eax HWND v2; // esi @@ -468,7 +468,7 @@ BOOL __fastcall diablo_find_window(LPCSTR lpClassName) return 1; } -void __fastcall diablo_reload_process(HMODULE hModule) +void diablo_reload_process(HMODULE hModule) { char *i; // eax DWORD dwSize; // esi @@ -545,7 +545,7 @@ void __fastcall diablo_reload_process(HMODULE hModule) } } -BOOL __cdecl PressEscKey() +BOOL PressEscKey() { BOOL rv = FALSE; @@ -741,7 +741,7 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) // 525748: using guessed type char sgbMouseDown; // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall LeftMouseDown(int wParam) +BOOL LeftMouseDown(int wParam) { if (gmenu_left_mouse(1) || control_check_talk_btn() || sgnTimeoutCurs) return 0; @@ -825,7 +825,7 @@ BOOL __fastcall LeftMouseDown(int wParam) // 69BD04: using guessed type int questlog; // 6AA705: using guessed type char stextflag; -BOOL __fastcall LeftMouseCmd(BOOL bShift) +BOOL LeftMouseCmd(BOOL bShift) { BOOL bNear; @@ -878,7 +878,7 @@ BOOL __fastcall LeftMouseCmd(BOOL bShift) return FALSE; } -BOOL __cdecl TryIconCurs() +BOOL TryIconCurs() { if(pcurs == CURSOR_RESURRECT) { NetSendCmdParam1(TRUE, CMD_RESURRECT, pcursplr); @@ -931,7 +931,7 @@ BOOL __cdecl TryIconCurs() // 4B8CC1: using guessed type char pcursobj; // 4B8CC2: using guessed type char pcursplr; -void __cdecl LeftMouseUp() +void LeftMouseUp() { gmenu_left_mouse(0); control_release_talk_btn(); @@ -948,7 +948,7 @@ void __cdecl LeftMouseUp() // 4B8C90: using guessed type int panbtndown; // 6AA705: using guessed type char stextflag; -void __cdecl RightMouseDown() +void RightMouseDown() { if (!gmenu_exception() && sgnTimeoutCurs == CURSOR_NONE && PauseMode != 2 && !plr[myplr]._pInvincible) { if (doomflag) { @@ -977,7 +977,7 @@ void __cdecl RightMouseDown() // 52575C: using guessed type int doomflag; // 6AA705: using guessed type char stextflag; -BOOL __fastcall PressSysKey(int wParam) +BOOL PressSysKey(int wParam) { if (gmenu_exception() || wParam != VK_F10) return FALSE; @@ -985,7 +985,7 @@ BOOL __fastcall PressSysKey(int wParam) return TRUE; } -void __fastcall diablo_hotkey_msg(int dwMsg) +void diablo_hotkey_msg(int dwMsg) { char Filename[MAX_PATH]; char ReturnedString[MAX_SEND_STR_LEN]; @@ -1006,13 +1006,13 @@ void __fastcall diablo_hotkey_msg(int dwMsg) // 48437C: using guessed type char *spszMsgKeyTbl[4]; // 679660: using guessed type char gbMaxPlayers; -void __fastcall ReleaseKey(int vkey) +void ReleaseKey(int vkey) { if (vkey == VK_SNAPSHOT) CaptureScreen(); } -void __fastcall PressKey(int vkey) +void PressKey(int vkey) { if(gmenu_presskeys(vkey) || control_presskeys(vkey)) { return; @@ -1219,7 +1219,7 @@ void __fastcall PressKey(int vkey) // 69BD04: using guessed type int questlog; // 6AA705: using guessed type char stextflag; -void __cdecl diablo_pause_game() +void diablo_pause_game() { if ((unsigned char)gbMaxPlayers <= 1u) { if (PauseMode) { @@ -1236,7 +1236,7 @@ void __cdecl diablo_pause_game() // 525740: using guessed type int PauseMode; // 679660: using guessed type char gbMaxPlayers; -void __fastcall PressChar(int vkey) +void PressChar(int vkey) { if(gmenu_exception() || control_talk_last_key(vkey) || sgnTimeoutCurs != 0 || deathflag) { return; @@ -1508,7 +1508,7 @@ void __fastcall PressChar(int vkey) // 69BD04: using guessed type int questlog; // 6AA705: using guessed type char stextflag; -void __cdecl LoadLvlGFX() +void LoadLvlGFX() { switch (leveltype) { case DTYPE_TOWN: @@ -1547,7 +1547,7 @@ void __cdecl LoadLvlGFX() } } -void __cdecl LoadAllGFX() +void LoadAllGFX() { pSpeedCels = DiabloAllocPtr(0x100000); IncProgress(); @@ -1558,7 +1558,7 @@ void __cdecl LoadAllGFX() IncProgress(); } -void __fastcall CreateLevel(int lvldir) +void CreateLevel(int lvldir) { int hnd; // cl @@ -1600,7 +1600,7 @@ void __fastcall CreateLevel(int lvldir) LoadRndLvlPal(hnd); } -void __fastcall LoadGameLevel(BOOL firstflag, int lvldir) +void LoadGameLevel(BOOL firstflag, int lvldir) { int i, j; BOOL visited; @@ -1817,7 +1817,7 @@ void __fastcall LoadGameLevel(BOOL firstflag, int lvldir) // 5CF31D: using guessed type char setlevel; // 679660: using guessed type char gbMaxPlayers; -void __fastcall game_loop(BOOL bStartup) +void game_loop(BOOL bStartup) { int i; @@ -1837,7 +1837,7 @@ void __fastcall game_loop(BOOL bStartup) } // 679660: using guessed type char gbMaxPlayers; -void __cdecl game_logic() +void game_logic() { if (PauseMode != 2) { if (PauseMode == 1) @@ -1883,7 +1883,7 @@ void __cdecl game_logic() // 525740: using guessed type int PauseMode; // 679660: using guessed type char gbMaxPlayers; -void __fastcall timeout_cursor(BOOL bTimeout) +void timeout_cursor(BOOL bTimeout) { if (bTimeout) { if (sgnTimeoutCurs == CURSOR_NONE && !sgbMouseDown) { @@ -1906,7 +1906,7 @@ void __fastcall timeout_cursor(BOOL bTimeout) // 52571C: using guessed type int drawpanflag; // 525748: using guessed type char sgbMouseDown; -void __cdecl diablo_color_cyc_logic() +void diablo_color_cyc_logic() { DWORD v0; // eax diff --git a/Source/diablo.h b/Source/diablo.h index 744b9bb8..c4815d4a 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -33,40 +33,40 @@ extern int PauseMode; // weak extern char sgbMouseDown; // weak extern int color_cycle_timer; // weak -void __cdecl FreeGameMem(); -BOOL __fastcall StartGame(BOOL bNewGame, BOOL bSinglePlayer); -void __fastcall run_game_loop(unsigned int uMsg); -void __fastcall start_game(unsigned int uMsg); -void __cdecl free_game(); -BOOL __cdecl diablo_get_not_running(); +void FreeGameMem(); +BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer); +void run_game_loop(unsigned int uMsg); +void start_game(unsigned int uMsg); +void free_game(); +BOOL diablo_get_not_running(); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow); -void __fastcall diablo_parse_flags(char *args); -void __cdecl diablo_init_screen(); -BOOL __fastcall diablo_find_window(LPCSTR lpClassName); -void __fastcall diablo_reload_process(HMODULE hModule); -BOOL __cdecl PressEscKey(); +void diablo_parse_flags(char *args); +void diablo_init_screen(); +BOOL diablo_find_window(LPCSTR lpClassName); +void diablo_reload_process(HMODULE hModule); +BOOL PressEscKey(); LRESULT CALLBACK DisableInputWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -BOOL __fastcall LeftMouseDown(int wParam); -BOOL __fastcall LeftMouseCmd(BOOL bShift); -BOOL __cdecl TryIconCurs(); -void __cdecl LeftMouseUp(); -void __cdecl RightMouseDown(); -void __fastcall j_gmenu_on_mouse_move(LPARAM lParam); -BOOL __fastcall PressSysKey(int wParam); -void __fastcall diablo_hotkey_msg(int dwMsg); -void __fastcall ReleaseKey(int vkey); -void __fastcall PressKey(int vkey); -void __cdecl diablo_pause_game(); -void __fastcall PressChar(int vkey); -void __cdecl LoadLvlGFX(); -void __cdecl LoadAllGFX(); -void __fastcall CreateLevel(int lvldir); -void __fastcall LoadGameLevel(BOOL firstflag, int lvldir); -void __fastcall game_loop(BOOL bStartup); -void __cdecl game_logic(); -void __fastcall timeout_cursor(BOOL bTimeout); -void __cdecl diablo_color_cyc_logic(); +BOOL LeftMouseDown(int wParam); +BOOL LeftMouseCmd(BOOL bShift); +BOOL TryIconCurs(); +void LeftMouseUp(); +void RightMouseDown(); +void j_gmenu_on_mouse_move(LPARAM lParam); +BOOL PressSysKey(int wParam); +void diablo_hotkey_msg(int dwMsg); +void ReleaseKey(int vkey); +void PressKey(int vkey); +void diablo_pause_game(); +void PressChar(int vkey); +void LoadLvlGFX(); +void LoadAllGFX(); +void CreateLevel(int lvldir); +void LoadGameLevel(BOOL firstflag, int lvldir); +void game_loop(BOOL bStartup); +void game_logic(); +void timeout_cursor(BOOL bTimeout); +void diablo_color_cyc_logic(); /* data */ diff --git a/Source/doom.cpp b/Source/doom.cpp index eacaf41f..3fd72925 100644 --- a/Source/doom.cpp +++ b/Source/doom.cpp @@ -9,14 +9,14 @@ BOOL doomflag; int DoomQuestState; /* -void __cdecl doom_reset_state() +void doom_reset_state() { if (DoomQuestState <= 0) { DoomQuestState = 0; } } -void __cdecl doom_play_movie() +void doom_play_movie() { if (DoomQuestState < 36001) { DoomQuestState++; @@ -28,7 +28,7 @@ void __cdecl doom_play_movie() } */ -int __cdecl doom_get_frame_from_time() +int doom_get_frame_from_time() { if (DoomQuestState == 36001) { return 31; @@ -37,19 +37,19 @@ int __cdecl doom_get_frame_from_time() return DoomQuestState / 1200; } -void __cdecl doom_alloc_cel() +void doom_alloc_cel() { pDoomCel = DiabloAllocPtr(229376); } -void __cdecl doom_cleanup() +void doom_cleanup() { void *ptr = pDoomCel; pDoomCel = NULL; mem_free_dbg(ptr); } -void __cdecl doom_load_graphics() +void doom_load_graphics() { if (doom_quest_time == 31) { strcpy(tempstr, "Items\\Map\\MapZDoom.CEL"); @@ -61,7 +61,7 @@ void __cdecl doom_load_graphics() LoadFileWithMem(tempstr, pDoomCel); } -void __cdecl doom_init() +void doom_init() { doomflag = TRUE; doom_alloc_cel(); @@ -69,7 +69,7 @@ void __cdecl doom_init() doom_load_graphics(); } -void __cdecl doom_close() +void doom_close() { if (doomflag) { doomflag = FALSE; @@ -77,7 +77,7 @@ void __cdecl doom_close() } } -void __cdecl doom_draw() +void doom_draw() { if (!doomflag) { return; diff --git a/Source/doom.h b/Source/doom.h index d96dfce9..abc22f05 100644 --- a/Source/doom.h +++ b/Source/doom.h @@ -9,15 +9,15 @@ extern int doomflag; // weak extern int DoomQuestState; // idb /* -void __cdecl doom_reset_state(); -void __cdecl doom_play_movie(); +void doom_reset_state(); +void doom_play_movie(); */ -int __cdecl doom_get_frame_from_time(); -void __cdecl doom_alloc_cel(); -void __cdecl doom_cleanup(); -void __cdecl doom_load_graphics(); -void __cdecl doom_init(); -void __cdecl doom_close(); -void __cdecl doom_draw(); +int doom_get_frame_from_time(); +void doom_alloc_cel(); +void doom_cleanup(); +void doom_load_graphics(); +void doom_init(); +void doom_close(); +void doom_draw(); #endif /* __DOOM_H__ */ diff --git a/Source/drlg_l1.cpp b/Source/drlg_l1.cpp index 4ed52f88..e6c23c00 100644 --- a/Source/drlg_l1.cpp +++ b/Source/drlg_l1.cpp @@ -110,7 +110,7 @@ const unsigned char PWATERIN[] = { 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, /* data */ unsigned char L5ConvTbl[16] = { 22u, 13u, 1u, 13u, 2u, 13u, 13u, 13u, 4u, 13u, 1u, 13u, 2u, 13u, 16u, 13u }; -void __cdecl DRLG_Init_Globals() +void DRLG_Init_Globals() { char c; @@ -131,7 +131,7 @@ void __cdecl DRLG_Init_Globals() // 525728: using guessed type int light4flag; // 646A28: using guessed type int lightflag; -void __fastcall LoadL1Dungeon(char *sFileName, int vx, int vy) +void LoadL1Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh; BYTE *pLevelMap, *lm; @@ -184,7 +184,7 @@ void __fastcall LoadL1Dungeon(char *sFileName, int vx, int vy) // 5D2458: using guessed type int dminx; // 5D245C: using guessed type int dminy; -void __cdecl DRLG_L1Floor() +void DRLG_L1Floor() { int i, j; LONG rv; @@ -203,7 +203,7 @@ void __cdecl DRLG_L1Floor() } } -void __cdecl DRLG_L1Pass3() +void DRLG_L1Pass3() { int i, j, xx, yy; long v1, v2, v3, v4, lv; @@ -289,7 +289,7 @@ void __cdecl DRLG_L1Pass3() } } -void __cdecl DRLG_InitL1Vals() +void DRLG_InitL1Vals() { int i, j, pc; @@ -331,7 +331,7 @@ void __cdecl DRLG_InitL1Vals() } } -void __fastcall LoadPreL1Dungeon(char *sFileName, int vx, int vy) +void LoadPreL1Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh; BYTE *pLevelMap, *lm; @@ -383,7 +383,7 @@ void __fastcall LoadPreL1Dungeon(char *sFileName, int vx, int vy) // 5D2458: using guessed type int dminx; // 5D245C: using guessed type int dminy; -void __fastcall CreateL5Dungeon(int rseed, int entry) +void CreateL5Dungeon(int rseed, int entry) { SetRndSeed(rseed); @@ -406,7 +406,7 @@ void __fastcall CreateL5Dungeon(int rseed, int entry) // 5D2458: using guessed type int dminx; // 5D245C: using guessed type int dminy; -void __cdecl DRLG_LoadL1SP() +void DRLG_LoadL1SP() { setloadflag = 0; if (QuestStatus(QTYPE_BUTCH)) { @@ -425,7 +425,7 @@ void __cdecl DRLG_LoadL1SP() // 5276A4: using guessed type int setloadflag; // 679660: using guessed type char gbMaxPlayers; -void __cdecl DRLG_FreeL1SP() +void DRLG_FreeL1SP() { void *ptr; @@ -434,7 +434,7 @@ void __cdecl DRLG_FreeL1SP() mem_free_dbg(ptr); } -void __fastcall DRLG_L5(int entry) +void DRLG_L5(int entry) { int i, j; LONG minarea; @@ -546,7 +546,7 @@ void __fastcall DRLG_L5(int entry) DRLG_CheckQuests(setpc_x, setpc_y); } -void __fastcall DRLG_PlaceDoor(int x, int y) +void DRLG_PlaceDoor(int x, int y) { if ((mydflags[x][y] & 0x80) == 0) { /* todo: unsigned */ unsigned char df = mydflags[x][y] & 0x7F; @@ -605,7 +605,7 @@ void __fastcall DRLG_PlaceDoor(int x, int y) mydflags[x][y] = 0x80; } -void __cdecl DRLG_L1Shadows() +void DRLG_L1Shadows() { int x, y, i; unsigned char sd[2][2]; @@ -697,7 +697,7 @@ void __cdecl DRLG_L1Shadows() } } -int __fastcall DRLG_PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int noquad, int ldir) +int DRLG_PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int noquad, int ldir) { int xx, yy, sx, sy; int ii, i, t, found; @@ -815,7 +815,7 @@ int __fastcall DRLG_PlaceMiniSet(const unsigned char *miniset, int tmin, int tma // 5CF320: using guessed type int LvlViewY; // 5CF324: using guessed type int LvlViewX; -void __cdecl InitL5Dungeon() +void InitL5Dungeon() { int i, j; @@ -827,7 +827,7 @@ void __cdecl InitL5Dungeon() } } -void __cdecl L5ClearFlags() +void L5ClearFlags() { int i, j; @@ -838,7 +838,7 @@ void __cdecl L5ClearFlags() } } -void __cdecl L5firstRoom() +void L5firstRoom() { int ys, ye, y; int xs, xe, x; @@ -928,7 +928,7 @@ void __cdecl L5firstRoom() } } -void __fastcall L5drawRoom(int x, int y, int w, int h) +void L5drawRoom(int x, int y, int w, int h) { int i, j; @@ -939,7 +939,7 @@ void __fastcall L5drawRoom(int x, int y, int w, int h) } } -void __fastcall L5roomGen(int x, int y, int w, int h, int dir) +void L5roomGen(int x, int y, int w, int h, int dir) { int num, dirProb; BOOL ran, ran2; @@ -996,7 +996,7 @@ void __fastcall L5roomGen(int x, int y, int w, int h, int dir) } } -BOOL __fastcall L5checkRoom(int x, int y, int width, int height) +BOOL L5checkRoom(int x, int y, int width, int height) { int i, j; @@ -1012,7 +1012,7 @@ BOOL __fastcall L5checkRoom(int x, int y, int width, int height) return TRUE; } -int __cdecl L5GetArea() +int L5GetArea() { int i, j; int rv; @@ -1029,7 +1029,7 @@ int __cdecl L5GetArea() return rv; } -void __cdecl L5makeDungeon() +void L5makeDungeon() { signed int v0; // edi signed int v1; // esi @@ -1056,7 +1056,7 @@ void __cdecl L5makeDungeon() } while (v0 < 40); } -void __cdecl L5makeDmt() +void L5makeDmt() { int i, j, dmtx, dmty; @@ -1077,7 +1077,7 @@ void __cdecl L5makeDmt() } } -void __cdecl L5AddWall() +void L5AddWall() { int i, j, x, y; @@ -1119,7 +1119,7 @@ void __cdecl L5AddWall() } } -int __fastcall L5HWallOk(int i, int j) +int L5HWallOk(int i, int j) { int x; BOOL wallok; @@ -1145,7 +1145,7 @@ int __fastcall L5HWallOk(int i, int j) return -1; } -int __fastcall L5VWallOk(int i, int j) +int L5VWallOk(int i, int j) { int y; BOOL wallok; @@ -1171,7 +1171,7 @@ int __fastcall L5VWallOk(int i, int j) return -1; } -void __fastcall L5HorizWall(int i, int j, char p, int dx) +void L5HorizWall(int i, int j, char p, int dx) { int xx; char wt, dt; @@ -1220,7 +1220,7 @@ void __fastcall L5HorizWall(int i, int j, char p, int dx) } } -void __fastcall L5VertWall(int i, int j, char p, int dy) +void L5VertWall(int i, int j, char p, int dy) { int yy; char wt, dt; @@ -1269,7 +1269,7 @@ void __fastcall L5VertWall(int i, int j, char p, int dy) } } -void __cdecl L5tileFix() +void L5tileFix() { int i, j; @@ -1377,7 +1377,7 @@ void __cdecl L5tileFix() } } -void __cdecl DRLG_L5Subs() +void DRLG_L5Subs() { int x, y, rv, i; @@ -1416,7 +1416,7 @@ void __cdecl DRLG_L5Subs() } } -void __cdecl L5FillChambers() +void L5FillChambers() { int c; @@ -1527,7 +1527,7 @@ void __cdecl L5FillChambers() } // 5276A4: using guessed type int setloadflag; -void __fastcall DRLG_L5GChamber(int sx, int sy, BOOLEAN topflag, BOOLEAN bottomflag, BOOLEAN leftflag, BOOLEAN rightflag) +void DRLG_L5GChamber(int sx, int sy, BOOLEAN topflag, BOOLEAN bottomflag, BOOLEAN leftflag, BOOLEAN rightflag) { int v6; // eax int v7; // edx @@ -1608,7 +1608,7 @@ void __fastcall DRLG_L5GChamber(int sx, int sy, BOOLEAN topflag, BOOLEAN bottomf dungeon[7][v15 + 7] = 15; } -void __fastcall DRLG_L5GHall(int x1, int y1, int x2, int y2) +void DRLG_L5GHall(int x1, int y1, int x2, int y2) { int i; @@ -1625,7 +1625,7 @@ void __fastcall DRLG_L5GHall(int x1, int y1, int x2, int y2) } } -void __fastcall DRLG_L5SetRoom(int rx1, int ry1) +void DRLG_L5SetRoom(int rx1, int ry1) { int rw, rh, i, j; unsigned char *sp; @@ -1655,7 +1655,7 @@ void __fastcall DRLG_L5SetRoom(int rx1, int ry1) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __cdecl DRLG_L5FloodTVal() +void DRLG_L5FloodTVal() { int xx, yy, i, j; @@ -1676,7 +1676,7 @@ void __cdecl DRLG_L5FloodTVal() } // 5A5590: using guessed type char TransVal; -void __fastcall DRLG_L5FTVR(int i, int j, int x, int y, int d) +void DRLG_L5FTVR(int i, int j, int x, int y, int d) { if (dTransVal[x][y] || dungeon[i][j] != 13) { if (d == 1) { @@ -1720,7 +1720,7 @@ void __fastcall DRLG_L5FTVR(int i, int j, int x, int y, int d) } // 5A5590: using guessed type char TransVal; -void __cdecl DRLG_L5TransFix() +void DRLG_L5TransFix() { int xx, yy, i, j; @@ -1757,7 +1757,7 @@ void __cdecl DRLG_L5TransFix() } } -void __cdecl DRLG_L5DirtFix() +void DRLG_L5DirtFix() { int i, j; @@ -1779,7 +1779,7 @@ void __cdecl DRLG_L5DirtFix() } } -void __cdecl DRLG_L5CornerFix() +void DRLG_L5CornerFix() { signed int v0; // esi signed int v1; // eax diff --git a/Source/drlg_l1.h b/Source/drlg_l1.h index 16b100df..e4e3c2e0 100644 --- a/Source/drlg_l1.h +++ b/Source/drlg_l1.h @@ -13,44 +13,44 @@ extern int VR2; extern int VR3; extern void *pSetPiece; // idb -void __cdecl DRLG_Init_Globals(); -void __fastcall LoadL1Dungeon(char *sFileName, int vx, int vy); -void __cdecl DRLG_L1Floor(); -void __cdecl DRLG_L1Pass3(); -void __cdecl DRLG_InitL1Vals(); -void __fastcall LoadPreL1Dungeon(char *sFileName, int vx, int vy); -void __fastcall CreateL5Dungeon(int rseed, int entry); -void __cdecl DRLG_LoadL1SP(); -void __cdecl DRLG_FreeL1SP(); -void __fastcall DRLG_L5(int entry); -void __fastcall DRLG_PlaceDoor(int x, int y); -void __cdecl DRLG_L1Shadows(); -int __fastcall DRLG_PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int noquad, int ldir); -void __cdecl InitL5Dungeon(); -void __cdecl L5ClearFlags(); -void __cdecl L5firstRoom(); -void __fastcall L5drawRoom(int x, int y, int w, int h); -void __fastcall L5roomGen(int x, int y, int w, int h, int dir); -BOOL __fastcall L5checkRoom(int x, int y, int width, int height); -int __cdecl L5GetArea(); -void __cdecl L5makeDungeon(); -void __cdecl L5makeDmt(); -void __cdecl L5AddWall(); -int __fastcall L5HWallOk(int i, int j); -int __fastcall L5VWallOk(int i, int j); -void __fastcall L5HorizWall(int i, int j, char p, int dx); -void __fastcall L5VertWall(int i, int j, char p, int dy); -void __cdecl L5tileFix(); -void __cdecl DRLG_L5Subs(); -void __cdecl L5FillChambers(); -void __fastcall DRLG_L5GChamber(int sx, int sy, BOOLEAN topflag, BOOLEAN bottomflag, BOOLEAN leftflag, BOOLEAN rightflag); -void __fastcall DRLG_L5GHall(int x1, int y1, int x2, int y2); -void __fastcall DRLG_L5SetRoom(int rx1, int ry1); -void __cdecl DRLG_L5FloodTVal(); -void __fastcall DRLG_L5FTVR(int i, int j, int x, int y, int d); -void __cdecl DRLG_L5TransFix(); -void __cdecl DRLG_L5DirtFix(); -void __cdecl DRLG_L5CornerFix(); +void DRLG_Init_Globals(); +void LoadL1Dungeon(char *sFileName, int vx, int vy); +void DRLG_L1Floor(); +void DRLG_L1Pass3(); +void DRLG_InitL1Vals(); +void LoadPreL1Dungeon(char *sFileName, int vx, int vy); +void CreateL5Dungeon(int rseed, int entry); +void DRLG_LoadL1SP(); +void DRLG_FreeL1SP(); +void DRLG_L5(int entry); +void DRLG_PlaceDoor(int x, int y); +void DRLG_L1Shadows(); +int DRLG_PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int noquad, int ldir); +void InitL5Dungeon(); +void L5ClearFlags(); +void L5firstRoom(); +void L5drawRoom(int x, int y, int w, int h); +void L5roomGen(int x, int y, int w, int h, int dir); +BOOL L5checkRoom(int x, int y, int width, int height); +int L5GetArea(); +void L5makeDungeon(); +void L5makeDmt(); +void L5AddWall(); +int L5HWallOk(int i, int j); +int L5VWallOk(int i, int j); +void L5HorizWall(int i, int j, char p, int dx); +void L5VertWall(int i, int j, char p, int dy); +void L5tileFix(); +void DRLG_L5Subs(); +void L5FillChambers(); +void DRLG_L5GChamber(int sx, int sy, BOOLEAN topflag, BOOLEAN bottomflag, BOOLEAN leftflag, BOOLEAN rightflag); +void DRLG_L5GHall(int x1, int y1, int x2, int y2); +void DRLG_L5SetRoom(int rx1, int ry1); +void DRLG_L5FloodTVal(); +void DRLG_L5FTVR(int i, int j, int x, int y, int d); +void DRLG_L5TransFix(); +void DRLG_L5DirtFix(); +void DRLG_L5CornerFix(); /* rdata */ extern const ShadowStruct SPATS[37]; diff --git a/Source/drlg_l2.cpp b/Source/drlg_l2.cpp index 8dbe4757..86ebd0a6 100644 --- a/Source/drlg_l2.cpp +++ b/Source/drlg_l2.cpp @@ -234,7 +234,7 @@ int Patterns[100][10] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; -void __cdecl InitDungeon() +void InitDungeon() { signed int v0; // edx signed int v1; // eax @@ -254,7 +254,7 @@ void __cdecl InitDungeon() } while (v0 < 40); } -void __cdecl L2LockoutFix() +void L2LockoutFix() { signed int v0; // ecx char *v1; // eax @@ -345,7 +345,7 @@ void __cdecl L2LockoutFix() } while (v9 < 39); } -void __cdecl L2DoorFix() +void L2DoorFix() { signed int v0; // ecx char *v1; // eax @@ -367,7 +367,7 @@ void __cdecl L2DoorFix() } while (v0 < 40); } -void __fastcall LoadL2Dungeon(char *sFileName, int vx, int vy) +void LoadL2Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh, pc; BYTE *pLevelMap, *lm; @@ -457,7 +457,7 @@ void __fastcall LoadL2Dungeon(char *sFileName, int vx, int vy) mem_free_dbg(pLevelMap); } -void __cdecl DRLG_L2Pass3() +void DRLG_L2Pass3() { int i, j, xx, yy; long v1, v2, v3, v4, lv; @@ -542,7 +542,7 @@ void __cdecl DRLG_L2Pass3() } } -void __fastcall LoadPreL2Dungeon(char *sFileName, int vx, int vy) +void LoadPreL2Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh; BYTE *pLevelMap, *lm; @@ -591,7 +591,7 @@ void __fastcall LoadPreL2Dungeon(char *sFileName, int vx, int vy) mem_free_dbg(pLevelMap); } -void __fastcall CreateL2Dungeon(int rseed, int entry) +void CreateL2Dungeon(int rseed, int entry) { int v2; // esi int v3; // edi @@ -640,7 +640,7 @@ LABEL_10: // 5D245C: using guessed type int dminy; // 679660: using guessed type char gbMaxPlayers; -void __cdecl DRLG_LoadL2SP() +void DRLG_LoadL2SP() { char *v1; // ecx @@ -661,7 +661,7 @@ void __cdecl DRLG_LoadL2SP() } // 5B50D8: using guessed type int setloadflag_2; -void __cdecl DRLG_FreeL2SP() +void DRLG_FreeL2SP() { char *ptr; @@ -670,7 +670,7 @@ void __cdecl DRLG_FreeL2SP() mem_free_dbg(ptr); } -void __fastcall DRLG_L2(int entry) +void DRLG_L2(int entry) { int v1; // esi int v2; // eax @@ -870,7 +870,7 @@ void __fastcall DRLG_L2(int entry) } // 5B50D8: using guessed type int setloadflag_2; -BOOLEAN __fastcall DRLG_L2PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOLEAN setview, int ldir) +BOOLEAN DRLG_L2PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOLEAN setview, int ldir) { int v7; // ebx int v8; // esi @@ -1024,7 +1024,7 @@ BOOLEAN __fastcall DRLG_L2PlaceMiniSet(unsigned char *miniset, int tmin, int tma // 5CF320: using guessed type int LvlViewY; // 5CF324: using guessed type int LvlViewX; -void __fastcall DRLG_L2PlaceRndSet(unsigned char *miniset, int rndper) +void DRLG_L2PlaceRndSet(unsigned char *miniset, int rndper) { unsigned char *v2; // ebx signed int v3; // esi @@ -1168,7 +1168,7 @@ void __fastcall DRLG_L2PlaceRndSet(unsigned char *miniset, int rndper) // 5276CC: using guessed type int nSx2; // 5276D4: using guessed type int nSy2; -void __cdecl DRLG_L2Subs() +void DRLG_L2Subs() { signed int v0; // edi unsigned char v1; // bl @@ -1224,7 +1224,7 @@ void __cdecl DRLG_L2Subs() // 5276CC: using guessed type int nSx2; // 5276D4: using guessed type int nSy2; -void __cdecl DRLG_L2Shadows() +void DRLG_L2Shadows() { char *v0; // eax unsigned char *v1; // esi @@ -1284,7 +1284,7 @@ void __cdecl DRLG_L2Shadows() } // 48489A: using guessed type short word_48489A; -void __fastcall DRLG_L2SetRoom(int rx1, int ry1) +void DRLG_L2SetRoom(int rx1, int ry1) { int v2; // edi int v3; // esi @@ -1327,7 +1327,7 @@ void __fastcall DRLG_L2SetRoom(int rx1, int ry1) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __cdecl L2TileFix() +void L2TileFix() { signed int v0; // edx char *v1; // eax @@ -1359,7 +1359,7 @@ void __cdecl L2TileFix() } while (v0 < 40); } -BOOLEAN __cdecl CreateDungeon() +BOOLEAN CreateDungeon() { int v0; // esi int v1; // edx @@ -1461,7 +1461,7 @@ LABEL_12: return v8; } -void __fastcall CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW) +void CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW) { int v9; // esi int v10; // ebx @@ -1661,7 +1661,7 @@ void __fastcall CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int n // 5276CC: using guessed type int nSx2; // 5276D4: using guessed type int nSy2; -void __fastcall DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW) +void DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW) { int v5; // esi int v6; // edi @@ -1731,7 +1731,7 @@ void __fastcall DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW) } } -void __fastcall AddHall(int nX1, int nY1, int nX2, int nY2, int nHd) +void AddHall(int nX1, int nY1, int nX2, int nY2, int nHd) { int v5; // edi int v6; // esi @@ -1762,7 +1762,7 @@ void __fastcall AddHall(int nX1, int nY1, int nX2, int nY2, int nHd) } } -void __fastcall GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd) +void GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd) { HALLNODE *p1; HALLNODE *p2; @@ -1781,7 +1781,7 @@ void __fastcall GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd) pHallList = p1; } -void __fastcall ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd) +void ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd) { int v5; // edi signed int v6; // esi @@ -1983,7 +1983,7 @@ void __fastcall ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd) } while (!v34); } -void __fastcall CreateDoorType(int nX, int nY) +void CreateDoorType(int nX, int nY) { int v2; // eax signed int v3; // esi @@ -2008,7 +2008,7 @@ void __fastcall CreateDoorType(int nX, int nY) *v4 = 68; } -void __fastcall PlaceHallExt(int nX, int nY) +void PlaceHallExt(int nX, int nY) { char *v2; // eax @@ -2017,7 +2017,7 @@ void __fastcall PlaceHallExt(int nX, int nY) *v2 = 44; } -void __fastcall DoPatternCheck(int i, int j) +void DoPatternCheck(int i, int j) { int v2; // edx signed int v3; // eax @@ -2111,7 +2111,7 @@ void __fastcall DoPatternCheck(int i, int j) } } -BOOLEAN __cdecl DL2_FillVoids() +BOOLEAN DL2_FillVoids() { int i; // eax int v2; // eax @@ -2476,7 +2476,7 @@ BOOLEAN __cdecl DL2_FillVoids() return DL2_NumNoChar() <= 700; } -BOOLEAN __fastcall DL2_Cont(BOOLEAN x1f, BOOLEAN y1f, BOOLEAN x2f, BOOLEAN y2f) +BOOLEAN DL2_Cont(BOOLEAN x1f, BOOLEAN y1f, BOOLEAN x2f, BOOLEAN y2f) { BOOLEAN v4; // zf @@ -2503,7 +2503,7 @@ LABEL_11: return 0; } -int __cdecl DL2_NumNoChar() +int DL2_NumNoChar() { int result; // eax signed int v1; // edx @@ -2526,7 +2526,7 @@ int __cdecl DL2_NumNoChar() return result; } -void __fastcall DL2_DrawRoom(int x1, int y1, int x2, int y2) +void DL2_DrawRoom(int x1, int y1, int x2, int y2) { int v4; // ebx char *v5; // edx @@ -2566,7 +2566,7 @@ void __fastcall DL2_DrawRoom(int x1, int y1, int x2, int y2) } } -void __fastcall DL2_KnockWalls(int x1, int y1, int x2, int y2) +void DL2_KnockWalls(int x1, int y1, int x2, int y2) { int v4; // esi char *v5; // ebx @@ -2615,7 +2615,7 @@ void __fastcall DL2_KnockWalls(int x1, int y1, int x2, int y2) } } -void __cdecl DRLG_L2FloodTVal() +void DRLG_L2FloodTVal() { int v0; // ebx int v1; // esi @@ -2647,7 +2647,7 @@ void __cdecl DRLG_L2FloodTVal() } // 5A5590: using guessed type char TransVal; -void __fastcall DRLG_L2FTVR(int i, int j, int x, int y, int d) +void DRLG_L2FTVR(int i, int j, int x, int y, int d) { int v5; // ebx int v6; // esi @@ -2746,7 +2746,7 @@ void __fastcall DRLG_L2FTVR(int i, int j, int x, int y, int d) } // 5A5590: using guessed type char TransVal; -void __cdecl DRLG_L2TransFix() +void DRLG_L2TransFix() { signed int v0; // esi char *v1; // eax @@ -2803,7 +2803,7 @@ void __cdecl DRLG_L2TransFix() } while (v0 < 40); } -void __cdecl L2DirtFix() +void L2DirtFix() { signed int v0; // ecx char *v1; // eax @@ -2833,7 +2833,7 @@ void __cdecl L2DirtFix() } while (v0 < 40); } -void __cdecl DRLG_InitL2Vals() +void DRLG_InitL2Vals() { int v0; // edi int(*v1)[112]; // ebx diff --git a/Source/drlg_l2.h b/Source/drlg_l2.h index 084669ce..27e337e7 100644 --- a/Source/drlg_l2.h +++ b/Source/drlg_l2.h @@ -11,41 +11,41 @@ extern char predungeon[40][40]; extern ROOMNODE RoomList[81]; extern HALLNODE *pHallList; -void __cdecl InitDungeon(); -void __cdecl L2LockoutFix(); -void __cdecl L2DoorFix(); -void __fastcall LoadL2Dungeon(char *sFileName, int vx, int vy); -void __cdecl DRLG_L2Pass3(); -void __fastcall LoadPreL2Dungeon(char *sFileName, int vx, int vy); -void __fastcall CreateL2Dungeon(int rseed, int entry); -void __cdecl DRLG_LoadL2SP(); -void __cdecl DRLG_FreeL2SP(); -void __fastcall DRLG_L2(int entry); -BOOLEAN __fastcall DRLG_L2PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOLEAN setview, int ldir); -void __fastcall DRLG_L2PlaceRndSet(unsigned char *miniset, int rndper); -void __cdecl DRLG_L2Subs(); -void __cdecl DRLG_L2Shadows(); -void __fastcall DRLG_L2SetRoom(int rx1, int ry1); -void __cdecl L2TileFix(); -BOOLEAN __cdecl CreateDungeon(); -void __fastcall CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW); -void __fastcall DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW); -void __fastcall AddHall(int nX1, int nY1, int nX2, int nY2, int nHd); -void __fastcall GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd); -void __fastcall ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd); -void __fastcall CreateDoorType(int nX, int nY); -void __fastcall PlaceHallExt(int nX, int nY); -void __fastcall DoPatternCheck(int i, int j); -BOOLEAN __cdecl DL2_FillVoids(); -BOOLEAN __fastcall DL2_Cont(BOOLEAN x1f, BOOLEAN y1f, BOOLEAN x2f, BOOLEAN y2f); -int __cdecl DL2_NumNoChar(); -void __fastcall DL2_DrawRoom(int x1, int y1, int x2, int y2); -void __fastcall DL2_KnockWalls(int x1, int y1, int x2, int y2); -void __cdecl DRLG_L2FloodTVal(); -void __fastcall DRLG_L2FTVR(int i, int j, int x, int y, int d); -void __cdecl DRLG_L2TransFix(); -void __cdecl L2DirtFix(); -void __cdecl DRLG_InitL2Vals(); +void InitDungeon(); +void L2LockoutFix(); +void L2DoorFix(); +void LoadL2Dungeon(char *sFileName, int vx, int vy); +void DRLG_L2Pass3(); +void LoadPreL2Dungeon(char *sFileName, int vx, int vy); +void CreateL2Dungeon(int rseed, int entry); +void DRLG_LoadL2SP(); +void DRLG_FreeL2SP(); +void DRLG_L2(int entry); +BOOLEAN DRLG_L2PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOLEAN setview, int ldir); +void DRLG_L2PlaceRndSet(unsigned char *miniset, int rndper); +void DRLG_L2Subs(); +void DRLG_L2Shadows(); +void DRLG_L2SetRoom(int rx1, int ry1); +void L2TileFix(); +BOOLEAN CreateDungeon(); +void CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW); +void DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW); +void AddHall(int nX1, int nY1, int nX2, int nY2, int nHd); +void GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd); +void ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd); +void CreateDoorType(int nX, int nY); +void PlaceHallExt(int nX, int nY); +void DoPatternCheck(int i, int j); +BOOLEAN DL2_FillVoids(); +BOOLEAN DL2_Cont(BOOLEAN x1f, BOOLEAN y1f, BOOLEAN x2f, BOOLEAN y2f); +int DL2_NumNoChar(); +void DL2_DrawRoom(int x1, int y1, int x2, int y2); +void DL2_KnockWalls(int x1, int y1, int x2, int y2); +void DRLG_L2FloodTVal(); +void DRLG_L2FTVR(int i, int j, int x, int y, int d); +void DRLG_L2TransFix(); +void L2DirtFix(); +void DRLG_InitL2Vals(); /* rdata */ extern int Area_Min; // weak diff --git a/Source/drlg_l3.cpp b/Source/drlg_l3.cpp index 42341c4c..509b9fb5 100644 --- a/Source/drlg_l3.cpp +++ b/Source/drlg_l3.cpp @@ -71,7 +71,7 @@ const unsigned char L3ANVIL[244] = { 0, 0, 0, 0 }; -void __cdecl AddFenceDoors() +void AddFenceDoors() { signed int v0; // esi char *v1; // eax @@ -107,7 +107,7 @@ void __cdecl AddFenceDoors() } while (v0 < 40); } -void __cdecl FenceDoorFix() +void FenceDoorFix() { signed int v0; // edi char *v1; // eax @@ -173,7 +173,7 @@ void __cdecl FenceDoorFix() } while (v0 < 40); } -int __cdecl DRLG_L3Anvil() +int DRLG_L3Anvil() { int v0; // esi signed int v1; // edi @@ -258,7 +258,7 @@ int __cdecl DRLG_L3Anvil() // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __cdecl FixL3Warp() +void FixL3Warp() { int i, j; @@ -278,7 +278,7 @@ void __cdecl FixL3Warp() } } -void __cdecl FixL3HallofHeroes() +void FixL3HallofHeroes() { int i, j; @@ -305,7 +305,7 @@ void __cdecl FixL3HallofHeroes() } } -void __fastcall DRLG_L3LockRec(int x, int y) +void DRLG_L3LockRec(int x, int y) { int v2; // esi int v3; // edi @@ -331,7 +331,7 @@ void __fastcall DRLG_L3LockRec(int x, int y) } // 528380: using guessed type int lockoutcnt; -BOOLEAN __cdecl DRLG_L3Lockout() +BOOLEAN DRLG_L3Lockout() { int v0; // esi signed int v1; // edx @@ -365,7 +365,7 @@ BOOLEAN __cdecl DRLG_L3Lockout() } // 528380: using guessed type int lockoutcnt; -void __fastcall CreateL3Dungeon(unsigned int rseed, int entry) +void CreateL3Dungeon(unsigned int rseed, int entry) { int i, j; @@ -400,7 +400,7 @@ void __fastcall CreateL3Dungeon(unsigned int rseed, int entry) // 5D2458: using guessed type int dminx; // 5D245C: using guessed type int dminy; -void __fastcall DRLG_L3(int entry) +void DRLG_L3(int entry) { int x1; // esi int y1; // eax @@ -548,7 +548,7 @@ void __fastcall DRLG_L3(int entry) } // 528378: using guessed type char lavapool; -void __cdecl InitL3Dungeon() +void InitL3Dungeon() { int i, j; @@ -562,7 +562,7 @@ void __cdecl InitL3Dungeon() } } -BOOL __fastcall DRLG_L3FillRoom(int x1, int y1, int x2, int y2) +BOOL DRLG_L3FillRoom(int x1, int y1, int x2, int y2) { int i, j, v; @@ -606,7 +606,7 @@ BOOL __fastcall DRLG_L3FillRoom(int x1, int y1, int x2, int y2) return TRUE; } -void __fastcall DRLG_L3CreateBlock(int x, int y, int obs, int dir) +void DRLG_L3CreateBlock(int x, int y, int obs, int dir) { int blksizex, blksizey, x1, y1, x2, y2; BOOL contflag; @@ -688,7 +688,7 @@ void __fastcall DRLG_L3CreateBlock(int x, int y, int obs, int dir) } } -void __fastcall DRLG_L3FloorArea(int x1, int y1, int x2, int y2) +void DRLG_L3FloorArea(int x1, int y1, int x2, int y2) { int i; // esi char *v5; // edx @@ -707,7 +707,7 @@ void __fastcall DRLG_L3FloorArea(int x1, int y1, int x2, int y2) } } -void __cdecl DRLG_L3FillDiags() +void DRLG_L3FillDiags() { int i, j, v; @@ -732,7 +732,7 @@ void __cdecl DRLG_L3FillDiags() } } -void __cdecl DRLG_L3FillSingles() +void DRLG_L3FillSingles() { int i, j; @@ -748,7 +748,7 @@ void __cdecl DRLG_L3FillSingles() } } -void __cdecl DRLG_L3FillStraights() +void DRLG_L3FillStraights() { int i, j, xc, xs, yc, ys, k; @@ -826,7 +826,7 @@ void __cdecl DRLG_L3FillStraights() } } -void __cdecl DRLG_L3Edges() +void DRLG_L3Edges() { int i, j; @@ -838,7 +838,7 @@ void __cdecl DRLG_L3Edges() } } -int __cdecl DRLG_L3GetFloorArea() +int DRLG_L3GetFloorArea() { int i, j, gfa; @@ -853,7 +853,7 @@ int __cdecl DRLG_L3GetFloorArea() return gfa; } -void __cdecl DRLG_L3MakeMegas() +void DRLG_L3MakeMegas() { int i, j, v; @@ -883,7 +883,7 @@ void __cdecl DRLG_L3MakeMegas() } } -void __cdecl DRLG_L3River() +void DRLG_L3River() { int rx, ry, px, py, dir, pdir, nodir, nodir2, dircheck; int river[3][100]; @@ -1124,7 +1124,7 @@ void __cdecl DRLG_L3River() } } -void __cdecl DRLG_L3Pool() +void DRLG_L3Pool() { int i, j, dunx, duny, totarea, poolchance; BOOL found; @@ -1178,7 +1178,7 @@ void __cdecl DRLG_L3Pool() } // 528378: using guessed type char lavapool; -BOOL __fastcall DRLG_L3SpawnEdge(int x, int y, int *totarea) +BOOL DRLG_L3SpawnEdge(int x, int y, int *totarea) { unsigned char i; static unsigned char spawntable[15] = { 0, 10, 3, 5, 12, 6, 9, 0, 0, 12, 3, 6, 9, 10, 5 }; @@ -1231,7 +1231,7 @@ BOOL __fastcall DRLG_L3SpawnEdge(int x, int y, int *totarea) return FALSE; } -BOOL __fastcall DRLG_L3Spawn(int x, int y, int *totarea) +BOOL DRLG_L3Spawn(int x, int y, int *totarea) { unsigned char i; static unsigned char spawntable[15] = { 0, 10, 67, 5, 44, 6, 9, 0, 0, 28, 131, 6, 9, 10, 5 }; @@ -1281,7 +1281,7 @@ BOOL __fastcall DRLG_L3Spawn(int x, int y, int *totarea) return FALSE; } -void __cdecl DRLG_L3PoolFix() +void DRLG_L3PoolFix() { signed int v0; // esi char *v1; // eax @@ -1332,7 +1332,7 @@ void __cdecl DRLG_L3PoolFix() } while (v0 < 40); } -BOOL __fastcall DRLG_L3PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int ldir) +BOOL DRLG_L3PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int ldir) { int sx, sy, sw, sh, xx, yy, i, ii, numt, trys; BOOL found; @@ -1415,7 +1415,7 @@ BOOL __fastcall DRLG_L3PlaceMiniSet(const unsigned char *miniset, int tmin, int // 5CF320: using guessed type int LvlViewY; // 5CF324: using guessed type int LvlViewX; -void __fastcall DRLG_L3PlaceRndSet(const unsigned char *miniset, int rndper) +void DRLG_L3PlaceRndSet(const unsigned char *miniset, int rndper) { int sx, sy, sw, sh, xx, yy, ii, kk; BOOL found; @@ -1467,7 +1467,7 @@ void __fastcall DRLG_L3PlaceRndSet(const unsigned char *miniset, int rndper) } } -void __cdecl DRLG_L3Wood() +void DRLG_L3Wood() { char *v0; // edi int v1; // edx @@ -1730,7 +1730,7 @@ void __cdecl DRLG_L3Wood() FenceDoorFix(); } -BOOL __fastcall WoodVertU(int i, int y) +BOOL WoodVertU(int i, int y) { if((dungeon[i + 1][y] > 152 || dungeon[i + 1][y] < 130) && (dungeon[i - 1][y] > 152 || dungeon[i - 1][y] < 130)) { @@ -1757,7 +1757,7 @@ BOOL __fastcall WoodVertU(int i, int y) return FALSE; } -BOOL __fastcall WoodVertD(int i, int y) +BOOL WoodVertD(int i, int y) { if((dungeon[i + 1][y] > 152 || dungeon[i + 1][y] < 130) && (dungeon[i - 1][y] > 152 || dungeon[i - 1][y] < 130)) { @@ -1778,7 +1778,7 @@ BOOL __fastcall WoodVertD(int i, int y) return FALSE; } -BOOL __fastcall WoodHorizL(int x, int j) +BOOL WoodHorizL(int x, int j) { if((dungeon[x][j + 1] > 152 || dungeon[x][j + 1] < 130) && (dungeon[x][j - 1] > 152 || dungeon[x][j - 1] < 130)) { @@ -1805,7 +1805,7 @@ BOOL __fastcall WoodHorizL(int x, int j) return FALSE; } -BOOL __fastcall WoodHorizR(int x, int j) +BOOL WoodHorizR(int x, int j) { if((dungeon[x][j + 1] > 152 || dungeon[x][j + 1] < 130) && (dungeon[x][j - 1] > 152 || dungeon[x][j - 1] < 130)) { @@ -1826,7 +1826,7 @@ BOOL __fastcall WoodHorizR(int x, int j) return FALSE; } -void __cdecl DRLG_L3Pass3() +void DRLG_L3Pass3() { int i, j, xx, yy; long v1, v2, v3, v4, lv; @@ -1925,7 +1925,7 @@ void __cdecl DRLG_L3Pass3() } } -void __fastcall LoadL3Dungeon(char *sFileName, int vx, int vy) +void LoadL3Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh; BYTE *pLevelMap, *lm; @@ -1992,7 +1992,7 @@ void __fastcall LoadL3Dungeon(char *sFileName, int vx, int vy) // 5D2458: using guessed type int dminx; // 5D245C: using guessed type int dminy; -void __fastcall LoadPreL3Dungeon(char *sFileName, int vx, int vy) +void LoadPreL3Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh; BYTE *pLevelMap, *lm; diff --git a/Source/drlg_l3.h b/Source/drlg_l3.h index 7f2fd999..0b89d172 100644 --- a/Source/drlg_l3.h +++ b/Source/drlg_l3.h @@ -7,40 +7,40 @@ extern int abyssx; // weak extern int lockoutcnt; // weak extern char lockout[40][40]; -void __cdecl AddFenceDoors(); -void __cdecl FenceDoorFix(); -int __cdecl DRLG_L3Anvil(); -void __cdecl FixL3Warp(); -void __cdecl FixL3HallofHeroes(); -void __fastcall DRLG_L3LockRec(int x, int y); -BOOLEAN __cdecl DRLG_L3Lockout(); -void __fastcall CreateL3Dungeon(unsigned int rseed, int entry); -void __fastcall DRLG_L3(int entry); -void __cdecl InitL3Dungeon(); -BOOL __fastcall DRLG_L3FillRoom(int x1, int y1, int x2, int y2); -void __fastcall DRLG_L3CreateBlock(int x, int y, int obs, int dir); -void __fastcall DRLG_L3FloorArea(int x1, int y1, int x2, int y2); -void __cdecl DRLG_L3FillDiags(); -void __cdecl DRLG_L3FillSingles(); -void __cdecl DRLG_L3FillStraights(); -void __cdecl DRLG_L3Edges(); -int __cdecl DRLG_L3GetFloorArea(); -void __cdecl DRLG_L3MakeMegas(); -void __cdecl DRLG_L3River(); -void __cdecl DRLG_L3Pool(); -BOOL __fastcall DRLG_L3SpawnEdge(int x, int y, int *totarea); -BOOL __fastcall DRLG_L3Spawn(int x, int y, int *totarea); -void __cdecl DRLG_L3PoolFix(); -BOOL __fastcall DRLG_L3PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int ldir); -void __fastcall DRLG_L3PlaceRndSet(const unsigned char *miniset, int rndper); -void __cdecl DRLG_L3Wood(); -BOOL __fastcall WoodVertU(int i, int y); -BOOL __fastcall WoodVertD(int i, int y); -BOOL __fastcall WoodHorizL(int x, int j); -BOOL __fastcall WoodHorizR(int x, int j); -void __cdecl DRLG_L3Pass3(); -void __fastcall LoadL3Dungeon(char *sFileName, int vx, int vy); -void __fastcall LoadPreL3Dungeon(char *sFileName, int vx, int vy); +void AddFenceDoors(); +void FenceDoorFix(); +int DRLG_L3Anvil(); +void FixL3Warp(); +void FixL3HallofHeroes(); +void DRLG_L3LockRec(int x, int y); +BOOLEAN DRLG_L3Lockout(); +void CreateL3Dungeon(unsigned int rseed, int entry); +void DRLG_L3(int entry); +void InitL3Dungeon(); +BOOL DRLG_L3FillRoom(int x1, int y1, int x2, int y2); +void DRLG_L3CreateBlock(int x, int y, int obs, int dir); +void DRLG_L3FloorArea(int x1, int y1, int x2, int y2); +void DRLG_L3FillDiags(); +void DRLG_L3FillSingles(); +void DRLG_L3FillStraights(); +void DRLG_L3Edges(); +int DRLG_L3GetFloorArea(); +void DRLG_L3MakeMegas(); +void DRLG_L3River(); +void DRLG_L3Pool(); +BOOL DRLG_L3SpawnEdge(int x, int y, int *totarea); +BOOL DRLG_L3Spawn(int x, int y, int *totarea); +void DRLG_L3PoolFix(); +BOOL DRLG_L3PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int ldir); +void DRLG_L3PlaceRndSet(const unsigned char *miniset, int rndper); +void DRLG_L3Wood(); +BOOL WoodVertU(int i, int y); +BOOL WoodVertD(int i, int y); +BOOL WoodHorizL(int x, int j); +BOOL WoodHorizR(int x, int j); +void DRLG_L3Pass3(); +void LoadL3Dungeon(char *sFileName, int vx, int vy); +void LoadPreL3Dungeon(char *sFileName, int vx, int vy); /* rdata */ extern const unsigned char L3ConvTbl[16]; diff --git a/Source/drlg_l4.cpp b/Source/drlg_l4.cpp index 23d28543..647ce0f6 100644 --- a/Source/drlg_l4.cpp +++ b/Source/drlg_l4.cpp @@ -289,7 +289,7 @@ const unsigned char L4BTYPES[140] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -void __cdecl DRLG_LoadL4SP() +void DRLG_LoadL4SP() { setloadflag_2 = 0; if (QuestStatus(QTYPE_WARLRD)) { @@ -304,7 +304,7 @@ void __cdecl DRLG_LoadL4SP() // 5B50D8: using guessed type int setloadflag_2; // 679660: using guessed type char gbMaxPlayers; -void __cdecl DRLG_FreeL4SP() +void DRLG_FreeL4SP() { char *ptr; @@ -313,7 +313,7 @@ void __cdecl DRLG_FreeL4SP() mem_free_dbg(ptr); } -void __fastcall DRLG_L4SetSPRoom(int rx1, int ry1) +void DRLG_L4SetSPRoom(int rx1, int ry1) { int v2; // edi int v3; // esi @@ -356,7 +356,7 @@ void __fastcall DRLG_L4SetSPRoom(int rx1, int ry1) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __cdecl L4SaveQuads() +void L4SaveQuads() { char *v0; // esi char *v1; // edx @@ -403,7 +403,7 @@ void __cdecl L4SaveQuads() // 528A34: using guessed type int l4holdx; // 528A38: using guessed type int l4holdy; -void __fastcall DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1) +void DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1) { int v3; // ebx int v4; // edi @@ -440,7 +440,7 @@ void __fastcall DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1) } } -void __fastcall DRLG_LoadDiabQuads(BOOL preflag) +void DRLG_LoadDiabQuads(BOOL preflag) { BYTE *dun; @@ -482,7 +482,7 @@ void __fastcall DRLG_LoadDiabQuads(BOOL preflag) // 528A34: using guessed type int l4holdx; // 528A38: using guessed type int l4holdy; -BOOLEAN __fastcall IsDURWall(char d) +BOOLEAN IsDURWall(char d) { BOOLEAN result; // al @@ -493,7 +493,7 @@ BOOLEAN __fastcall IsDURWall(char d) return result; } -BOOLEAN __fastcall IsDLLWall(char dd) +BOOLEAN IsDLLWall(char dd) { BOOLEAN result; // al @@ -504,7 +504,7 @@ BOOLEAN __fastcall IsDLLWall(char dd) return result; } -void __cdecl L4FixRim() +void L4FixRim() { char(*v0)[20]; // eax @@ -521,7 +521,7 @@ void __cdecl L4FixRim() } // 52A4DC: using guessed type int dword_52A4DC; -void __cdecl DRLG_L4GeneralFix() +void DRLG_L4GeneralFix() { signed int v0; // ecx char *v1; // eax @@ -541,7 +541,7 @@ void __cdecl DRLG_L4GeneralFix() } while (v0 < 39); } -void __fastcall CreateL4Dungeon(int rseed, int entry) +void CreateL4Dungeon(int rseed, int entry) { int v2; // esi @@ -565,7 +565,7 @@ void __fastcall CreateL4Dungeon(int rseed, int entry) // 5D2458: using guessed type int dminx; // 5D245C: using guessed type int dminy; -void __fastcall DRLG_L4(int entry) +void DRLG_L4(int entry) { signed int v1; // ebp //int v2; // eax @@ -763,7 +763,7 @@ void __fastcall DRLG_L4(int entry) // 5B50D8: using guessed type int setloadflag_2; // 679660: using guessed type char gbMaxPlayers; -void __cdecl DRLG_L4Shadows() +void DRLG_L4Shadows() { signed int v0; // esi char *v1; // eax @@ -799,7 +799,7 @@ void __cdecl DRLG_L4Shadows() } while (v0 < 40); } -void __cdecl InitL4Dungeon() +void InitL4Dungeon() { signed int v0; // edx signed int v1; // eax @@ -821,7 +821,7 @@ void __cdecl InitL4Dungeon() } while (v0 < 40); } -void __cdecl L4makeDmt() +void L4makeDmt() { signed int v0; // ecx char(*v1)[40]; // ebp @@ -851,7 +851,7 @@ void __cdecl L4makeDmt() } while (v0 <= 77); } -void __cdecl L4AddWall() +void L4AddWall() { int v0; // edi int v1; // esi @@ -961,7 +961,7 @@ void __cdecl L4AddWall() } while (v0 < 40); } -int __fastcall L4HWallOk(int i, int j) +int L4HWallOk(int i, int j) { int v2; // esi int v3; // edi @@ -1013,7 +1013,7 @@ int __fastcall L4HWallOk(int i, int j) return result; } -int __fastcall L4VWallOk(int i, int j) +int L4VWallOk(int i, int j) { int v2; // ecx int result; // eax @@ -1060,7 +1060,7 @@ int __fastcall L4VWallOk(int i, int j) return result; } -void __fastcall L4HorizWall(int i, int j, int dx) +void L4HorizWall(int i, int j, int dx) { int v3; // esi int v4; // edi @@ -1113,7 +1113,7 @@ void __fastcall L4HorizWall(int i, int j, int dx) *v12 = 59; } -void __fastcall L4VertWall(int i, int j, int dy) +void L4VertWall(int i, int j, int dy) { int v3; // edi int v4; // esi @@ -1166,7 +1166,7 @@ void __fastcall L4VertWall(int i, int j, int dy) *(v10 - 41) = 55; } -void __cdecl L4tileFix() +void L4tileFix() { int i, j; @@ -1512,7 +1512,7 @@ void __cdecl L4tileFix() } } -void __cdecl DRLG_L4Subs() +void DRLG_L4Subs() { signed int v0; // edi signed int v1; // esi @@ -1564,7 +1564,7 @@ void __cdecl DRLG_L4Subs() } while (v6 < 40); } -void __cdecl L4makeDungeon() +void L4makeDungeon() { signed int v0; // ebx signed int v1; // esi @@ -1666,7 +1666,7 @@ void __cdecl L4makeDungeon() } while ((signed int)v26 > (signed int)&dung[18][19]); } -void __cdecl uShape() +void uShape() { int v0; // ecx signed int v1; // esi @@ -1752,7 +1752,7 @@ void __cdecl uShape() } while (v11); } -int __cdecl GetArea() +int GetArea() { int result; // eax signed int v1; // edx @@ -1775,7 +1775,7 @@ int __cdecl GetArea() return result; } -void __cdecl L4firstRoom() +void L4firstRoom() { int v0; // esi int v1; // edi @@ -1837,7 +1837,7 @@ LABEL_10: // 528A48: using guessed type int SP4y2; // 679660: using guessed type char gbMaxPlayers; -void __fastcall L4drawRoom(int x, int y, int width, int height) +void L4drawRoom(int x, int y, int width, int height) { int i; // esi int v5; // edi @@ -1856,7 +1856,7 @@ void __fastcall L4drawRoom(int x, int y, int width, int height) } } -void __fastcall L4roomGen(int x, int y, int w, int h, int dir) +void L4roomGen(int x, int y, int w, int h, int dir) { int v5; // eax int v6; // ecx @@ -1956,7 +1956,7 @@ void __fastcall L4roomGen(int x, int y, int w, int h, int dir) } } -BOOLEAN __fastcall L4checkRoom(int x, int y, int width, int height) +BOOLEAN L4checkRoom(int x, int y, int width, int height) { int v4; // esi int v5; // ebx @@ -1988,7 +1988,7 @@ BOOLEAN __fastcall L4checkRoom(int x, int y, int width, int height) return 0; } -BOOLEAN __fastcall DRLG_L4PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir) +BOOLEAN DRLG_L4PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir) { int v7; // ebx int v8; // esi @@ -2134,7 +2134,7 @@ BOOLEAN __fastcall DRLG_L4PlaceMiniSet(const unsigned char *miniset, int tmin, i // 5CF320: using guessed type int LvlViewY; // 5CF324: using guessed type int LvlViewX; -void __cdecl DRLG_L4FloodTVal() +void DRLG_L4FloodTVal() { int v0; // ebx int v1; // esi @@ -2166,7 +2166,7 @@ void __cdecl DRLG_L4FloodTVal() } // 5A5590: using guessed type char TransVal; -void __fastcall DRLG_L4FTVR(int i, int j, int x, int y, int d) +void DRLG_L4FTVR(int i, int j, int x, int y, int d) { int v5; // ebx int v6; // esi @@ -2265,7 +2265,7 @@ void __fastcall DRLG_L4FTVR(int i, int j, int x, int y, int d) } // 5A5590: using guessed type char TransVal; -void __cdecl DRLG_L4TransFix() +void DRLG_L4TransFix() { signed int v0; // ebx char *v1; // esi @@ -2320,7 +2320,7 @@ void __cdecl DRLG_L4TransFix() } while (v0 < 40); } -void __cdecl DRLG_L4Corners() +void DRLG_L4Corners() { signed int v0; // edx char *v1; // ecx @@ -2345,7 +2345,7 @@ void __cdecl DRLG_L4Corners() } while (v0 < 39); } -void __cdecl DRLG_L4Pass3() +void DRLG_L4Pass3() { int i, j, xx, yy; long v1, v2, v3, v4, lv; diff --git a/Source/drlg_l4.h b/Source/drlg_l4.h index 34b9ac7c..3cd5d6f2 100644 --- a/Source/drlg_l4.h +++ b/Source/drlg_l4.h @@ -21,41 +21,41 @@ extern char L4dungeon[80][80]; extern char dung[20][20]; //int dword_52A4DC; // weak -void __cdecl DRLG_LoadL4SP(); -void __cdecl DRLG_FreeL4SP(); -void __fastcall DRLG_L4SetSPRoom(int rx1, int ry1); -void __cdecl L4SaveQuads(); -void __fastcall DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1); -void __fastcall DRLG_LoadDiabQuads(BOOL preflag); -BOOLEAN __fastcall IsDURWall(char d); -BOOLEAN __fastcall IsDLLWall(char dd); -void __cdecl L4FixRim(); -void __cdecl DRLG_L4GeneralFix(); -void __fastcall CreateL4Dungeon(int rseed, int entry); -void __fastcall DRLG_L4(int entry); -void __cdecl DRLG_L4Shadows(); -void __cdecl InitL4Dungeon(); -void __cdecl L4makeDmt(); -void __cdecl L4AddWall(); -int __fastcall L4HWallOk(int i, int j); -int __fastcall L4VWallOk(int i, int j); -void __fastcall L4HorizWall(int i, int j, int dx); -void __fastcall L4VertWall(int i, int j, int dy); -void __cdecl L4tileFix(); -void __cdecl DRLG_L4Subs(); -void __cdecl L4makeDungeon(); -void __cdecl uShape(); -int __cdecl GetArea(); -void __cdecl L4firstRoom(); -void __fastcall L4drawRoom(int x, int y, int width, int height); -void __fastcall L4roomGen(int x, int y, int w, int h, int dir); -BOOLEAN __fastcall L4checkRoom(int x, int y, int width, int height); -BOOLEAN __fastcall DRLG_L4PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir); -void __cdecl DRLG_L4FloodTVal(); -void __fastcall DRLG_L4FTVR(int i, int j, int x, int y, int d); -void __cdecl DRLG_L4TransFix(); -void __cdecl DRLG_L4Corners(); -void __cdecl DRLG_L4Pass3(); +void DRLG_LoadL4SP(); +void DRLG_FreeL4SP(); +void DRLG_L4SetSPRoom(int rx1, int ry1); +void L4SaveQuads(); +void DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1); +void DRLG_LoadDiabQuads(BOOL preflag); +BOOLEAN IsDURWall(char d); +BOOLEAN IsDLLWall(char dd); +void L4FixRim(); +void DRLG_L4GeneralFix(); +void CreateL4Dungeon(int rseed, int entry); +void DRLG_L4(int entry); +void DRLG_L4Shadows(); +void InitL4Dungeon(); +void L4makeDmt(); +void L4AddWall(); +int L4HWallOk(int i, int j); +int L4VWallOk(int i, int j); +void L4HorizWall(int i, int j, int dx); +void L4VertWall(int i, int j, int dy); +void L4tileFix(); +void DRLG_L4Subs(); +void L4makeDungeon(); +void uShape(); +int GetArea(); +void L4firstRoom(); +void L4drawRoom(int x, int y, int width, int height); +void L4roomGen(int x, int y, int w, int h, int dir); +BOOLEAN L4checkRoom(int x, int y, int width, int height); +BOOLEAN DRLG_L4PlaceMiniSet(const unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir); +void DRLG_L4FloodTVal(); +void DRLG_L4FTVR(int i, int j, int x, int y, int d); +void DRLG_L4TransFix(); +void DRLG_L4Corners(); +void DRLG_L4Pass3(); /* rdata */ extern const unsigned char L4ConvTbl[16]; diff --git a/Source/dthread.cpp b/Source/dthread.cpp index 60092b2d..03b23ded 100644 --- a/Source/dthread.cpp +++ b/Source/dthread.cpp @@ -24,12 +24,12 @@ dthread_c_init(void) SEG_ALLOCATE(SEGMENT_C_INIT) _PVFV dthread_c_init_funcs[] = { &dthread_c_init }; -void __cdecl dthread_init_mutex() +void dthread_init_mutex() { InitializeCriticalSection(&sgMemCrit); } -void __cdecl dthread_cleanup_mutex_atexit() +void dthread_cleanup_mutex_atexit() { atexit(dthread_cleanup_mutex); } @@ -39,7 +39,7 @@ void __cdecl dthread_cleanup_mutex() DeleteCriticalSection(&sgMemCrit); } -void __fastcall dthread_remove_player(int pnum) +void dthread_remove_player(int pnum) { TMegaPkt *pkt; @@ -51,7 +51,7 @@ void __fastcall dthread_remove_player(int pnum) LeaveCriticalSection(&sgMemCrit); } -void __fastcall dthread_send_delta(int pnum, char cmd, void *pbSrc, int dwLen) +void dthread_send_delta(int pnum, char cmd, void *pbSrc, int dwLen) { TMegaPkt *pkt; TMegaPkt *p; @@ -77,7 +77,7 @@ void __fastcall dthread_send_delta(int pnum, char cmd, void *pbSrc, int dwLen) LeaveCriticalSection(&sgMemCrit); } -void __cdecl dthread_start() +void dthread_start() { char *error_buf; @@ -139,7 +139,7 @@ unsigned int __stdcall dthread_handler(void *unused) } // 679730: using guessed type int gdwDeltaBytesSec; -void __cdecl dthread_cleanup() +void dthread_cleanup() { char *error_buf; TMegaPkt *tmp1, *tmp2; diff --git a/Source/dthread.h b/Source/dthread.h index a0cf63e2..a92b0ee8 100644 --- a/Source/dthread.h +++ b/Source/dthread.h @@ -5,14 +5,14 @@ extern unsigned int glpDThreadId; // idb extern BOOLEAN dthread_running; -void __cdecl dthread_init_mutex(); -void __cdecl dthread_cleanup_mutex_atexit(); +void dthread_init_mutex(); +void dthread_cleanup_mutex_atexit(); void __cdecl dthread_cleanup_mutex(void); -void __fastcall dthread_remove_player(int pnum); -void __fastcall dthread_send_delta(int pnum, char cmd, void *pbSrc, int dwLen); -void __cdecl dthread_start(); +void dthread_remove_player(int pnum); +void dthread_send_delta(int pnum, char cmd, void *pbSrc, int dwLen); +void dthread_start(); unsigned int __stdcall dthread_handler(void *unused); -void __cdecl dthread_cleanup(); +void dthread_cleanup(); /* data */ extern int dthread_inf; // weak diff --git a/Source/dx.cpp b/Source/dx.cpp index 50264611..79841dd0 100644 --- a/Source/dx.cpp +++ b/Source/dx.cpp @@ -30,12 +30,12 @@ dx_c_init(void) SEG_ALLOCATE(SEGMENT_C_INIT) _PVFV dx_c_init_funcs[] = { &dx_c_init }; -void __cdecl dx_init_mutex() +void dx_init_mutex() { InitializeCriticalSection(&sgMemCrit); } -void __cdecl dx_cleanup_mutex_atexit() +void dx_cleanup_mutex_atexit() { atexit(dx_cleanup_mutex); } @@ -45,7 +45,7 @@ void __cdecl dx_cleanup_mutex(void) DeleteCriticalSection(&sgMemCrit); } -void __fastcall dx_init(HWND hWnd) +void dx_init(HWND hWnd) { HWND v1; // esi GUID *v2; // ecx @@ -101,7 +101,7 @@ void __fastcall dx_init(HWND hWnd) } // 52A549: using guessed type char gbEmulate; -void __cdecl dx_create_back_buffer() +void dx_create_back_buffer() { DDSCAPS caps; HRESULT error_code; @@ -160,7 +160,7 @@ void __cdecl dx_create_back_buffer() } // 52A548: using guessed type char gbBackBuf; -void __cdecl dx_create_primary_surface() +void dx_create_primary_surface() { DDSURFACEDESC ddsd; HRESULT error_code; @@ -178,7 +178,7 @@ void __cdecl dx_create_primary_surface() ErrDlg(IDD_DIALOG1, error_code, "C:\\Src\\Diablo\\Source\\dx.cpp", 109); } -HRESULT __fastcall dx_DirectDrawCreate(LPGUID guid, LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter) +HRESULT dx_DirectDrawCreate(LPGUID guid, LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter) { HRESULT(WINAPI * DirectDrawCreate) (LPGUID lpGuid, LPDIRECTDRAW * lplpDD, LPUNKNOWN pUnkOuter); @@ -197,7 +197,7 @@ HRESULT __fastcall dx_DirectDrawCreate(LPGUID guid, LPDIRECTDRAW *lplpDD, LPUNKN return DirectDrawCreate(guid, lplpDD, pUnkOuter); } -void __fastcall j_lock_buf_priv(BYTE idx) +void j_lock_buf_priv(BYTE idx) { #ifdef _DEBUG ++locktbl[idx]; @@ -205,7 +205,7 @@ void __fastcall j_lock_buf_priv(BYTE idx) lock_buf_priv(); } -void __cdecl lock_buf_priv() +void lock_buf_priv() { DDSURFACEDESC ddsd; HRESULT error_code; @@ -242,7 +242,7 @@ void __cdecl lock_buf_priv() sgdwLockCount++; } -void __fastcall j_unlock_buf_priv(BYTE idx) +void j_unlock_buf_priv(BYTE idx) { #ifdef _DEBUG if (!locktbl[idx]) @@ -252,7 +252,7 @@ void __fastcall j_unlock_buf_priv(BYTE idx) unlock_buf_priv(); } -void __cdecl unlock_buf_priv() +void unlock_buf_priv() { HRESULT error_code; @@ -278,7 +278,7 @@ void __cdecl unlock_buf_priv() LeaveCriticalSection(&sgMemCrit); } -void __cdecl dx_cleanup() +void dx_cleanup() { BYTE *v0; // ecx @@ -327,7 +327,7 @@ void __cdecl dx_cleanup() } } -void __cdecl dx_reinit() +void dx_reinit() { int lockCount; diff --git a/Source/dx.h b/Source/dx.h index e5ae74a8..0b9dd962 100644 --- a/Source/dx.h +++ b/Source/dx.h @@ -11,20 +11,20 @@ extern char gbBackBuf; // weak extern char gbEmulate; // weak extern HMODULE ghDiabMod; // idb -void __cdecl dx_init_mutex(); -void __cdecl dx_cleanup_mutex_atexit(); +void dx_init_mutex(); +void dx_cleanup_mutex_atexit(); void __cdecl dx_cleanup_mutex(void); -void __fastcall dx_init(HWND hWnd); -void __cdecl dx_create_back_buffer(); -void __cdecl dx_create_primary_surface(); -HRESULT __fastcall dx_DirectDrawCreate(LPGUID guid, LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter); -void __fastcall j_lock_buf_priv(BYTE idx); -void __cdecl lock_buf_priv(); -void __fastcall j_unlock_buf_priv(BYTE idx); -void __cdecl unlock_buf_priv(); -void __cdecl dx_cleanup(); -void __cdecl dx_reinit(); -void __cdecl j_dx_reinit(); +void dx_init(HWND hWnd); +void dx_create_back_buffer(); +void dx_create_primary_surface(); +HRESULT dx_DirectDrawCreate(LPGUID guid, LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter); +void j_lock_buf_priv(BYTE idx); +void lock_buf_priv(); +void j_unlock_buf_priv(BYTE idx); +void unlock_buf_priv(); +void dx_cleanup(); +void dx_reinit(); +void j_dx_reinit(); /* data */ diff --git a/Source/effects.cpp b/Source/effects.cpp index bc10fbe4..0df91e16 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -875,7 +875,7 @@ TSFX sgSFX[NUM_SFX] = { // clang-format on }; -BOOL __fastcall effect_is_playing(int nSFX) +BOOL effect_is_playing(int nSFX) { TSFX *sfx = &sgSFX[nSFX]; if (sfx->pSnd) @@ -887,7 +887,7 @@ BOOL __fastcall effect_is_playing(int nSFX) return FALSE; } -void __cdecl sfx_stop() +void sfx_stop() { if (sfx_stream) { SFileDdaEnd(sfx_stream); @@ -897,7 +897,7 @@ void __cdecl sfx_stop() } } -void __fastcall InitMonsterSND(int monst) +void InitMonsterSND(int monst) { TSnd *pSnd; char name[MAX_PATH]; @@ -924,7 +924,7 @@ void __fastcall InitMonsterSND(int monst) } } -void __cdecl FreeEffects() +void FreeEffects() { int mtype, i, j, k; char *file; @@ -947,7 +947,7 @@ void __cdecl FreeEffects() } } -void __fastcall PlayEffect(int i, int mode) +void PlayEffect(int i, int mode) { int sndIdx, mi, lVolume, lPan; TSnd *snd; @@ -974,7 +974,7 @@ void __fastcall PlayEffect(int i, int mode) } // 676194: using guessed type char gbBufferMsgs; -BOOL __fastcall calc_snd_position(int x, int y, int *plVolume, int *plPan) +BOOL calc_snd_position(int x, int y, int *plVolume, int *plPan) { int pan, volume; @@ -999,13 +999,13 @@ BOOL __fastcall calc_snd_position(int x, int y, int *plVolume, int *plPan) return TRUE; } -void __fastcall PlaySFX(int psfx) +void PlaySFX(int psfx) { psfx = RndSFX(psfx); PlaySFX_priv(&sgSFX[psfx], 0, 0, 0); } -void __fastcall PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y) +void PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y) { int lPan, lVolume; @@ -1040,7 +1040,7 @@ void __fastcall PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y) // 676194: using guessed type char gbBufferMsgs; // 679660: using guessed type char gbMaxPlayers; -void __fastcall stream_play(TSFX *pSFX, int lVolume, int lPan) +void stream_play(TSFX *pSFX, int lVolume, int lPan) { BOOL success; @@ -1069,7 +1069,7 @@ void __fastcall stream_play(TSFX *pSFX, int lVolume, int lPan) } } -int __fastcall RndSFX(int psfx) +int RndSFX(int psfx) { int v1; // esi int v3; // [esp-4h] [ebp-8h] @@ -1101,7 +1101,7 @@ int __fastcall RndSFX(int psfx) return psfx; } -void __fastcall PlaySfxLoc(int psfx, int x, int y) +void PlaySfxLoc(int psfx, int x, int y) { TSnd *pSnd; @@ -1116,7 +1116,7 @@ void __fastcall PlaySfxLoc(int psfx, int x, int y) PlaySFX_priv(&sgSFX[psfx], 1, x, y); } -void __cdecl FreeMonsterSnd() +void FreeMonsterSnd() { int i, j, k; @@ -1133,7 +1133,7 @@ void __cdecl FreeMonsterSnd() } } -void __cdecl sound_stop() +void sound_stop() { int i; // edi @@ -1143,7 +1143,7 @@ void __cdecl sound_stop() } } -void __cdecl sound_update() +void sound_update() { int current, end; @@ -1159,7 +1159,7 @@ void __cdecl sound_update() // 415DBA: could not find valid save-restore pair for ebp -void __cdecl effects_cleanup_sfx() +void effects_cleanup_sfx() { DWORD i; @@ -1173,7 +1173,7 @@ void __cdecl effects_cleanup_sfx() } } -void __cdecl stream_update() +void stream_update() { UCHAR mask = 0; if (gbMaxPlayers > 1) { @@ -1192,7 +1192,7 @@ void __cdecl stream_update() } // 679660: using guessed type char gbMaxPlayers; -void __fastcall priv_sound_init(UCHAR bLoadMask) +void priv_sound_init(UCHAR bLoadMask) { UCHAR pc, bFlags; DWORD i; @@ -1226,7 +1226,7 @@ void __fastcall priv_sound_init(UCHAR bLoadMask) } } -void __cdecl sound_init() +void sound_init() { priv_sound_init(SFX_UI); } diff --git a/Source/effects.h b/Source/effects.h index 49a2a223..3741bcbb 100644 --- a/Source/effects.h +++ b/Source/effects.h @@ -7,24 +7,24 @@ extern int sfxdnum; extern HANDLE sfx_stream; extern TSFX *sfx_data_cur; -BOOL __fastcall effect_is_playing(int nSFX); -void __cdecl sfx_stop(); -void __fastcall InitMonsterSND(int monst); -void __cdecl FreeEffects(); -void __fastcall PlayEffect(int i, int mode); -BOOL __fastcall calc_snd_position(int x, int y, int *plVolume, int *plPan); -void __fastcall PlaySFX(int psfx); -void __fastcall PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y); -void __fastcall stream_play(TSFX *pSFX, int lVolume, int lPan); -int __fastcall RndSFX(int psfx); -void __fastcall PlaySfxLoc(int psfx, int x, int y); -void __cdecl FreeMonsterSnd(); -void __cdecl sound_stop(); -void __cdecl sound_update(); -void __cdecl effects_cleanup_sfx(); -void __cdecl stream_update(); -void __fastcall priv_sound_init(UCHAR bLoadMask); -void __cdecl sound_init(); +BOOL effect_is_playing(int nSFX); +void sfx_stop(); +void InitMonsterSND(int monst); +void FreeEffects(); +void PlayEffect(int i, int mode); +BOOL calc_snd_position(int x, int y, int *plVolume, int *plPan); +void PlaySFX(int psfx); +void PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y); +void stream_play(TSFX *pSFX, int lVolume, int lPan); +int RndSFX(int psfx); +void PlaySfxLoc(int psfx, int x, int y); +void FreeMonsterSnd(); +void sound_stop(); +void sound_update(); +void effects_cleanup_sfx(); +void stream_update(); +void priv_sound_init(UCHAR bLoadMask); +void sound_init(); void __stdcall effects_play_sound(char *snd_file); /* rdata */ diff --git a/Source/encrypt.cpp b/Source/encrypt.cpp index 936d09f8..d678cade 100644 --- a/Source/encrypt.cpp +++ b/Source/encrypt.cpp @@ -4,7 +4,7 @@ DWORD hashtable[1280]; -void __fastcall Decrypt(void *block, DWORD size, DWORD key) +void Decrypt(void *block, DWORD size, DWORD key) { DWORD *castBlock; DWORD seed, i; @@ -20,7 +20,7 @@ void __fastcall Decrypt(void *block, DWORD size, DWORD key) } } -void __fastcall Encrypt(void *block, DWORD size, DWORD key) +void Encrypt(void *block, DWORD size, DWORD key) { DWORD *castBlock; DWORD seed, i, ch; @@ -37,7 +37,7 @@ void __fastcall Encrypt(void *block, DWORD size, DWORD key) } } -DWORD __fastcall Hash(const char *s, int type) +DWORD Hash(const char *s, int type) { char ch; DWORD seed1, seed2; @@ -53,7 +53,7 @@ DWORD __fastcall Hash(const char *s, int type) return seed1; } -void __cdecl InitHash() +void InitHash() { DWORD seed, ch; int i, j; @@ -70,7 +70,7 @@ void __cdecl InitHash() } } -int __fastcall PkwareCompress(void *buf, int size) +int PkwareCompress(void *buf, int size) { BYTE *srcData, *destData; char *ptr; @@ -136,7 +136,7 @@ void __cdecl PkwareBufferWrite(char *buf, unsigned int *size, void *param) pInfo->destOffset += *size; } -void __fastcall PkwareDecompress(void *param, int recv_size, int dwMaxBytes) +void PkwareDecompress(void *param, int recv_size, int dwMaxBytes) { char *ptr; BYTE *pbInBuff, *pbOutBuff; diff --git a/Source/encrypt.h b/Source/encrypt.h index 042f4919..0d76b0f8 100644 --- a/Source/encrypt.h +++ b/Source/encrypt.h @@ -4,13 +4,13 @@ extern DWORD hashtable[1280]; -void __fastcall Decrypt(void *block, DWORD size, DWORD key); -void __fastcall Encrypt(void *block, DWORD size, DWORD key); -DWORD __fastcall Hash(const char *s, int type); -void __cdecl InitHash(); -int __fastcall PkwareCompress(void *buf, int size); +void Decrypt(void *block, DWORD size, DWORD key); +void Encrypt(void *block, DWORD size, DWORD key); +DWORD Hash(const char *s, int type); +void InitHash(); +int PkwareCompress(void *buf, int size); unsigned int __cdecl PkwareBufferRead(char *buf, unsigned int *size, void *param); void __cdecl PkwareBufferWrite(char *buf, unsigned int *size, void *param); -void __fastcall PkwareDecompress(void *param, int recv_size, int dwMaxBytes); +void PkwareDecompress(void *param, int recv_size, int dwMaxBytes); #endif /* __ENCRYPT_H__ */ diff --git a/Source/engine.cpp b/Source/engine.cpp index d90ea518..2419e987 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -18,7 +18,7 @@ int dword_52B99C; // BOOLEAN valid - if x/y are in bounds const int rand_increment = 1; const int rand_multiplier = 0x015A4E35; -void __fastcall CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { int w; @@ -117,7 +117,7 @@ void __fastcall CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, #endif } -void __fastcall CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) +void CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) { DWORD *pFrameTable; @@ -137,7 +137,7 @@ void __fastcall CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid nWidth); } -void __fastcall CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth) +void CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth) { DWORD *pFrameTable; @@ -161,7 +161,7 @@ void __fastcall CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth) * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes; @@ -202,7 +202,7 @@ void __fastcall CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWi * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes; @@ -235,7 +235,7 @@ void __fastcall CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWid CelDrawDatOnly(pBuff, pRLEBytes + nDataStart, nDataSize, nWidth); } -void __fastcall CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { int w; BYTE *tbl; @@ -389,7 +389,7 @@ void __fastcall CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSi } // 69BEF8: using guessed type int light_table_index; -void __fastcall CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { int w; BOOL shift; @@ -577,7 +577,7 @@ void __fastcall CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataS } // 69BEF8: using guessed type int light_table_index; -void __fastcall CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) +void CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) { int nDataSize; BYTE *pDecodeTo, *pRLEBytes; @@ -607,7 +607,7 @@ void __fastcall CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes, *pDecodeTo; @@ -651,7 +651,7 @@ void __fastcall CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes; @@ -697,7 +697,7 @@ void __fastcall CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, in * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) +void CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) { int w, hdr, idx, nDataSize, v1; BYTE *src, *dst, *tbl, *pRLEBytes; @@ -807,7 +807,7 @@ void __fastcall CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int } // 525728: using guessed type int light4flag; -void __fastcall Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { int w; @@ -925,7 +925,7 @@ void __fastcall Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes; @@ -966,7 +966,7 @@ void __fastcall Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nW * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes; @@ -998,7 +998,7 @@ void __fastcall Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWi Cel2DecDatOnly(pBuff, pRLEBytes + nDataStart, nDataSize, nWidth); } -void __fastcall Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { int w; BYTE *tbl; @@ -1168,7 +1168,7 @@ void __fastcall Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataS // 69BEF8: using guessed type int light_table_index; // 69CF0C: using guessed type int gpBufEnd; -void __fastcall Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { int w; BOOL shift; @@ -1375,7 +1375,7 @@ void __fastcall Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nData * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes, *pDecodeTo; @@ -1418,7 +1418,7 @@ void __fastcall Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataCap, nDataSize; BYTE *pRLEBytes; @@ -1460,7 +1460,7 @@ void __fastcall Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) +void Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) { int w, hdr, idx, nDataSize, v1; BYTE *src, *dst, *tbl; @@ -1582,7 +1582,7 @@ void __fastcall Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, in // 525728: using guessed type int light4flag; // 69CF0C: using guessed type int gpBufEnd; -void __fastcall CelDecodeRect(BYTE *pBuff, int CelSkip, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth) +void CelDecodeRect(BYTE *pBuff, int CelSkip, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth) { BYTE *src, *dst, *end; @@ -1702,7 +1702,7 @@ void __fastcall CelDecodeRect(BYTE *pBuff, int CelSkip, int hgt, int wdt, BYTE * * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int w, nDataStart, nDataCap, nDataSize; BYTE *src, *dst; @@ -1843,7 +1843,7 @@ void __fastcall CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall CelDrawHdrClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void CelDrawHdrClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int w, nDataStart, nDataCap, nDataSize; BYTE *src, *dst; @@ -2023,7 +2023,7 @@ void __fastcall CelDrawHdrClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nC } // 69CF0C: using guessed type int gpBufEnd; -void __fastcall ENG_set_pixel(int sx, int sy, BYTE col) +void ENG_set_pixel(int sx, int sy, BYTE col) { BYTE *dst; @@ -2050,7 +2050,7 @@ void __fastcall ENG_set_pixel(int sx, int sy, BYTE col) } // 69CF0C: using guessed type int gpBufEnd; -void __fastcall engine_draw_pixel(int sx, int sy) +void engine_draw_pixel(int sx, int sy) { BYTE *dst; @@ -2085,7 +2085,7 @@ void __fastcall engine_draw_pixel(int sx, int sy) // 52B99C: using guessed type int dword_52B99C; // 69CF0C: using guessed type int gpBufEnd; -void __fastcall DrawLine(int x0, int y0, int x1, int y1, UCHAR col) +void DrawLine(int x0, int y0, int x1, int y1, UCHAR col) { int v5; // ST18_4 int v6; // ST2C_4 @@ -2321,7 +2321,7 @@ void __fastcall DrawLine(int x0, int y0, int x1, int y1, UCHAR col) // 52B970: using guessed type int dword_52B970; // 52B99C: using guessed type int dword_52B99C; -int __fastcall GetDirection(int x1, int y1, int x2, int y2) +int GetDirection(int x1, int y1, int x2, int y2) { int mx, my; int md, ny; @@ -2361,7 +2361,7 @@ int __fastcall GetDirection(int x1, int y1, int x2, int y2) return md; } -void __fastcall SetRndSeed(int s) +void SetRndSeed(int s) { SeedCount = 0; sglGameSeed = s; @@ -2371,7 +2371,7 @@ void __fastcall SetRndSeed(int s) // 52B97C: using guessed type int sglGameSeed; // 52B998: using guessed type int SeedCount; -int __cdecl GetRndSeed() +int GetRndSeed() { SeedCount++; sglGameSeed = rand_multiplier * sglGameSeed + rand_increment; @@ -2380,7 +2380,7 @@ int __cdecl GetRndSeed() // 52B97C: using guessed type int sglGameSeed; // 52B998: using guessed type int SeedCount; -int __fastcall random(BYTE idx, int v) +int random(BYTE idx, int v) { if (v <= 0) return 0; @@ -2402,12 +2402,12 @@ engine_c_init(void) SEG_ALLOCATE(SEGMENT_C_INIT) _PVFV engine_c_init_funcs[] = { &engine_c_init }; -void __cdecl mem_init_mutex() +void mem_init_mutex() { InitializeCriticalSection(&sgMemCrit); } -void __cdecl mem_atexit_mutex() +void mem_atexit_mutex() { atexit(mem_free_mutex); } @@ -2417,7 +2417,7 @@ void __cdecl mem_free_mutex(void) DeleteCriticalSection(&sgMemCrit); } -unsigned char *__fastcall DiabloAllocPtr(int dwBytes) +unsigned char *DiabloAllocPtr(int dwBytes) { BYTE *buf; @@ -2432,7 +2432,7 @@ unsigned char *__fastcall DiabloAllocPtr(int dwBytes) return buf; } -void __fastcall mem_free_dbg(void *p) +void mem_free_dbg(void *p) { if (p) { EnterCriticalSection(&sgMemCrit); @@ -2441,7 +2441,7 @@ void __fastcall mem_free_dbg(void *p) } } -BYTE *__fastcall LoadFileInMem(char *pszName, int *pdwFileLen) +BYTE *LoadFileInMem(char *pszName, int *pdwFileLen) { HANDLE file; BYTE *buf; @@ -2464,7 +2464,7 @@ BYTE *__fastcall LoadFileInMem(char *pszName, int *pdwFileLen) return buf; } -void __fastcall LoadFileWithMem(char *pszName, void *buf) +void LoadFileWithMem(char *pszName, void *buf) { char *v2; // ebx char *v3; // edi @@ -2483,7 +2483,7 @@ void __fastcall LoadFileWithMem(char *pszName, void *buf) WCloseFile(a1); } -void __fastcall Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel) +void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel) { int i, nDataSize; char width; @@ -2526,7 +2526,7 @@ void __fastcall Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel) * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataSize; BYTE *pRLEBytes; @@ -2564,7 +2564,7 @@ void __fastcall Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid nWidth); } -void __fastcall Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) __asm { @@ -2709,7 +2709,7 @@ void __fastcall Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, i * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataSize; BYTE *pRLEBytes; @@ -2748,7 +2748,7 @@ void __fastcall Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel col); } -void __fastcall Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col) +void Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col) { #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) __asm { @@ -2914,7 +2914,7 @@ void __fastcall Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, i * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) +void Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) { int hdr, idx, nDataSize; BYTE *pRLEBytes; @@ -2960,7 +2960,7 @@ void __fastcall Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid } // 525728: using guessed type int light4flag; -void __fastcall Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable) +void Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable) { #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) __asm { @@ -3115,7 +3115,7 @@ void __fastcall Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSi * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int hdr, nDataSize; BYTE *pRLEBytes, *pDecodeTo; @@ -3159,7 +3159,7 @@ void __fastcall Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataSize; BYTE *pRLEBytes; @@ -3197,7 +3197,7 @@ void __fastcall Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid nWidth); } -void __fastcall Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) +void Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) { #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) __asm { @@ -3356,7 +3356,7 @@ void __fastcall Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, i * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int nDataStart, nDataSize; BYTE *pRLEBytes; @@ -3398,7 +3398,7 @@ void __fastcall Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCe } // 69CF0C: using guessed type int gpBufEnd; -void __fastcall Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col) +void Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col) { #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) __asm { @@ -3576,7 +3576,7 @@ void __fastcall Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) +void Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light) { int hdr, idx, nDataSize; BYTE *pRLEBytes; @@ -3622,7 +3622,7 @@ void __fastcall Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid } // 525728: using guessed type int light4flag; -void __fastcall Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable) +void Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable) { #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) __asm { @@ -3791,7 +3791,7 @@ void __fastcall Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSi * @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8 * @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8 */ -void __fastcall Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int hdr, nDataSize; BYTE *pRLEBytes, *pDecodeTo; @@ -3831,7 +3831,7 @@ void __fastcall Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid } // 69BEF8: using guessed type int light_table_index; -void __fastcall PlayInGameMovie(char *pszMovie) +void PlayInGameMovie(char *pszMovie) { PaletteFadeOut(8); play_movie(pszMovie, 0); diff --git a/Source/engine.h b/Source/engine.h index 7dc6848c..f518ecdc 100644 --- a/Source/engine.h +++ b/Source/engine.h @@ -11,58 +11,58 @@ extern int orgseed; // weak extern int SeedCount; // weak extern int dword_52B99C; // bool valid - if x/y are in bounds -void __fastcall CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth); -void __fastcall CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth); -void __fastcall CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth); -void __fastcall CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); -void __fastcall Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); -void __fastcall CelDecodeRect(BYTE *pBuff, int always_0, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth); -void __fastcall CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall CelDrawHdrClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall ENG_set_pixel(int sx, int sy, BYTE col); -void __fastcall engine_draw_pixel(int sx, int sy); -void __fastcall DrawLine(int x0, int y0, int x1, int y1, UCHAR col); -int __fastcall GetDirection(int x1, int y1, int x2, int y2); -void __fastcall SetRndSeed(int s); -int __cdecl GetRndSeed(); -int __fastcall random(BYTE idx, int v); -void __cdecl mem_init_mutex(); -void __cdecl mem_atexit_mutex(); +void CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth); +void CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth); +void CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth); +void CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); +void Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); +void CelDecodeRect(BYTE *pBuff, int always_0, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth); +void CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void CelDrawHdrClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void ENG_set_pixel(int sx, int sy, BYTE col); +void engine_draw_pixel(int sx, int sy); +void DrawLine(int x0, int y0, int x1, int y1, UCHAR col); +int GetDirection(int x1, int y1, int x2, int y2); +void SetRndSeed(int s); +int GetRndSeed(); +int random(BYTE idx, int v); +void mem_init_mutex(); +void mem_atexit_mutex(); void __cdecl mem_free_mutex(void); -unsigned char *__fastcall DiabloAllocPtr(int dwBytes); -void __fastcall mem_free_dbg(void *p); -BYTE *__fastcall LoadFileInMem(char *pszName, int *pdwFileLen); -void __fastcall LoadFileWithMem(char *pszName, void *buf); -void __fastcall Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel); -void __fastcall Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col); -void __fastcall Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); -void __fastcall Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable); -void __fastcall Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); -void __fastcall Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col); -void __fastcall Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); -void __fastcall Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable); -void __fastcall Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); -void __fastcall PlayInGameMovie(char *pszMovie); +unsigned char *DiabloAllocPtr(int dwBytes); +void mem_free_dbg(void *p); +BYTE *LoadFileInMem(char *pszName, int *pdwFileLen); +void LoadFileWithMem(char *pszName, void *buf); +void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel); +void Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col); +void Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); +void Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable); +void Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); +void Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col); +void Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light); +void Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable); +void Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); +void PlayInGameMovie(char *pszMovie); /* rdata */ diff --git a/Source/error.cpp b/Source/error.cpp index 1056b1c9..c18c7748 100644 --- a/Source/error.cpp +++ b/Source/error.cpp @@ -54,7 +54,7 @@ char *MsgStrings[44] = { "Arcane knowledge gained!" }; -void __fastcall InitDiabloMsg(char e) +void InitDiabloMsg(char e) { int i; @@ -71,7 +71,7 @@ void __fastcall InitDiabloMsg(char e) msgdelay = 70; } -void __cdecl ClrDiabloMsg() +void ClrDiabloMsg() { int i; @@ -82,7 +82,7 @@ void __cdecl ClrDiabloMsg() msgcnt = 0; } -void __cdecl DrawDiabloMsg() +void DrawDiabloMsg() { int v0; // esi signed int v1; // edi diff --git a/Source/error.h b/Source/error.h index 0234401d..4191582a 100644 --- a/Source/error.h +++ b/Source/error.h @@ -7,9 +7,9 @@ extern char msgdelay; extern char msgflag; extern char msgcnt; -void __fastcall InitDiabloMsg(char e); -void __cdecl ClrDiabloMsg(); -void __cdecl DrawDiabloMsg(); +void InitDiabloMsg(char e); +void ClrDiabloMsg(); +void DrawDiabloMsg(); /* data */ extern char *MsgStrings[44]; diff --git a/Source/fault.cpp b/Source/fault.cpp index 61930cd7..ec6cdd6f 100644 --- a/Source/fault.cpp +++ b/Source/fault.cpp @@ -19,14 +19,14 @@ fault_c_init(void) SEG_ALLOCATE(SEGMENT_C_INIT) _PVFV exception_c_init_funcs[] = { &fault_c_init }; -void __cdecl fault_init_filter() +void fault_init_filter() { fault_set_filter(&fault_unused); } -void __cdecl fault_cleanup_filter_atexit() +void fault_cleanup_filter_atexit() { - atexit((void (*)(void))fault_cleanup_filter); + atexit((void (__cdecl *)(void ))fault_cleanup_filter); } LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_cleanup_filter() @@ -83,7 +83,7 @@ LONG __stdcall TopLevelExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo) return EXCEPTION_CONTINUE_SEARCH; } -void __fastcall fault_hex_format(BYTE *ptr, unsigned int numBytes) +void fault_hex_format(BYTE *ptr, unsigned int numBytes) { DWORD i, bytesRead; const char *fmt; @@ -124,7 +124,7 @@ void __fastcall fault_hex_format(BYTE *ptr, unsigned int numBytes) log_printf("\r\n"); } -void __fastcall fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, int iMaxLength, int *sectionNum, int *sectionOffset) +void fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, int iMaxLength, int *sectionNum, int *sectionOffset) { MEMORY_BASIC_INFORMATION memInfo; PIMAGE_DOS_HEADER dosHeader; @@ -175,7 +175,7 @@ void __fastcall fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, int } } -void __fastcall fault_call_stack(void *instr, STACK_FRAME *stackFrame) +void fault_call_stack(void *instr, STACK_FRAME *stackFrame) { STACK_FRAME *oldStackFrame; char szModuleName[MAX_PATH]; @@ -200,7 +200,7 @@ void __fastcall fault_call_stack(void *instr, STACK_FRAME *stackFrame) log_printf("\r\n"); } -char *__fastcall fault_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize) +char *fault_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize) { const char *s; @@ -282,18 +282,18 @@ char *__fastcall fault_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD return lpString1; } -void *__fastcall fault_set_filter(void *unused) +void *fault_set_filter(void *unused) { lpTopLevelExceptionFilter = SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)TopLevelExceptionFilter); return unused; } -LPTOP_LEVEL_EXCEPTION_FILTER __fastcall fault_reset_filter(void *unused) +LPTOP_LEVEL_EXCEPTION_FILTER fault_reset_filter(void *unused) { return SetUnhandledExceptionFilter(lpTopLevelExceptionFilter); } -LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_get_filter() +LPTOP_LEVEL_EXCEPTION_FILTER fault_get_filter() { return lpTopLevelExceptionFilter; } diff --git a/Source/fault.h b/Source/fault.h index 324f1e4e..ec669c7a 100644 --- a/Source/fault.h +++ b/Source/fault.h @@ -10,16 +10,16 @@ typedef struct STACK_FRAME { extern int fault_unused; extern LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter; -void __cdecl fault_init_filter(); -void __cdecl fault_cleanup_filter_atexit(); +void fault_init_filter(); +void fault_cleanup_filter_atexit(); LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_cleanup_filter(); LONG __stdcall TopLevelExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo); -void __fastcall fault_hex_format(BYTE *ptr, unsigned int numBytes); -void __fastcall fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, int iMaxLength, int *sectionNum, int *sectionOffset); -void __fastcall fault_call_stack(void *instr, STACK_FRAME *stackAddr); -char *__fastcall fault_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize); -void * __fastcall fault_set_filter(void *unused); -LPTOP_LEVEL_EXCEPTION_FILTER __fastcall fault_reset_filter(void *unused); -LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_get_filter(); +void fault_hex_format(BYTE *ptr, unsigned int numBytes); +void fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, int iMaxLength, int *sectionNum, int *sectionOffset); +void fault_call_stack(void *instr, STACK_FRAME *stackAddr); +char *fault_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize); +void * fault_set_filter(void *unused); +LPTOP_LEVEL_EXCEPTION_FILTER fault_reset_filter(void *unused); +LPTOP_LEVEL_EXCEPTION_FILTER fault_get_filter(); #endif /* __FAULT_H__ */ diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index 3954fc56..c9cd36c8 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -38,9 +38,9 @@ char *music_toggle_names[] = { "Music", "Music Disabled" }; char *sound_toggle_names[] = { "Sound", "Sound Disabled" }; char *color_cycling_toggle_names[] = { "Color Cycling Off", "Color Cycling On" }; -void __cdecl gamemenu_previous() +void gamemenu_previous() { - void(__fastcall * proc)(TMenuItem *); + void(* proc)(TMenuItem *); TMenuItem *item; if (gbMaxPlayers == 1) { @@ -54,7 +54,7 @@ void __cdecl gamemenu_previous() PressEscKey(); } -void __fastcall gamemenu_enable_single(TMenuItem *a1) +void gamemenu_enable_single(TMenuItem *a1) { BOOL enable; @@ -67,17 +67,17 @@ void __fastcall gamemenu_enable_single(TMenuItem *a1) gmenu_enable(sgSingleMenu, enable); } -void __fastcall gamemenu_enable_multi(TMenuItem *a1) +void gamemenu_enable_multi(TMenuItem *a1) { gmenu_enable(&sgMultiMenu[2], deathflag); } -void __cdecl gamemenu_off() +void gamemenu_off() { gmenu_call_proc(0, NULL); } -void __cdecl gamemenu_handle_previous() +void gamemenu_handle_previous() { if (gmenu_exception()) gamemenu_off(); @@ -85,12 +85,12 @@ void __cdecl gamemenu_handle_previous() gamemenu_previous(); } -void __fastcall j_gamemenu_previous(BOOL a1) +void j_gamemenu_previous(BOOL a1) { gamemenu_previous(); } -void __fastcall gamemenu_new_game(BOOL a1) +void gamemenu_new_game(BOOL a1) { int i; @@ -107,13 +107,13 @@ void __fastcall gamemenu_new_game(BOOL a1) } // 52571C: using guessed type int drawpanflag; -void __fastcall gamemenu_quit_game(BOOL a1) +void gamemenu_quit_game(BOOL a1) { gamemenu_new_game(a1); gbRunGameResult = FALSE; } -void __fastcall gamemenu_load_game(BOOL a1) +void gamemenu_load_game(BOOL a1) { WNDPROC saveProc = SetWindowProc(DisableInputWndProc); gamemenu_off(); @@ -134,7 +134,7 @@ void __fastcall gamemenu_load_game(BOOL a1) } // 52571C: using guessed type int drawpanflag; -void __fastcall gamemenu_save_game(BOOL a1) +void gamemenu_save_game(BOOL a1) { if (pcurs == CURSOR_HAND) { if (plr[myplr]._pmode == PM_DEATH || deathflag) { @@ -157,12 +157,12 @@ void __fastcall gamemenu_save_game(BOOL a1) } // 52571C: using guessed type int drawpanflag; -void __fastcall gamemenu_restart_town(BOOL a1) +void gamemenu_restart_town(BOOL a1) { NetSendCmd(TRUE, CMD_RETOWN); } -void __fastcall gamemenu_options(BOOL a1) +void gamemenu_options(BOOL a1) { gamemenu_get_music(); gamemenu_get_sound(); @@ -171,12 +171,12 @@ void __fastcall gamemenu_options(BOOL a1) gmenu_call_proc(sgOptionMenu, NULL); } -void __cdecl gamemenu_get_music() +void gamemenu_get_music() { gamemenu_sound_music_toggle(music_toggle_names, sgOptionMenu, sound_get_or_set_music_volume(1)); } -void __fastcall gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, int volume) +void gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, int volume) { if (gbSndInited) { menu_item->dwFlags |= 0xC0000000; @@ -189,23 +189,23 @@ void __fastcall gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, } } -void __cdecl gamemenu_get_sound() +void gamemenu_get_sound() { gamemenu_sound_music_toggle(sound_toggle_names, &sgOptionMenu[1], sound_get_or_set_sound_volume(1)); } -void __cdecl gamemenu_get_color_cycling() +void gamemenu_get_color_cycling() { sgOptionMenu[3].pszStr = color_cycling_toggle_names[palette_get_colour_cycling() & 1]; } -void __cdecl gamemenu_get_gamma() +void gamemenu_get_gamma() { gmenu_slider_3(&sgOptionMenu[2], 15); gmenu_slider_1(&sgOptionMenu[2], 30, 100, UpdateGamma(0)); } -void __fastcall gamemenu_music_volume(BOOL a1) +void gamemenu_music_volume(BOOL a1) { int volume; if (a1) { @@ -247,12 +247,12 @@ void __fastcall gamemenu_music_volume(BOOL a1) gamemenu_get_music(); } -int __fastcall gamemenu_slider_music_sound(TMenuItem *menu_item) +int gamemenu_slider_music_sound(TMenuItem *menu_item) { return gmenu_slider_get(menu_item, VOLUME_MIN, VOLUME_MAX); } -void __fastcall gamemenu_sound_volume(BOOL a1) +void gamemenu_sound_volume(BOOL a1) { int volume; if (a1) { @@ -280,7 +280,7 @@ void __fastcall gamemenu_sound_volume(BOOL a1) gamemenu_get_sound(); } -void __fastcall gamemenu_gamma(BOOL a1) +void gamemenu_gamma(BOOL a1) { int gamma; if (a1) { @@ -296,12 +296,12 @@ void __fastcall gamemenu_gamma(BOOL a1) gamemenu_get_gamma(); } -int __cdecl gamemenu_slider_gamma() +int gamemenu_slider_gamma() { return gmenu_slider_get(&sgOptionMenu[2], 30, 100); } -void __fastcall gamemenu_color_cycling(BOOL a1) +void gamemenu_color_cycling(BOOL a1) { palette_set_color_cycling(palette_get_colour_cycling() == 0); sgOptionMenu[3].pszStr = color_cycling_toggle_names[palette_get_colour_cycling() & 1]; diff --git a/Source/gamemenu.h b/Source/gamemenu.h index 826474bf..6244d84f 100644 --- a/Source/gamemenu.h +++ b/Source/gamemenu.h @@ -2,29 +2,29 @@ #ifndef __GAMEMENU_H__ #define __GAMEMENU_H__ -void __cdecl gamemenu_previous(); -void __fastcall gamemenu_enable_single(TMenuItem *a1); -void __fastcall gamemenu_enable_multi(TMenuItem *a1); -void __cdecl gamemenu_off(); -void __cdecl gamemenu_handle_previous(); -void __fastcall j_gamemenu_previous(BOOL a1); -void __fastcall gamemenu_new_game(BOOL a1); -void __fastcall gamemenu_quit_game(BOOL a1); -void __fastcall gamemenu_load_game(BOOL a1); -void __fastcall gamemenu_save_game(BOOL a1); -void __fastcall gamemenu_restart_town(BOOL a1); -void __fastcall gamemenu_options(BOOL a1); -void __cdecl gamemenu_get_music(); -void __fastcall gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, int gamma); -void __cdecl gamemenu_get_sound(); -void __cdecl gamemenu_get_color_cycling(); -void __cdecl gamemenu_get_gamma(); -void __fastcall gamemenu_music_volume(BOOL a1); -int __fastcall gamemenu_slider_music_sound(TMenuItem *menu_item); -void __fastcall gamemenu_sound_volume(BOOL a1); -void __fastcall gamemenu_gamma(BOOL a1); -int __cdecl gamemenu_slider_gamma(); -void __fastcall gamemenu_color_cycling(BOOL a1); +void gamemenu_previous(); +void gamemenu_enable_single(TMenuItem *a1); +void gamemenu_enable_multi(TMenuItem *a1); +void gamemenu_off(); +void gamemenu_handle_previous(); +void j_gamemenu_previous(BOOL a1); +void gamemenu_new_game(BOOL a1); +void gamemenu_quit_game(BOOL a1); +void gamemenu_load_game(BOOL a1); +void gamemenu_save_game(BOOL a1); +void gamemenu_restart_town(BOOL a1); +void gamemenu_options(BOOL a1); +void gamemenu_get_music(); +void gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, int gamma); +void gamemenu_get_sound(); +void gamemenu_get_color_cycling(); +void gamemenu_get_gamma(); +void gamemenu_music_volume(BOOL a1); +int gamemenu_slider_music_sound(TMenuItem *menu_item); +void gamemenu_sound_volume(BOOL a1); +void gamemenu_gamma(BOOL a1); +int gamemenu_slider_gamma(); +void gamemenu_color_cycling(BOOL a1); /* rdata */ extern char *music_toggle_names[]; diff --git a/Source/gendung.cpp b/Source/gendung.cpp index 0bd08128..2e8b60e9 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -69,7 +69,7 @@ int dminx; // weak int dminy; // weak WORD dpiece_defs_map_2[MAXDUNX][MAXDUNY][16]; -void __cdecl FillSolidBlockTbls() +void FillSolidBlockTbls() { unsigned char bv; unsigned int dwTiles; @@ -122,7 +122,7 @@ void __cdecl FillSolidBlockTbls() mem_free_dbg(pSBFile); } -void __cdecl MakeSpeedCels() +void MakeSpeedCels() { int i, j, x, y; int total_frames, blocks, total_size, frameidx, lfs_adder, blk_cnt, currtile, nDataSize; @@ -446,7 +446,7 @@ void __cdecl MakeSpeedCels() // 525728: using guessed type int light4flag; // 53CD4C: using guessed type int nlevel_frames; -void __fastcall SortTiles(int frames) +void SortTiles(int frames) { int i; BOOL doneflag; @@ -464,7 +464,7 @@ void __fastcall SortTiles(int frames) } } -void __fastcall SwapTile(int f1, int f2) +void SwapTile(int f1, int f2) { int swap; @@ -482,7 +482,7 @@ void __fastcall SwapTile(int f1, int f2) level_frame_sizes[f2] = swap; } -int __fastcall IsometricCoord(int x, int y) +int IsometricCoord(int x, int y) { if (x < MAXDUNY - y) return (y + y * y + x * (x + 2 * y + 3)) / 2; @@ -492,7 +492,7 @@ int __fastcall IsometricCoord(int x, int y) return MAXDUNX * MAXDUNY - ((y + y * y + x * (x + 2 * y + 3)) / 2) - 1; } -void __cdecl SetSpeedCels() +void SetSpeedCels() { int i, x, y; @@ -505,7 +505,7 @@ void __cdecl SetSpeedCels() } } -void __cdecl SetDungeonMicros() +void SetDungeonMicros() { int i, x, y, lv, blocks; WORD *pMap, *pPiece; @@ -558,7 +558,7 @@ void __cdecl SetDungeonMicros() // 5C3000: using guessed type int scr_pix_width; // 5C3004: using guessed type int scr_pix_height; -void __cdecl DRLG_InitTrans() +void DRLG_InitTrans() { memset(dTransVal, 0, sizeof(dTransVal)); memset(TransList, 0, sizeof(TransList)); @@ -566,7 +566,7 @@ void __cdecl DRLG_InitTrans() } // 5A5590: using guessed type char TransVal; -void __fastcall DRLG_MRectTrans(int x1, int y1, int x2, int y2) +void DRLG_MRectTrans(int x1, int y1, int x2, int y2) { int v4; // esi int v5; // edi @@ -593,7 +593,7 @@ void __fastcall DRLG_MRectTrans(int x1, int y1, int x2, int y2) } // 5A5590: using guessed type char TransVal; -void __fastcall DRLG_RectTrans(int x1, int y1, int x2, int y2) +void DRLG_RectTrans(int x1, int y1, int x2, int y2) { int i; // esi char *v5; // edx @@ -614,12 +614,12 @@ void __fastcall DRLG_RectTrans(int x1, int y1, int x2, int y2) } // 5A5590: using guessed type char TransVal; -void __fastcall DRLG_CopyTrans(int sx, int sy, int dx, int dy) +void DRLG_CopyTrans(int sx, int sy, int dx, int dy) { dTransVal[dx][dy] = dTransVal[sx][sy]; } -void __fastcall DRLG_ListTrans(int num, unsigned char *List) +void DRLG_ListTrans(int num, unsigned char *List) { int i; unsigned char x1, x2, y1, y2; @@ -633,7 +633,7 @@ void __fastcall DRLG_ListTrans(int num, unsigned char *List) } } -void __fastcall DRLG_AreaTrans(int num, unsigned char *List) +void DRLG_AreaTrans(int num, unsigned char *List) { int i; unsigned char x1, x2, y1, y2; @@ -650,7 +650,7 @@ void __fastcall DRLG_AreaTrans(int num, unsigned char *List) } // 5A5590: using guessed type char TransVal; -void __cdecl DRLG_InitSetPC() +void DRLG_InitSetPC() { setpc_x = 0; setpc_y = 0; @@ -660,7 +660,7 @@ void __cdecl DRLG_InitSetPC() // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __cdecl DRLG_SetPC() +void DRLG_SetPC() { int i, j, x, y, w, h; @@ -678,7 +678,7 @@ void __cdecl DRLG_SetPC() // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall Make_SetPC(int x, int y, int w, int h) +void Make_SetPC(int x, int y, int w, int h) { int i, j, dx, dy, dh, dw; @@ -694,7 +694,7 @@ void __fastcall Make_SetPC(int x, int y, int w, int h) } } -BOOL __fastcall DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, int *width, int *height) +BOOL DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, int *width, int *height) { int ii, xx, yy; int xSmallest, ySmallest; @@ -780,7 +780,7 @@ BOOL __fastcall DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int // 41965B: using guessed type int var_6C[20]; // 41965B: using guessed type int var_BC[20]; -void __fastcall DRLG_CreateThemeRoom(int themeIndex) +void DRLG_CreateThemeRoom(int themeIndex) { int v1; // esi int v2; // eax @@ -978,7 +978,7 @@ LABEL_53: } } -void __fastcall DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rndSize) +void DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rndSize) { int v5; // ebx //int v7; // eax @@ -1058,7 +1058,7 @@ void __fastcall DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int fr } // 5A5590: using guessed type char TransVal; -void __cdecl DRLG_HoldThemeRooms() +void DRLG_HoldThemeRooms() { int *v0; // esi int v1; // edi @@ -1105,7 +1105,7 @@ void __cdecl DRLG_HoldThemeRooms() } } -BOOL __fastcall SkipThemeRoom(int x, int y) +BOOL SkipThemeRoom(int x, int y) { int i; // ebx THEME_LOC *v3; // eax @@ -1129,7 +1129,7 @@ BOOL __fastcall SkipThemeRoom(int x, int y) return 0; } -void __cdecl InitLevels() +void InitLevels() { if (!leveldebug) { currlevel = 0; diff --git a/Source/gendung.h b/Source/gendung.h index f5bec755..f5e96e97 100644 --- a/Source/gendung.h +++ b/Source/gendung.h @@ -69,27 +69,27 @@ extern int dminx; // weak extern int dminy; // weak extern WORD dpiece_defs_map_2[MAXDUNX][MAXDUNY][16]; -void __cdecl FillSolidBlockTbls(); -void __cdecl MakeSpeedCels(); -void __fastcall SortTiles(int frames); -void __fastcall SwapTile(int f1, int f2); -int __fastcall IsometricCoord(int x, int y); -void __cdecl SetSpeedCels(); -void __cdecl SetDungeonMicros(); -void __cdecl DRLG_InitTrans(); -void __fastcall DRLG_MRectTrans(int x1, int y1, int x2, int y2); -void __fastcall DRLG_RectTrans(int x1, int y1, int x2, int y2); -void __fastcall DRLG_CopyTrans(int sx, int sy, int dx, int dy); -void __fastcall DRLG_ListTrans(int num, unsigned char *List); -void __fastcall DRLG_AreaTrans(int num, unsigned char *List); -void __cdecl DRLG_InitSetPC(); -void __cdecl DRLG_SetPC(); -void __fastcall Make_SetPC(int x, int y, int w, int h); -BOOL __fastcall DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, int *width, int *height); -void __fastcall DRLG_CreateThemeRoom(int themeIndex); -void __fastcall DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rndSize); -void __cdecl DRLG_HoldThemeRooms(); -BOOL __fastcall SkipThemeRoom(int x, int y); -void __cdecl InitLevels(); +void FillSolidBlockTbls(); +void MakeSpeedCels(); +void SortTiles(int frames); +void SwapTile(int f1, int f2); +int IsometricCoord(int x, int y); +void SetSpeedCels(); +void SetDungeonMicros(); +void DRLG_InitTrans(); +void DRLG_MRectTrans(int x1, int y1, int x2, int y2); +void DRLG_RectTrans(int x1, int y1, int x2, int y2); +void DRLG_CopyTrans(int sx, int sy, int dx, int dy); +void DRLG_ListTrans(int num, unsigned char *List); +void DRLG_AreaTrans(int num, unsigned char *List); +void DRLG_InitSetPC(); +void DRLG_SetPC(); +void Make_SetPC(int x, int y, int w, int h); +BOOL DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, int *width, int *height); +void DRLG_CreateThemeRoom(int themeIndex); +void DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rndSize); +void DRLG_HoldThemeRooms(); +BOOL SkipThemeRoom(int x, int y); +void InitLevels(); #endif /* __GENDUNG_H__ */ diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index 1602522e..fcf33914 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -9,7 +9,7 @@ TMenuItem *sgpCurrItem; void *BigTGold_cel; int dword_634474; // weak char byte_634478; // weak -void(__fastcall *dword_63447C)(TMenuItem *); +void(*dword_63447C)(TMenuItem *); TMenuItem *dword_634480; // idb void *option_cel; void *sgpLogo; @@ -39,7 +39,7 @@ const unsigned char lfontkern[56] = { 11, 10, 12, 11, 21, 23 }; -void __cdecl gmenu_draw_pause() +void gmenu_draw_pause() { if (currlevel) RedBack(); @@ -50,7 +50,7 @@ void __cdecl gmenu_draw_pause() } // 69BEF8: using guessed type int light_table_index; -void __fastcall gmenu_print_text(int x, int y, char *pszStr) +void gmenu_print_text(int x, int y, char *pszStr) { char *v3; // edi int v4; // ebp @@ -70,7 +70,7 @@ void __fastcall gmenu_print_text(int x, int y, char *pszStr) } } -void __cdecl FreeGMenu() +void FreeGMenu() { void *ptr; @@ -91,7 +91,7 @@ void __cdecl FreeGMenu() mem_free_dbg(ptr); } -void __cdecl gmenu_init_menu() +void gmenu_init_menu() { byte_634478 = 1; dword_634480 = 0; @@ -109,16 +109,16 @@ void __cdecl gmenu_init_menu() // 634478: using guessed type char byte_634478; // 63448C: using guessed type int dword_63448C; -BOOL __cdecl gmenu_exception() +BOOL gmenu_exception() { return dword_634480 != 0; } -void __fastcall gmenu_call_proc(TMenuItem *pItem, void(__fastcall *gmFunc)(TMenuItem *)) +void gmenu_call_proc(TMenuItem *pItem, void(*gmFunc)(TMenuItem *)) { TMenuItem *v2; // eax int v3; // ecx - void(__fastcall * *v4)(BOOL); // edx + void(* *v4)(BOOL); // edx PauseMode = 0; byte_634464 = 0; @@ -146,7 +146,7 @@ void __fastcall gmenu_call_proc(TMenuItem *pItem, void(__fastcall *gmFunc)(TMenu // 634464: using guessed type char byte_634464; // 63448C: using guessed type int dword_63448C; -void __fastcall gmenu_up_down(int a1) +void gmenu_up_down(int a1) { TMenuItem *v1; // eax int v2; // edi @@ -181,7 +181,7 @@ void __fastcall gmenu_up_down(int a1) // 634464: using guessed type char byte_634464; // 63448C: using guessed type int dword_63448C; -void __cdecl gmenu_draw() +void gmenu_draw() { int v0; // edi TMenuItem *i; // esi @@ -207,7 +207,7 @@ void __cdecl gmenu_draw() // 634474: using guessed type int dword_634474; // 634478: using guessed type char byte_634478; -void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2) +void gmenu_draw_menu_item(TMenuItem *pItem, int a2) { int v2; // edi TMenuItem *v3; // ebx @@ -255,7 +255,7 @@ void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2) // 634478: using guessed type char byte_634478; // 69BEF8: using guessed type int light_table_index; -void __fastcall gmenu_clear_buffer(int x, int y, int width, int height) +void gmenu_clear_buffer(int x, int y, int width, int height) { int v4; // edi char *i; // esi @@ -267,7 +267,7 @@ void __fastcall gmenu_clear_buffer(int x, int y, int width, int height) } } -int __fastcall gmenu_get_lfont(TMenuItem *pItem) +int gmenu_get_lfont(TMenuItem *pItem) { char *v2; // eax int i; // edx @@ -285,7 +285,7 @@ int __fastcall gmenu_get_lfont(TMenuItem *pItem) return i - 2; } -BOOL __fastcall gmenu_presskeys(int a1) +BOOL gmenu_presskeys(int a1) { if (!dword_634480) return 0; @@ -318,7 +318,7 @@ BOOL __fastcall gmenu_presskeys(int a1) return TRUE; } -void __fastcall gmenu_left_right(int a1) +void gmenu_left_right(int a1) { signed int v1; // edx unsigned int v2; // eax @@ -343,7 +343,7 @@ void __fastcall gmenu_left_right(int a1) } } -BOOL __cdecl gmenu_on_mouse_move() +BOOL gmenu_on_mouse_move() { int a1; // [esp+0h] [ebp-4h] @@ -359,7 +359,7 @@ BOOL __cdecl gmenu_on_mouse_move() // 41A37A: could not find valid save-restore pair for esi // 634464: using guessed type char byte_634464; -BOOLEAN __fastcall gmenu_valid_mouse_pos(int *plOffset) +BOOLEAN gmenu_valid_mouse_pos(int *plOffset) { *plOffset = 282; if (MouseX < 282) { @@ -374,7 +374,7 @@ BOOLEAN __fastcall gmenu_valid_mouse_pos(int *plOffset) return 1; } -int __fastcall gmenu_left_mouse(int a1) +int gmenu_left_mouse(int a1) { int result; // eax unsigned int v2; // eax @@ -418,7 +418,7 @@ int __fastcall gmenu_left_mouse(int a1) // 634464: using guessed type char byte_634464; // 63448C: using guessed type int dword_63448C; -void __fastcall gmenu_enable(TMenuItem *pMenuItem, BOOL enable) +void gmenu_enable(TMenuItem *pMenuItem, BOOL enable) { if (enable) pMenuItem->dwFlags |= 0x80000000; @@ -426,7 +426,7 @@ void __fastcall gmenu_enable(TMenuItem *pMenuItem, BOOL enable) pMenuItem->dwFlags &= 0x7F000000; } -void __fastcall gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma) +void gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma) { unsigned int v4; // esi int v5; // eax @@ -439,7 +439,7 @@ void __fastcall gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma) pItem->dwFlags = v4 | (v5 * (gamma - min) + (max - min - 1) / 2) / (max - min); } -int __fastcall gmenu_slider_get(TMenuItem *pItem, int min, int max) +int gmenu_slider_get(TMenuItem *pItem, int min, int max) { int v3; // eax unsigned int v4; // ecx @@ -451,7 +451,7 @@ int __fastcall gmenu_slider_get(TMenuItem *pItem, int min, int max) return min + (v4 * (max - min) + (v3 - 1) / 2) / v3; } -void __fastcall gmenu_slider_3(TMenuItem *pItem, int dwTicks) +void gmenu_slider_3(TMenuItem *pItem, int dwTicks) { pItem->dwFlags ^= (pItem->dwFlags ^ (dwTicks << 12)) & 0xFFF000; } diff --git a/Source/gmenu.h b/Source/gmenu.h index 7d698401..6d876037 100644 --- a/Source/gmenu.h +++ b/Source/gmenu.h @@ -8,31 +8,31 @@ extern void *PentSpin_cel; extern void *BigTGold_cel; extern int dword_634474; // weak extern char byte_634478; // weak -extern void(__fastcall *dword_63447C)(TMenuItem *); +extern void(*dword_63447C)(TMenuItem *); extern TMenuItem *dword_634480; // idb extern void *option_cel; extern int dword_63448C; // weak -void __cdecl gmenu_draw_pause(); -void __fastcall gmenu_print_text(int x, int y, char *pszStr); -void __cdecl FreeGMenu(); -void __cdecl gmenu_init_menu(); -BOOL __cdecl gmenu_exception(); -void __fastcall gmenu_call_proc(TMenuItem *pItem, void(__fastcall *gmFunc)(TMenuItem *)); -void __fastcall gmenu_up_down(int a1); -void __cdecl gmenu_draw(); -void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2); -void __fastcall gmenu_clear_buffer(int x, int y, int width, int height); -int __fastcall gmenu_get_lfont(TMenuItem *pItem); -BOOL __fastcall gmenu_presskeys(int a1); -void __fastcall gmenu_left_right(int a1); -BOOL __cdecl gmenu_on_mouse_move(); -BOOLEAN __fastcall gmenu_valid_mouse_pos(int *plOffset); -int __fastcall gmenu_left_mouse(int a1); -void __fastcall gmenu_enable(TMenuItem *pMenuItem, BOOL enable); -void __fastcall gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma); -int __fastcall gmenu_slider_get(TMenuItem *pItem, int min, int max); -void __fastcall gmenu_slider_3(TMenuItem *pItem, int dwTicks); +void gmenu_draw_pause(); +void gmenu_print_text(int x, int y, char *pszStr); +void FreeGMenu(); +void gmenu_init_menu(); +BOOL gmenu_exception(); +void gmenu_call_proc(TMenuItem *pItem, void(*gmFunc)(TMenuItem *)); +void gmenu_up_down(int a1); +void gmenu_draw(); +void gmenu_draw_menu_item(TMenuItem *pItem, int a2); +void gmenu_clear_buffer(int x, int y, int width, int height); +int gmenu_get_lfont(TMenuItem *pItem); +BOOL gmenu_presskeys(int a1); +void gmenu_left_right(int a1); +BOOL gmenu_on_mouse_move(); +BOOLEAN gmenu_valid_mouse_pos(int *plOffset); +int gmenu_left_mouse(int a1); +void gmenu_enable(TMenuItem *pMenuItem, BOOL enable); +void gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma); +int gmenu_slider_get(TMenuItem *pItem, int min, int max); +void gmenu_slider_3(TMenuItem *pItem, int dwTicks); /* rdata */ diff --git a/Source/help.cpp b/Source/help.cpp index c7a22ddd..e50be166 100644 --- a/Source/help.cpp +++ b/Source/help.cpp @@ -77,7 +77,7 @@ const char gszHelpText[] = { "&" }; -void __cdecl InitHelp() +void InitHelp() { helpflag = 0; dword_634494 = 0; @@ -85,7 +85,7 @@ void __cdecl InitHelp() } // 634494: using guessed type int dword_634494; -void __cdecl DrawHelp() +void DrawHelp() { int v0; // edi const char *v1; // esi @@ -200,7 +200,7 @@ void __cdecl DrawHelp() // 634490: using guessed type int help_select_line; // 634960: using guessed type int HelpTop; -void __fastcall DrawHelpLine(int always_0, int help_line_nr, char *text, text_color color) +void DrawHelpLine(int always_0, int help_line_nr, char *text, text_color color) { signed int v4; // ebx int v5; // edi @@ -223,7 +223,7 @@ void __fastcall DrawHelpLine(int always_0, int help_line_nr, char *text, text_co } } -void __cdecl DisplayHelp() +void DisplayHelp() { help_select_line = 0; helpflag = 1; @@ -232,14 +232,14 @@ void __cdecl DisplayHelp() // 634490: using guessed type int help_select_line; // 634960: using guessed type int HelpTop; -void __cdecl HelpScrollUp() +void HelpScrollUp() { if (help_select_line > 0) --help_select_line; } // 634490: using guessed type int help_select_line; -void __cdecl HelpScrollDown() +void HelpScrollDown() { if (help_select_line < HelpTop) ++help_select_line; diff --git a/Source/help.h b/Source/help.h index c075007e..2261f1f5 100644 --- a/Source/help.h +++ b/Source/help.h @@ -8,12 +8,12 @@ extern int helpflag; extern int displayinghelp[22]; extern int HelpTop; // weak -void __cdecl InitHelp(); -void __cdecl DrawHelp(); -void __fastcall DrawHelpLine(int always_0, int help_line_nr, char *text, text_color color); -void __cdecl DisplayHelp(); -void __cdecl HelpScrollUp(); -void __cdecl HelpScrollDown(); +void InitHelp(); +void DrawHelp(); +void DrawHelpLine(int always_0, int help_line_nr, char *text, text_color color); +void DisplayHelp(); +void HelpScrollUp(); +void HelpScrollDown(); /* rdata */ extern const char gszHelpText[]; diff --git a/Source/init.cpp b/Source/init.cpp index 9d7c7f8d..dfe4d3da 100644 --- a/Source/init.cpp +++ b/Source/init.cpp @@ -19,7 +19,7 @@ BOOLEAN screensaver_enabled_prev; char gszVersionNumber[MAX_PATH] = "internal version unknown"; char gszProductName[MAX_PATH] = "Diablo v1.09"; -void __fastcall init_cleanup(BOOL show_cursor) +void init_cleanup(BOOL show_cursor) { pfile_flush_W(); init_disable_screensaver(0); @@ -50,7 +50,7 @@ void __fastcall init_cleanup(BOOL show_cursor) ShowCursor(TRUE); } -void __cdecl init_run_office_from_start_menu() +void init_run_office_from_start_menu() { HWND v0; // eax char pszPath[256]; // [esp+0h] [ebp-104h] @@ -72,7 +72,7 @@ void __cdecl init_run_office_from_start_menu() } // 634CA0: using guessed type int killed_mom_parent; -void __fastcall init_run_office(char *dir) +void init_run_office(char *dir) { char *v1; // esi HANDLE v2; // ebx @@ -113,7 +113,7 @@ void __fastcall init_run_office(char *dir) } } -void __fastcall init_disable_screensaver(BOOLEAN disable) +void init_disable_screensaver(BOOLEAN disable) { BOOLEAN v1; // al char Data[16]; // [esp+4h] [ebp-20h] @@ -142,7 +142,7 @@ void __fastcall init_disable_screensaver(BOOLEAN disable) } } -void __fastcall init_create_window(int nCmdShow) +void init_create_window(int nCmdShow) { int nHeight; // eax HWND hWnd; // esi @@ -185,7 +185,7 @@ void __fastcall init_create_window(int nCmdShow) init_disable_screensaver(1); } -void __cdecl init_kill_mom_parent() +void init_kill_mom_parent() { HWND v0; // eax @@ -197,7 +197,7 @@ void __cdecl init_kill_mom_parent() } // 634CA0: using guessed type int killed_mom_parent; -HWND __cdecl init_find_mom_parent() +HWND init_find_mom_parent() { HWND i; // eax HWND v1; // esi @@ -214,7 +214,7 @@ HWND __cdecl init_find_mom_parent() return v1; } -void __cdecl init_await_mom_parent_exit() +void init_await_mom_parent_exit() { DWORD v0; // edi @@ -226,7 +226,7 @@ void __cdecl init_await_mom_parent_exit() } while (GetTickCount() - v0 <= 4000); } -void __cdecl init_archives() +void init_archives() { HANDLE a1; // [esp+8h] [ebp-8h] #ifdef COPYPROT @@ -257,7 +257,7 @@ void __cdecl init_archives() patch_rt_mpq = init_test_access(patch_rt_mpq_path, "\\patch_rt.mpq", "DiabloInstall", 2000, FS_PC); } -HANDLE __fastcall init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, int fs) +HANDLE init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, int fs) { char *v5; // esi char *v7; // eax @@ -319,7 +319,7 @@ HANDLE __fastcall init_test_access(char *mpq_path, char *mpq_name, char *reg_loc return 0; } -char *__fastcall init_strip_trailing_slash(char *path) +char *init_strip_trailing_slash(char *path) { char *result; // eax @@ -331,7 +331,7 @@ char *__fastcall init_strip_trailing_slash(char *path) return result; } -int __fastcall init_read_test_file(char *mpq_path, char *mpq_name, int flags, HANDLE *archive) +int init_read_test_file(char *mpq_path, char *mpq_name, int flags, HANDLE *archive) { char *v4; // edi DWORD v5; // eax @@ -365,7 +365,7 @@ int __fastcall init_read_test_file(char *mpq_path, char *mpq_name, int flags, HA return 1; } -void __cdecl init_get_file_info() +void init_get_file_info() { int v0; // eax DWORD v1; // edi @@ -430,7 +430,7 @@ LRESULT __stdcall MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) } // 52571C: using guessed type int drawpanflag; -void __fastcall init_activate_window(HWND hWnd, BOOLEAN bActive) +void init_activate_window(HWND hWnd, BOOLEAN bActive) { LONG dwNewLong; // eax @@ -464,7 +464,7 @@ LRESULT __stdcall WindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) return result; } -WNDPROC __fastcall SetWindowProc(WNDPROC NewProc) +WNDPROC SetWindowProc(WNDPROC NewProc) { WNDPROC OldProc; // eax diff --git a/Source/init.h b/Source/init.h index 449acf2d..3fd878d8 100644 --- a/Source/init.h +++ b/Source/init.h @@ -14,23 +14,23 @@ extern HANDLE patch_rt_mpq; extern int killed_mom_parent; // weak extern BOOLEAN screensaver_enabled_prev; -void __fastcall init_cleanup(BOOL show_cursor); -void __cdecl init_run_office_from_start_menu(); -void __fastcall init_run_office(char *dir); -void __fastcall init_disable_screensaver(BOOLEAN disable); -void __fastcall init_create_window(int nCmdShow); -void __cdecl init_kill_mom_parent(); -HWND __cdecl init_find_mom_parent(); -void __cdecl init_await_mom_parent_exit(); -void __cdecl init_archives(); -HANDLE __fastcall init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, int fs); -char *__fastcall init_strip_trailing_slash(char *path); -int __fastcall init_read_test_file(char *mpq_path, char *mpq_name, int flags, HANDLE *archive); -void __cdecl init_get_file_info(); +void init_cleanup(BOOL show_cursor); +void init_run_office_from_start_menu(); +void init_run_office(char *dir); +void init_disable_screensaver(BOOLEAN disable); +void init_create_window(int nCmdShow); +void init_kill_mom_parent(); +HWND init_find_mom_parent(); +void init_await_mom_parent_exit(); +void init_archives(); +HANDLE init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, int fs); +char *init_strip_trailing_slash(char *path); +int init_read_test_file(char *mpq_path, char *mpq_name, int flags, HANDLE *archive); +void init_get_file_info(); LRESULT __stdcall MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -void __fastcall init_activate_window(HWND hWnd, BOOLEAN bActive); +void init_activate_window(HWND hWnd, BOOLEAN bActive); LRESULT __stdcall WindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -WNDPROC __fastcall SetWindowProc(WNDPROC NewProc); +WNDPROC SetWindowProc(WNDPROC NewProc); /* rdata */ extern const int init_inf; // weak diff --git a/Source/interfac.cpp b/Source/interfac.cpp index 75838048..3d496b80 100644 --- a/Source/interfac.cpp +++ b/Source/interfac.cpp @@ -9,7 +9,7 @@ int progress_id; // idb const unsigned char progress_bar_colours[3] = { 138u, 43u, 254u }; const int progress_bar_screen_pos[3][2] = { { 53, 37 }, { 53, 421 }, { 53, 37 } }; -void __cdecl interface_msg_pump() +void interface_msg_pump() { MSG Msg; // [esp+8h] [ebp-1Ch] @@ -21,7 +21,7 @@ void __cdecl interface_msg_pump() } } -BOOL __cdecl IncProgress() +BOOL IncProgress() { interface_msg_pump(); sgdwProgress += 15; @@ -32,7 +32,7 @@ BOOL __cdecl IncProgress() return (unsigned int)sgdwProgress >= 0x216; } -void __cdecl DrawCutscene() +void DrawCutscene() { unsigned int v0; // esi @@ -53,7 +53,7 @@ void __cdecl DrawCutscene() } // 52571C: using guessed type int drawpanflag; -void __fastcall DrawProgress(int screen_x, int screen_y, int progress_id) +void DrawProgress(int screen_x, int screen_y, int progress_id) { _BYTE *v3; // eax signed int v4; // ecx @@ -67,7 +67,7 @@ void __fastcall DrawProgress(int screen_x, int screen_y, int progress_id) } while (v4); } -void __fastcall ShowProgress(unsigned int uMsg) +void ShowProgress(unsigned int uMsg) { WNDPROC saveProc; @@ -243,7 +243,7 @@ void __fastcall ShowProgress(unsigned int uMsg) // 6761B8: using guessed type char gbSomebodyWonGameKludge; // 679660: using guessed type char gbMaxPlayers; -void __cdecl FreeInterface() +void FreeInterface() { void *ptr; @@ -252,7 +252,7 @@ void __cdecl FreeInterface() mem_free_dbg(ptr); } -void __fastcall InitCutscene(unsigned int uMsg) +void InitCutscene(unsigned int uMsg) { /// ASSERT: assert(! sgpBackCel); diff --git a/Source/interfac.h b/Source/interfac.h index ca395a1e..9c3ad606 100644 --- a/Source/interfac.h +++ b/Source/interfac.h @@ -4,13 +4,13 @@ extern int progress_id; // idb -void __cdecl interface_msg_pump(); -BOOL __cdecl IncProgress(); -void __cdecl DrawCutscene(); -void __fastcall DrawProgress(int screen_x, int screen_y, int progress_id); -void __fastcall ShowProgress(unsigned int uMsg); -void __cdecl FreeInterface(); -void __fastcall InitCutscene(unsigned int uMsg); +void interface_msg_pump(); +BOOL IncProgress(); +void DrawCutscene(); +void DrawProgress(int screen_x, int screen_y, int progress_id); +void ShowProgress(unsigned int uMsg); +void FreeInterface(); +void InitCutscene(unsigned int uMsg); /* rdata */ diff --git a/Source/inv.cpp b/Source/inv.cpp index 22ba6d95..ad439434 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -90,7 +90,7 @@ const InvXY InvRect[73] = { int AP2x2Tbl[10] = { 8, 28, 6, 26, 4, 24, 2, 22, 0, 20 }; // weak -void __cdecl FreeInvGFX() +void FreeInvGFX() { void *invCels = pInvCels; @@ -98,7 +98,7 @@ void __cdecl FreeInvGFX() mem_free_dbg(invCels); } -void __cdecl InitInv() +void InitInv() { if (plr[myplr]._pClass == PC_WARRIOR) { pInvCels = LoadFileInMem("Data\\Inv\\Inv.CEL", 0); @@ -112,7 +112,7 @@ void __cdecl InitInv() drawsbarflag = 0; } -void __fastcall InvDrawSlotBack(int X, int Y, int W, int H) +void InvDrawSlotBack(int X, int Y, int W, int H) { BYTE *dst; @@ -170,7 +170,7 @@ void __fastcall InvDrawSlotBack(int X, int Y, int W, int H) #endif } -void __cdecl DrawInv() +void DrawInv() { BOOL invtest[40]; int frame, frame_width, colour, screen_x, screen_y, i, j, ii; @@ -417,7 +417,7 @@ void __cdecl DrawInv() // 69CF94: using guessed type int cel_transparency_active; // 41B8C4: using guessed type int var_A0[40]; -void __cdecl DrawInvBelt() +void DrawInvBelt() { int i, frame, frame_width, colour; BYTE fi, ff; @@ -463,7 +463,7 @@ void __cdecl DrawInvBelt() // 4B8960: using guessed type int talkflag; // 4B8CB8: using guessed type char pcursinvitem; -int __fastcall AutoPlace(int pnum, int ii, int sx, int sy, int saveflag) +int AutoPlace(int pnum, int ii, int sx, int sy, int saveflag) { __int64 v5; // rax int v6; // ebx @@ -549,7 +549,7 @@ int __fastcall AutoPlace(int pnum, int ii, int sx, int sy, int saveflag) return v6; } -int __fastcall SpecialAutoPlace(int pnum, int ii, int sx, int sy, int saveflag) +int SpecialAutoPlace(int pnum, int ii, int sx, int sy, int saveflag) { __int64 v5; // rax int v6; // ebx @@ -650,7 +650,7 @@ LABEL_24: return v6; } -int __fastcall GoldAutoPlace(int pnum) +int GoldAutoPlace(int pnum) { int v1; // ebp int v2; // edi @@ -758,7 +758,7 @@ int __fastcall GoldAutoPlace(int pnum) return v3; } -int __fastcall WeaponAutoPlace(int pnum) +int WeaponAutoPlace(int pnum) { int v1; // edi int v2; // eax @@ -797,7 +797,7 @@ int __fastcall WeaponAutoPlace(int pnum) return 0; } -int __fastcall SwapItem(ItemStruct *a, ItemStruct *b) +int SwapItem(ItemStruct *a, ItemStruct *b) { int v2; // eax ItemStruct h; // [esp+8h] [ebp-170h] @@ -809,7 +809,7 @@ int __fastcall SwapItem(ItemStruct *a, ItemStruct *b) return v2 + CURSOR_FIRSTITEM; } -void __fastcall CheckInvPaste(int pnum, int mx, int my) +void CheckInvPaste(int pnum, int mx, int my) { int v3; // ebx int v4; // edi @@ -1368,7 +1368,7 @@ LABEL_81: // 4B8CBC: using guessed type int icursW; // 52571C: using guessed type int drawpanflag; -void __fastcall CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL bId) +void CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL bId) { PlayerStruct *p; @@ -1394,7 +1394,7 @@ void __fastcall CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, B CalcPlrInv(pnum, TRUE); } -void __fastcall CheckInvCut(int pnum, int mx, int my) +void CheckInvCut(int pnum, int mx, int my) { int r; BOOL done; @@ -1550,7 +1550,7 @@ void __fastcall CheckInvCut(int pnum, int mx, int my) } } -void __fastcall inv_update_rem_item(int pnum, BYTE iv) +void inv_update_rem_item(int pnum, BYTE iv) { BOOL Loadgfx; @@ -1567,7 +1567,7 @@ void __fastcall inv_update_rem_item(int pnum, BYTE iv) CalcPlrInv(pnum, Loadgfx); } -void __fastcall RemoveInvItem(int pnum, int iv) +void RemoveInvItem(int pnum, int iv) { int i, j; @@ -1612,7 +1612,7 @@ void __fastcall RemoveInvItem(int pnum, int iv) } } -void __fastcall RemoveSpdBarItem(int pnum, int iv) +void RemoveSpdBarItem(int pnum, int iv) { plr[pnum].SpdList[iv]._itype = ITYPE_NONE; @@ -1632,7 +1632,7 @@ void __fastcall RemoveSpdBarItem(int pnum, int iv) drawpanflag = 255; } -void __cdecl CheckInvItem() +void CheckInvItem() { if (pcurs >= CURSOR_FIRSTITEM) { CheckInvPaste(myplr, MouseX, MouseY); @@ -1641,7 +1641,7 @@ void __cdecl CheckInvItem() } } -void __cdecl CheckInvScrn() +void CheckInvScrn() { if (MouseX > 190 && MouseX < 437 && MouseY > 352 && MouseY < 385) { @@ -1649,7 +1649,7 @@ void __cdecl CheckInvScrn() } } -void __fastcall CheckItemStats(int pnum) +void CheckItemStats(int pnum) { PlayerStruct *p = &plr[pnum]; @@ -1662,7 +1662,7 @@ void __fastcall CheckItemStats(int pnum) } } -void __fastcall CheckBookLevel(int pnum) +void CheckBookLevel(int pnum) { int slvl; @@ -1680,7 +1680,7 @@ void __fastcall CheckBookLevel(int pnum) } } -void __fastcall CheckQuestItem(int pnum) +void CheckQuestItem(int pnum) { if (plr[pnum].HoldItem.IDidx == IDI_OPTAMULET) quests[QTYPE_BLIND]._qactive = 3; @@ -1751,7 +1751,7 @@ void __fastcall CheckQuestItem(int pnum) } // 52A554: using guessed type int sfxdelay; -void __fastcall InvGetItem(int pnum, int ii) +void InvGetItem(int pnum, int ii) { int v2; // ebp int v3; // edx @@ -1793,7 +1793,7 @@ void __fastcall InvGetItem(int pnum, int ii) } // 4B8CC0: using guessed type char pcursitem; -void __fastcall AutoGetItem(int pnum, int ii) +void AutoGetItem(int pnum, int ii) { int v2; // ebx int v3; // ebp @@ -2024,7 +2024,7 @@ void __fastcall AutoGetItem(int pnum, int ii) } // 48E9A8: using guessed type int AP2x2Tbl[10]; -int __fastcall FindGetItem(int indx, WORD ci, int iseed) +int FindGetItem(int indx, WORD ci, int iseed) { int i, ii; @@ -2046,7 +2046,7 @@ int __fastcall FindGetItem(int indx, WORD ci, int iseed) return ii; } -void __fastcall SyncGetItem(int x, int y, int idx, WORD ci, int iseed) +void SyncGetItem(int x, int y, int idx, WORD ci, int iseed) { int i, ii; @@ -2080,7 +2080,7 @@ void __fastcall SyncGetItem(int x, int y, int idx, WORD ci, int iseed) } } -BOOL __fastcall CanPut(int x, int y) +BOOL CanPut(int x, int y) { char oi, oi2; @@ -2115,7 +2115,7 @@ BOOL __fastcall CanPut(int x, int y) return TRUE; } -BOOL __cdecl TryInvPut() +BOOL TryInvPut() { int dir; @@ -2140,7 +2140,7 @@ BOOL __cdecl TryInvPut() return CanPut(plr[myplr].WorldX, plr[myplr].WorldY); } -void __fastcall DrawInvMsg(char *msg) +void DrawInvMsg(char *msg) { DWORD dwTicks; @@ -2151,7 +2151,7 @@ void __fastcall DrawInvMsg(char *msg) } } -int __fastcall InvPutItem(int pnum, int x, int y) +int InvPutItem(int pnum, int x, int y) { int v3; // edi int *v4; // esi @@ -2259,7 +2259,7 @@ int __fastcall InvPutItem(int pnum, int x, int y) return yc; } -int __fastcall SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned int ibuff) +int SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned int ibuff) { int v13; // ebx int v14; // edi @@ -2378,7 +2378,7 @@ int __fastcall SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, in return ic; } -int __cdecl CheckInvHLight() +int CheckInvHLight() { signed int v0; // ebx int result; // eax @@ -2498,7 +2498,7 @@ LABEL_36: } // 4B883C: using guessed type int infoclr; -void __fastcall RemoveScroll(int pnum) +void RemoveScroll(int pnum) { int i; @@ -2522,7 +2522,7 @@ void __fastcall RemoveScroll(int pnum) } } -BOOL __cdecl UseScroll() +BOOL UseScroll() { int i; @@ -2549,7 +2549,7 @@ BOOL __cdecl UseScroll() return FALSE; } -void __fastcall UseStaffCharge(int pnum) +void UseStaffCharge(int pnum) { if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iMiscId == IMISC_STAFF @@ -2560,7 +2560,7 @@ void __fastcall UseStaffCharge(int pnum) } } -BOOL __cdecl UseStaff() +BOOL UseStaff() { if (pcurs == CURSOR_HAND) { if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE @@ -2574,7 +2574,7 @@ BOOL __cdecl UseStaff() return FALSE; } -void __cdecl StartGoldDrop() +void StartGoldDrop() { initialDropGoldIndex = pcursinvitem; if (pcursinvitem <= 46) @@ -2589,7 +2589,7 @@ void __cdecl StartGoldDrop() // 4B8960: using guessed type int talkflag; // 4B8CB8: using guessed type char pcursinvitem; -int __fastcall UseInvItem(int pnum, int cii) +int UseInvItem(int pnum, int cii) { int v2; // esi int result; // eax @@ -2693,7 +2693,7 @@ int __fastcall UseInvItem(int pnum, int cii) // 52A554: using guessed type int sfxdelay; // 6AA705: using guessed type char stextflag; -void __cdecl DoTelekinesis() +void DoTelekinesis() { if (pcursobj != -1) NetSendCmdParam1(TRUE, CMD_OPOBJT, pcursobj); @@ -2706,7 +2706,7 @@ void __cdecl DoTelekinesis() // 4B8CC0: using guessed type char pcursitem; // 4B8CC1: using guessed type char pcursobj; -int __fastcall CalculateGold(int pnum) +int CalculateGold(int pnum) { int i, gold; @@ -2726,7 +2726,7 @@ int __fastcall CalculateGold(int pnum) } // 52571C: using guessed type int drawpanflag; -BOOL __cdecl DropItemBeforeTrig() +BOOL DropItemBeforeTrig() { if (TryInvPut()) { NetSendCmdPItem(TRUE, CMD_PUTITEM, cursmx, cursmy); diff --git a/Source/inv.h b/Source/inv.h index 9ddcc637..c8f52f20 100644 --- a/Source/inv.h +++ b/Source/inv.h @@ -5,46 +5,46 @@ extern BOOL invflag; extern int drawsbarflag; // idb -void __cdecl FreeInvGFX(); -void __cdecl InitInv(); -void __fastcall InvDrawSlotBack(int X, int Y, int W, int H); -void __cdecl DrawInv(); -void __cdecl DrawInvBelt(); -int __fastcall AutoPlace(int pnum, int ii, int sx, int sy, int saveflag); -int __fastcall SpecialAutoPlace(int pnum, int ii, int sx, int sy, int saveflag); -int __fastcall GoldAutoPlace(int pnum); -int __fastcall WeaponAutoPlace(int pnum); -int __fastcall SwapItem(ItemStruct *a, ItemStruct *b); -void __fastcall CheckInvPaste(int pnum, int mx, int my); -void __fastcall CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL bId); -void __fastcall CheckInvCut(int pnum, int mx, int my); -void __fastcall inv_update_rem_item(int pnum, BYTE iv); -void __fastcall RemoveInvItem(int pnum, int iv); -void __fastcall RemoveSpdBarItem(int pnum, int iv); -void __cdecl CheckInvItem(); -void __cdecl CheckInvScrn(); -void __fastcall CheckItemStats(int pnum); -void __fastcall CheckBookLevel(int pnum); -void __fastcall CheckQuestItem(int pnum); -void __fastcall InvGetItem(int pnum, int ii); -void __fastcall AutoGetItem(int pnum, int ii); -int __fastcall FindGetItem(int indx, WORD ci, int iseed); -void __fastcall SyncGetItem(int x, int y, int idx, WORD ci, int iseed); -BOOL __fastcall CanPut(int x, int y); -BOOL __cdecl TryInvPut(); -void __fastcall DrawInvMsg(char *msg); -int __fastcall InvPutItem(int pnum, int x, int y); -int __fastcall SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned int ibuff); -int __cdecl CheckInvHLight(); -void __fastcall RemoveScroll(int pnum); -BOOL __cdecl UseScroll(); -void __fastcall UseStaffCharge(int pnum); -BOOL __cdecl UseStaff(); -void __cdecl StartGoldDrop(); -int __fastcall UseInvItem(int pnum, int cii); -void __cdecl DoTelekinesis(); -int __fastcall CalculateGold(int pnum); -BOOL __cdecl DropItemBeforeTrig(); +void FreeInvGFX(); +void InitInv(); +void InvDrawSlotBack(int X, int Y, int W, int H); +void DrawInv(); +void DrawInvBelt(); +int AutoPlace(int pnum, int ii, int sx, int sy, int saveflag); +int SpecialAutoPlace(int pnum, int ii, int sx, int sy, int saveflag); +int GoldAutoPlace(int pnum); +int WeaponAutoPlace(int pnum); +int SwapItem(ItemStruct *a, ItemStruct *b); +void CheckInvPaste(int pnum, int mx, int my); +void CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL bId); +void CheckInvCut(int pnum, int mx, int my); +void inv_update_rem_item(int pnum, BYTE iv); +void RemoveInvItem(int pnum, int iv); +void RemoveSpdBarItem(int pnum, int iv); +void CheckInvItem(); +void CheckInvScrn(); +void CheckItemStats(int pnum); +void CheckBookLevel(int pnum); +void CheckQuestItem(int pnum); +void InvGetItem(int pnum, int ii); +void AutoGetItem(int pnum, int ii); +int FindGetItem(int indx, WORD ci, int iseed); +void SyncGetItem(int x, int y, int idx, WORD ci, int iseed); +BOOL CanPut(int x, int y); +BOOL TryInvPut(); +void DrawInvMsg(char *msg); +int InvPutItem(int pnum, int x, int y); +int SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned int ibuff); +int CheckInvHLight(); +void RemoveScroll(int pnum); +BOOL UseScroll(); +void UseStaffCharge(int pnum); +BOOL UseStaff(); +void StartGoldDrop(); +int UseInvItem(int pnum, int cii); +void DoTelekinesis(); +int CalculateGold(int pnum); +BOOL DropItemBeforeTrig(); /* data */ diff --git a/Source/items.cpp b/Source/items.cpp index 0512a53e..76cba43c 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -635,7 +635,7 @@ int ItemInvSnds[35] = { int idoppely = 16; // weak int premiumlvladd[6] = { -1, -1, 0, 0, 1, 2 }; -void __cdecl InitItemGFX() +void InitItemGFX() { signed int v0; // esi char arglist[64]; // [esp+4h] [ebp-40h] @@ -649,7 +649,7 @@ void __cdecl InitItemGFX() memset(UniqueItemFlag, 0, sizeof(UniqueItemFlag)); } -BOOL __fastcall ItemPlace(int xp, int yp) +BOOL ItemPlace(int xp, int yp) { if (dMonster[xp][yp]) return FALSE; @@ -667,7 +667,7 @@ BOOL __fastcall ItemPlace(int xp, int yp) return TRUE; } -void __cdecl AddInitItems() +void AddInitItems() { int x, y, i, j, rnd; @@ -701,7 +701,7 @@ void __cdecl AddInitItems() } } -void __cdecl InitItems() +void InitItems() { int *v0; // eax int v1; // edx @@ -740,7 +740,7 @@ void __cdecl InitItems() } // 5CF31D: using guessed type char setlevel; -void __fastcall CalcPlrItemVals(int p, BOOL Loadgfx) +void CalcPlrItemVals(int p, BOOL Loadgfx) { int pvid, d; @@ -1058,7 +1058,7 @@ void __fastcall CalcPlrItemVals(int p, BOOL Loadgfx) drawhpflag = TRUE; } -void __fastcall CalcPlrScrolls(int p) +void CalcPlrScrolls(int p) { int i, j; @@ -1086,7 +1086,7 @@ void __fastcall CalcPlrScrolls(int p) } // 52571C: using guessed type int drawpanflag; -void __fastcall CalcPlrStaff(int pnum) +void CalcPlrStaff(int pnum) { plr[pnum]._pISpells = 0; if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iStatFlag && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iCharges > 0) { @@ -1094,7 +1094,7 @@ void __fastcall CalcPlrStaff(int pnum) } } -void __fastcall CalcSelfItems(int pnum) +void CalcSelfItems(int pnum) { PlayerStruct *v1; // ecx int v2; // edx @@ -1159,7 +1159,7 @@ void __fastcall CalcSelfItems(int pnum) } while (v9); } -void __fastcall CalcPlrItemMin(int pnum) +void CalcPlrItemMin(int pnum) { PlayerStruct *p; ItemStruct *pi; @@ -1182,7 +1182,7 @@ void __fastcall CalcPlrItemMin(int pnum) } } -BOOL __fastcall ItemMinStats(PlayerStruct *p, ItemStruct *x) +BOOL ItemMinStats(PlayerStruct *p, ItemStruct *x) { if (p->_pMagic < x->_iMinMag) return FALSE; @@ -1196,7 +1196,7 @@ BOOL __fastcall ItemMinStats(PlayerStruct *p, ItemStruct *x) return TRUE; } -void __fastcall CalcPlrBookVals(int p) +void CalcPlrBookVals(int p) { int v1; // esi int v2; // ebx @@ -1256,7 +1256,7 @@ void __fastcall CalcPlrBookVals(int p) } } -void __fastcall CalcPlrInv(int p, BOOL Loadgfx) +void CalcPlrInv(int p, BOOL Loadgfx) { CalcPlrItemMin(p); CalcSelfItems(p); @@ -1271,7 +1271,7 @@ void __fastcall CalcPlrInv(int p, BOOL Loadgfx) } } -void __fastcall SetPlrHandItem(ItemStruct *h, int idata) +void SetPlrHandItem(ItemStruct *h, int idata) { ItemDataStruct *pAllItem; @@ -1310,12 +1310,12 @@ void __fastcall SetPlrHandItem(ItemStruct *h, int idata) h->IDidx = idata; } -void __fastcall GetPlrHandSeed(ItemStruct *h) +void GetPlrHandSeed(ItemStruct *h) { h->_iSeed = GetRndSeed(); } -void __fastcall GetGoldSeed(int pnum, ItemStruct *h) +void GetGoldSeed(int pnum, ItemStruct *h) { int v3; // edi signed int v4; // esi @@ -1348,12 +1348,12 @@ void __fastcall GetGoldSeed(int pnum, ItemStruct *h) h->_iSeed = v5; } -void __fastcall SetPlrHandSeed(ItemStruct *h, int iseed) +void SetPlrHandSeed(ItemStruct *h, int iseed) { h->_iSeed = iseed; } -void __fastcall SetPlrHandGoldCurs(ItemStruct *h) +void SetPlrHandGoldCurs(ItemStruct *h) { int v1; // eax @@ -1368,7 +1368,7 @@ void __fastcall SetPlrHandGoldCurs(ItemStruct *h) } } -void __fastcall CreatePlrItems(int p) +void CreatePlrItems(int p) { int i; ItemStruct *pi = plr[p].InvBody; @@ -1450,7 +1450,7 @@ void __fastcall CreatePlrItems(int p) CalcPlrItemVals(p, FALSE); } -BOOL __fastcall ItemSpaceOk(int i, int j) +BOOL ItemSpaceOk(int i, int j) { int oi; @@ -1488,7 +1488,7 @@ BOOL __fastcall ItemSpaceOk(int i, int j) return !nSolidTable[dPiece[i][j]]; } -BOOL __fastcall GetItemSpace(int x, int y, char inum) +BOOL GetItemSpace(int x, int y, char inum) { int i, j, rs; int xx, yy; @@ -1542,7 +1542,7 @@ BOOL __fastcall GetItemSpace(int x, int y, char inum) return TRUE; } -void __fastcall GetSuperItemSpace(int x, int y, char inum) +void GetSuperItemSpace(int x, int y, char inum) { signed int v4; // edi signed int v5; // ebx @@ -1588,7 +1588,7 @@ void __fastcall GetSuperItemSpace(int x, int y, char inum) } } -void __fastcall GetSuperItemLoc(int x, int y, int *xx, int *yy) +void GetSuperItemLoc(int x, int y, int *xx, int *yy) { signed int v4; // edi signed int v5; // ebx @@ -1629,7 +1629,7 @@ LABEL_3: } } -void __fastcall CalcItemValue(int i) +void CalcItemValue(int i) { int v1; // ecx int v2; // esi @@ -1651,7 +1651,7 @@ void __fastcall CalcItemValue(int i) item[v1]._iIvalue = v4; } -void __fastcall GetBookSpell(int i, int lvl) +void GetBookSpell(int i, int lvl) { int v2; // edi int v3; // esi @@ -1706,7 +1706,7 @@ LABEL_13: } // 679660: using guessed type char gbMaxPlayers; -void __fastcall GetStaffPower(int i, int lvl, int bs, unsigned char onlygood) +void GetStaffPower(int i, int lvl, int bs, unsigned char onlygood) { int v4; // esi int v5; // ebx @@ -1775,7 +1775,7 @@ void __fastcall GetStaffPower(int i, int lvl, int bs, unsigned char onlygood) } // 420514: using guessed type int var_484[256]; -void __fastcall GetStaffSpell(int i, int lvl, unsigned char onlygood) +void GetStaffSpell(int i, int lvl, unsigned char onlygood) { int l; // esi int rv; // eax @@ -1830,7 +1830,7 @@ void __fastcall GetStaffSpell(int i, int lvl, unsigned char onlygood) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall GetItemAttrs(int i, int idata, int lvl) +void GetItemAttrs(int i, int idata, int lvl) { int rndv; @@ -1914,12 +1914,12 @@ void __fastcall GetItemAttrs(int i, int idata, int lvl) } } -int __fastcall RndPL(int param1, int param2) +int RndPL(int param1, int param2) { return param1 + random(22, param2 - param1 + 1); } -int __fastcall PLVal(int pv, int p1, int p2, int minv, int maxv) +int PLVal(int pv, int p1, int p2, int minv, int maxv) { if (p1 == p2) return minv; @@ -1928,7 +1928,7 @@ int __fastcall PLVal(int pv, int p1, int p2, int minv, int maxv) return minv + (maxv - minv) * (100 * (pv - p1) / (p2 - p1)) / 100; } -void __fastcall SaveItemPower(int i, int power, int param1, int param2, int minval, int maxval, int multval) +void SaveItemPower(int i, int power, int param1, int param2, int minval, int maxval, int multval) { int v7; // edi int v8; // esi @@ -2314,7 +2314,7 @@ void __fastcall SaveItemPower(int i, int power, int param1, int param2, int minv } } -void __fastcall GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygood) +void GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygood) { //int v6; // ecx int pre; // esi @@ -2419,7 +2419,7 @@ void __fastcall GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygo } // 4215EF: using guessed type int var_494[256]; -void __fastcall GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlygood) +void GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlygood) { if (item[i]._iClass != ICLASS_GOLD) { if (minlvl > 25) @@ -2454,7 +2454,7 @@ void __fastcall GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlyg } } -void __fastcall SetupItem(int i) +void SetupItem(int i) { int it, il; @@ -2479,7 +2479,7 @@ void __fastcall SetupItem(int i) item[i]._iAnimFrame = il; } -int __fastcall RndItem(int m) +int RndItem(int m) { int i, ri; int ril[512]; @@ -2516,7 +2516,7 @@ int __fastcall RndItem(int m) } // 679660: using guessed type char gbMaxPlayers; -int __fastcall RndUItem(int m) +int RndUItem(int m) { int i, ri; int ril[512]; @@ -2559,7 +2559,7 @@ int __fastcall RndUItem(int m) } // 679660: using guessed type char gbMaxPlayers; -int __cdecl RndAllItems() +int RndAllItems() { int i, ri; int ril[512]; @@ -2583,7 +2583,7 @@ int __cdecl RndAllItems() } // 679660: using guessed type char gbMaxPlayers; -int __fastcall RndTypeItems(int itype, int imid) +int RndTypeItems(int itype, int imid) { int i; // edi BOOLEAN okflag; // esi @@ -2614,7 +2614,7 @@ int __fastcall RndTypeItems(int itype, int imid) } // 421CB7: using guessed type int var_80C[512]; -int __fastcall CheckUnique(int i, int lvl, int uper, BOOLEAN recreate) +int CheckUnique(int i, int lvl, int uper, BOOLEAN recreate) { int numu; // ebx int j; // esi @@ -2658,7 +2658,7 @@ int __fastcall CheckUnique(int i, int lvl, int uper, BOOLEAN recreate) // 679660: using guessed type char gbMaxPlayers; // 421D41: using guessed type char var_84[128]; -void __fastcall GetUniqueItem(int i, int uid) +void GetUniqueItem(int i, int uid) { UniqueItemFlag[uid] = 1; SaveItemPower(i, UniqueItemList[uid].UIPower1, UniqueItemList[uid].UIParam1, UniqueItemList[uid].UIParam2, 0, 0, 1); @@ -2685,7 +2685,7 @@ void __fastcall GetUniqueItem(int i, int uid) item[i]._iMagical = ITEM_QUALITY_UNIQUE; } -void __fastcall SpawnUnique(int uid, int x, int y) +void SpawnUnique(int uid, int x, int y) { int ii; // esi int itype; // edx @@ -2711,13 +2711,13 @@ void __fastcall SpawnUnique(int uid, int x, int y) } // 421F5C: could not find valid save-restore pair for esi -void __fastcall ItemRndDur(int ii) +void ItemRndDur(int ii) { if (item[ii]._iDurability && item[ii]._iDurability != DUR_INDESTRUCTIBLE) item[ii]._iDurability = random(0, item[ii]._iMaxDur >> 1) + (item[ii]._iMaxDur >> 2) + 1; } -void __fastcall SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, int recreate, int pregen) +void SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, int recreate, int pregen) { int iblvl; // edi int uid; // eax @@ -2770,7 +2770,7 @@ void __fastcall SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int SetupItem(ii); } -void __fastcall SpawnItem(int m, int x, int y, BOOL sendmsg) +void SpawnItem(int m, int x, int y, BOOL sendmsg) { int ii; // edi int onlygood; // [esp+Ch] [ebp-Ch] @@ -2817,7 +2817,7 @@ LABEL_13: } // 679660: using guessed type char gbMaxPlayers; -void __fastcall CreateItem(int uid, int x, int y) +void CreateItem(int uid, int x, int y) { int ii; // esi int idx; // edx @@ -2844,7 +2844,7 @@ void __fastcall CreateItem(int uid, int x, int y) } // 422290: could not find valid save-restore pair for esi -void __fastcall CreateRndItem(int x, int y, unsigned char onlygood, unsigned char sendmsg, int delta) +void CreateRndItem(int x, int y, unsigned char onlygood, unsigned char sendmsg, int delta) { int idx; // edi int ii; // esi @@ -2870,7 +2870,7 @@ void __fastcall CreateRndItem(int x, int y, unsigned char onlygood, unsigned cha } } -void __fastcall SetupAllUseful(int ii, int iseed, int lvl) +void SetupAllUseful(int ii, int iseed, int lvl) { int idx; // esi @@ -2888,7 +2888,7 @@ void __fastcall SetupAllUseful(int ii, int iseed, int lvl) SetupItem(ii); } -void __fastcall CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg) +void CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg) { int ii; // esi @@ -2906,7 +2906,7 @@ void __fastcall CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg) } } -void __fastcall CreateTypeItem(int x, int y, unsigned char onlygood, int itype, int imisc, int sendmsg, int delta) +void CreateTypeItem(int x, int y, unsigned char onlygood, int itype, int imisc, int sendmsg, int delta) { int idx; // edi int ii; // esi @@ -2932,7 +2932,7 @@ void __fastcall CreateTypeItem(int x, int y, unsigned char onlygood, int itype, } } -void __fastcall RecreateItem(int ii, int idx, unsigned short ic, int iseed, int ivalue) +void RecreateItem(int ii, int idx, unsigned short ic, int iseed, int ivalue) { int uper; // esi int onlygood; // edx @@ -2982,7 +2982,7 @@ void __fastcall RecreateItem(int ii, int idx, unsigned short ic, int iseed, int } } -void __fastcall RecreateEar(int ii, unsigned short ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff) +void RecreateEar(int ii, unsigned short ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff) { SetPlrHandItem(&item[ii], IDI_EAR); tempstr[0] = (ic >> 8) & 0x7F; @@ -3009,7 +3009,7 @@ void __fastcall RecreateEar(int ii, unsigned short ic, int iseed, int Id, int du item[ii]._iSeed = iseed; } -void __fastcall SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag) +void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag) { BOOL failed; int i, j, tries; @@ -3052,7 +3052,7 @@ void __fastcall SpawnQuestItem(int itemid, int x, int y, int randarea, int selfl } } -void __cdecl SpawnRock() +void SpawnRock() { BOOL v0; // edx int v1; // eax @@ -3102,7 +3102,7 @@ void __cdecl SpawnRock() } } -void __fastcall RespawnItem(int i, BOOL FlipFlag) +void RespawnItem(int i, BOOL FlipFlag) { int it; // ecx int il; // eax @@ -3137,7 +3137,7 @@ void __fastcall RespawnItem(int i, BOOL FlipFlag) item[i]._iSelFlag = 1; } -void __fastcall DeleteItem(int ii, int i) +void DeleteItem(int ii, int i) { itemavail[MAXITEMS - numitems] = ii; numitems--; @@ -3145,7 +3145,7 @@ void __fastcall DeleteItem(int ii, int i) itemactive[i] = itemactive[numitems]; } -void __cdecl ItemDoppel() +void ItemDoppel() { int idoppelx; // esi ItemStruct *i; // edx @@ -3164,7 +3164,7 @@ void __cdecl ItemDoppel() } } -void __cdecl ProcessItems() +void ProcessItems() { int i; // edi int ii; // esi @@ -3193,7 +3193,7 @@ void __cdecl ProcessItems() ItemDoppel(); } -void __cdecl FreeItemGFX() +void FreeItemGFX() { int i; // esi void *v1; // ecx @@ -3205,12 +3205,12 @@ void __cdecl FreeItemGFX() } } -void __fastcall GetItemFrm(int i) +void GetItemFrm(int i) { item[i]._iAnimData = itemanims[ItemCAnimTbl[item[i]._iCurs]]; } -void __fastcall GetItemStr(int i) +void GetItemStr(int i) { int nGold; // esi @@ -3231,7 +3231,7 @@ void __fastcall GetItemStr(int i) } // 4B883C: using guessed type int infoclr; -void __fastcall CheckIdentify(int pnum, int cii) +void CheckIdentify(int pnum, int cii) { ItemStruct *pi; // esi @@ -3244,7 +3244,7 @@ void __fastcall CheckIdentify(int pnum, int cii) SetCursor_(CURSOR_HAND); } -void __fastcall DoRepair(int pnum, int cii) +void DoRepair(int pnum, int cii) { PlayerStruct *p; // eax ItemStruct *pi; // esi @@ -3260,7 +3260,7 @@ void __fastcall DoRepair(int pnum, int cii) SetCursor_(CURSOR_HAND); } -void __fastcall RepairItem(ItemStruct *i, int lvl) +void RepairItem(ItemStruct *i, int lvl) { int rep; // edi int d; // eax @@ -3291,7 +3291,7 @@ void __fastcall RepairItem(ItemStruct *i, int lvl) } } -void __fastcall DoRecharge(int pnum, int cii) +void DoRecharge(int pnum, int cii) { PlayerStruct *p; // eax ItemStruct *pi; // esi @@ -3308,7 +3308,7 @@ void __fastcall DoRecharge(int pnum, int cii) SetCursor_(CURSOR_HAND); } -void __fastcall RechargeItem(ItemStruct *i, int r) +void RechargeItem(ItemStruct *i, int r) { if (i->_iCharges != i->_iMaxCharges) { while (1) { @@ -3326,7 +3326,7 @@ void __fastcall RechargeItem(ItemStruct *i, int r) } } -void __fastcall PrintItemOil(char IDidx) +void PrintItemOil(char IDidx) { switch (IDidx) { case IMISC_FULLHEAL: @@ -3382,7 +3382,7 @@ void __fastcall PrintItemOil(char IDidx) AddPanelString(tempstr, 1); } -void __fastcall PrintItemPower(char plidx, ItemStruct *x) +void PrintItemPower(char plidx, ItemStruct *x) { ItemStruct *v2; // esi int *v3; // esi @@ -3649,7 +3649,7 @@ void __fastcall PrintItemPower(char plidx, ItemStruct *x) } } -void __cdecl DrawUTextBack() +void DrawUTextBack() { CelDecodeOnly(88, 487, (BYTE *)pSTextBoxCels, 1, 271); @@ -3660,7 +3660,7 @@ void __cdecl DrawUTextBack() #include "asm_trans_rect.inc" } -void __fastcall PrintUString(int x, int y, int cjustflag, char *str, int col) +void PrintUString(int x, int y, int cjustflag, char *str, int col) { char *v5; // edi int v6; // ebx @@ -3714,7 +3714,7 @@ void __fastcall PrintUString(int x, int y, int cjustflag, char *str, int col) } } -void __fastcall DrawULine(int y) +void DrawULine(int y) { /// ASSERT: assert(gpBuffer); @@ -3751,7 +3751,7 @@ void __fastcall DrawULine(int y) #endif } -void __cdecl DrawUniqueInfo() +void DrawUniqueInfo() { int v0; // esi int v1; // esi @@ -3790,7 +3790,7 @@ void __cdecl DrawUniqueInfo() } // 69BD04: using guessed type int questlog; -void __fastcall PrintItemMisc(ItemStruct *x) +void PrintItemMisc(ItemStruct *x) { if (x->_iMiscId == IMISC_SCROLL) { strcpy(tempstr, "Right-click to read"); @@ -3821,7 +3821,7 @@ void __fastcall PrintItemMisc(ItemStruct *x) } } -void __fastcall PrintItemDetails(ItemStruct *x) +void PrintItemDetails(ItemStruct *x) { ItemStruct *v1; // ebp char v2; // cl @@ -3882,7 +3882,7 @@ void __fastcall PrintItemDetails(ItemStruct *x) pinfoflag = TRUE; } -void __fastcall PrintItemDur(ItemStruct *x) +void PrintItemDur(ItemStruct *x) { ItemStruct *v1; // esi int v2; // eax @@ -3937,7 +3937,7 @@ void __fastcall PrintItemDur(ItemStruct *x) pinfoflag = TRUE; } -void __fastcall UseItem(int p, int Mid, int spl) +void UseItem(int p, int Mid, int spl) { int l, j; @@ -4099,7 +4099,7 @@ void __fastcall UseItem(int p, int Mid, int spl) } } -BOOL __fastcall StoreStatOk(ItemStruct *h) +BOOL StoreStatOk(ItemStruct *h) { BOOL sf; @@ -4114,7 +4114,7 @@ BOOL __fastcall StoreStatOk(ItemStruct *h) return sf; } -BOOL __fastcall SmithItemOk(int i) +BOOL SmithItemOk(int i) { BOOL rv; @@ -4135,7 +4135,7 @@ BOOL __fastcall SmithItemOk(int i) return rv; } -int __fastcall RndSmithItem(int lvl) +int RndSmithItem(int lvl) { int i, ri; int ril[512]; @@ -4155,7 +4155,7 @@ int __fastcall RndSmithItem(int lvl) return ril[random(50, ri)] + 1; } -void __fastcall BubbleSwapItem(ItemStruct *a, ItemStruct *b) +void BubbleSwapItem(ItemStruct *a, ItemStruct *b) { ItemStruct h; // [esp+8h] [ebp-170h] @@ -4164,7 +4164,7 @@ void __fastcall BubbleSwapItem(ItemStruct *a, ItemStruct *b) qmemcpy(b, &h, sizeof(ItemStruct)); } -void __cdecl SortSmith() +void SortSmith() { int j, k; BOOL sorted; @@ -4189,7 +4189,7 @@ void __cdecl SortSmith() } } -void __fastcall SpawnSmith(int lvl) +void SpawnSmith(int lvl) { ItemStruct *holdItem; int i, nsi, idata; @@ -4214,7 +4214,7 @@ void __fastcall SpawnSmith(int lvl) SortSmith(); } -BOOL __fastcall PremiumItemOk(int i) +BOOL PremiumItemOk(int i) { BOOL rv; @@ -4239,7 +4239,7 @@ BOOL __fastcall PremiumItemOk(int i) } // 679660: using guessed type char gbMaxPlayers; -int __fastcall RndPremiumItem(int minlvl, int maxlvl) +int RndPremiumItem(int minlvl, int maxlvl) { int i, ri; int ril[512]; @@ -4258,7 +4258,7 @@ int __fastcall RndPremiumItem(int minlvl, int maxlvl) } // 42445F: using guessed type int ril[512]; -void __fastcall SpawnOnePremium(int i, int plvl) +void SpawnOnePremium(int i, int plvl) { int itype; // esi ItemStruct holditem; // [esp+Ch] [ebp-178h] @@ -4282,7 +4282,7 @@ void __fastcall SpawnOnePremium(int i, int plvl) qmemcpy(item, &holditem, sizeof(ItemStruct)); } -void __fastcall SpawnPremium(int lvl) +void SpawnPremium(int lvl) { int i; // eax @@ -4305,7 +4305,7 @@ void __fastcall SpawnPremium(int lvl) } // 69FB38: using guessed type int talker; -BOOL __fastcall WitchItemOk(int i) +BOOL WitchItemOk(int i) { BOOL rv; @@ -4333,7 +4333,7 @@ BOOL __fastcall WitchItemOk(int i) } // 679660: using guessed type char gbMaxPlayers; -int __fastcall RndWitchItem(int lvl) +int RndWitchItem(int lvl) { int i, ri; int ril[512]; @@ -4349,7 +4349,7 @@ int __fastcall RndWitchItem(int lvl) return ril[random(51, ri)] + 1; } -void __cdecl SortWitch() +void SortWitch() { int j, k; BOOL sorted; @@ -4374,7 +4374,7 @@ void __cdecl SortWitch() } } -void __fastcall WitchBookLevel(int ii) +void WitchBookLevel(int ii) { int slvl; // edi @@ -4394,7 +4394,7 @@ void __fastcall WitchBookLevel(int ii) } } -void __fastcall SpawnWitch(int lvl) +void SpawnWitch(int lvl) { int v2; // ebp int itype; // esi @@ -4453,7 +4453,7 @@ void __fastcall SpawnWitch(int lvl) SortWitch(); } -int __fastcall RndBoyItem(int lvl) +int RndBoyItem(int lvl) { int i, ri; int ril[512]; @@ -4470,7 +4470,7 @@ int __fastcall RndBoyItem(int lvl) } // 4249A4: using guessed type int var_800[512]; -void __fastcall SpawnBoy(int lvl) +void SpawnBoy(int lvl) { int itype; // esi @@ -4491,7 +4491,7 @@ void __fastcall SpawnBoy(int lvl) } // 6A8A3C: using guessed type int boylevel; -BOOL __fastcall HealerItemOk(int i) +BOOL HealerItemOk(int i) { int v1; // ecx BOOLEAN result; // eax @@ -4546,7 +4546,7 @@ LABEL_21: } // 679660: using guessed type char gbMaxPlayers; -int __fastcall RndHealerItem(int lvl) +int RndHealerItem(int lvl) { int i, ri; int ril[512]; @@ -4562,7 +4562,7 @@ int __fastcall RndHealerItem(int lvl) return ril[random(50, ri)] + 1; } -void __cdecl SortHealer() +void SortHealer() { int j, k; BOOL sorted; @@ -4587,7 +4587,7 @@ void __cdecl SortHealer() } } -void __fastcall SpawnHealer(int lvl) +void SpawnHealer(int lvl) { int v3; // eax ItemStruct *v4; // ebp @@ -4637,14 +4637,14 @@ void __fastcall SpawnHealer(int lvl) } // 679660: using guessed type char gbMaxPlayers; -void __cdecl SpawnStoreGold() +void SpawnStoreGold() { GetItemAttrs(0, IDI_GOLD, 1); qmemcpy(&golditem, item, sizeof(golditem)); golditem._iStatFlag = 1; } -void __fastcall RecreateSmithItem(int ii, int idx, int plvl, int iseed) +void RecreateSmithItem(int ii, int idx, int plvl, int iseed) { SetRndSeed(iseed); GetItemAttrs(ii, RndSmithItem(plvl) - 1, plvl); @@ -4653,7 +4653,7 @@ void __fastcall RecreateSmithItem(int ii, int idx, int plvl, int iseed) item[ii]._iIdentified = TRUE; } -void __fastcall RecreatePremiumItem(int ii, int idx, int lvl, int iseed) +void RecreatePremiumItem(int ii, int idx, int lvl, int iseed) { int itype; // edi @@ -4666,7 +4666,7 @@ void __fastcall RecreatePremiumItem(int ii, int idx, int lvl, int iseed) item[ii]._iIdentified = TRUE; } -void __fastcall RecreateBoyItem(int ii, int idx, int lvl, int iseed) +void RecreateBoyItem(int ii, int idx, int lvl, int iseed) { int itype; // edi @@ -4679,7 +4679,7 @@ void __fastcall RecreateBoyItem(int ii, int idx, int lvl, int iseed) item[ii]._iIdentified = TRUE; } -void __fastcall RecreateWitchItem(int ii, int idx, int lvl, int iseed) +void RecreateWitchItem(int ii, int idx, int lvl, int iseed) { int itype; // edi int iblvl; // eax @@ -4700,7 +4700,7 @@ void __fastcall RecreateWitchItem(int ii, int idx, int lvl, int iseed) item[ii]._iIdentified = TRUE; } -void __fastcall RecreateHealerItem(int ii, int idx, int lvl, int iseed) +void RecreateHealerItem(int ii, int idx, int lvl, int iseed) { if (idx != IDI_HEAL && idx != IDI_FULLHEAL && idx != IDI_RESURRECT) { SetRndSeed(iseed); @@ -4712,7 +4712,7 @@ void __fastcall RecreateHealerItem(int ii, int idx, int lvl, int iseed) item[ii]._iIdentified = TRUE; } -void __fastcall RecreateTownItem(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue) +void RecreateTownItem(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue) { if (icreateinfo & 0x400) RecreateSmithItem(ii, idx, icreateinfo & 0x3F, iseed); @@ -4726,7 +4726,7 @@ void __fastcall RecreateTownItem(int ii, int idx, unsigned short icreateinfo, in RecreateHealerItem(ii, idx, icreateinfo & 0x3F, iseed); } -void __cdecl RecalcStoreStats() +void RecalcStoreStats() { int i; @@ -4749,7 +4749,7 @@ void __cdecl RecalcStoreStats() // 6A6BB8: using guessed type int stextscrl; // 6AA700: using guessed type int stextdown; -int __cdecl ItemNoFlippy() +int ItemNoFlippy() { int r; // ecx @@ -4761,7 +4761,7 @@ int __cdecl ItemNoFlippy() return r; } -void __fastcall CreateSpellBook(int x, int y, int ispell, BOOLEAN sendmsg, int delta) +void CreateSpellBook(int x, int y, int ispell, BOOLEAN sendmsg, int delta) { int ii; // edi int idx; // [esp+8h] [ebp-8h] @@ -4787,7 +4787,7 @@ void __fastcall CreateSpellBook(int x, int y, int ispell, BOOLEAN sendmsg, int d } } -void __fastcall CreateMagicArmor(int x, int y, int imisc, int icurs, int sendmsg, int delta) +void CreateMagicArmor(int x, int y, int imisc, int icurs, int sendmsg, int delta) { int ii; // esi int idx; // ebx @@ -4815,7 +4815,7 @@ void __fastcall CreateMagicArmor(int x, int y, int imisc, int icurs, int sendmsg } } -void __fastcall CreateMagicWeapon(int x, int y, int imisc, int icurs, int sendmsg, int delta) +void CreateMagicWeapon(int x, int y, int imisc, int icurs, int sendmsg, int delta) { int ii; // esi int idx; // ebx @@ -4843,7 +4843,7 @@ void __fastcall CreateMagicWeapon(int x, int y, int imisc, int icurs, int sendms } } -BOOL __fastcall GetItemRecord(int dwSeed, WORD CI, int indx) +BOOL GetItemRecord(int dwSeed, WORD CI, int indx) { int v3; // edi int *v4; // ebx @@ -4885,7 +4885,7 @@ BOOL __fastcall GetItemRecord(int dwSeed, WORD CI, int indx) return 0; } -void __fastcall NextItemRecord(int i) +void NextItemRecord(int i) { int v1; // eax @@ -4898,7 +4898,7 @@ void __fastcall NextItemRecord(int i) } } -void __fastcall SetItemRecord(int dwSeed, WORD CI, int indx) +void SetItemRecord(int dwSeed, WORD CI, int indx) { int i; // ecx @@ -4911,7 +4911,7 @@ void __fastcall SetItemRecord(int dwSeed, WORD CI, int indx) } } -void __fastcall PutItemRecord(int seed, WORD ci, int index) +void PutItemRecord(int seed, WORD ci, int index) { int v3; // edi int *v4; // ebx diff --git a/Source/items.h b/Source/items.h index af53eeb7..6437650c 100644 --- a/Source/items.h +++ b/Source/items.h @@ -14,117 +14,117 @@ extern int UniqueItemFlag[128]; extern int numitems; extern int gnNumGetRecords; -void __cdecl InitItemGFX(); -BOOL __fastcall ItemPlace(int xp, int yp); -void __cdecl AddInitItems(); -void __cdecl InitItems(); -void __fastcall CalcPlrItemVals(int p, BOOL Loadgfx); -void __fastcall CalcPlrScrolls(int p); -void __fastcall CalcPlrStaff(int pnum); -void __fastcall CalcSelfItems(int pnum); -void __fastcall CalcPlrItemMin(int pnum); -BOOL __fastcall ItemMinStats(PlayerStruct *p, ItemStruct *x); -void __fastcall CalcPlrBookVals(int p); -void __fastcall CalcPlrInv(int p, BOOL Loadgfx); -void __fastcall SetPlrHandItem(ItemStruct *h, int idata); -void __fastcall GetPlrHandSeed(ItemStruct *h); -void __fastcall GetGoldSeed(int pnum, ItemStruct *h); -void __fastcall SetPlrHandSeed(ItemStruct *h, int iseed); -void __fastcall SetPlrHandGoldCurs(ItemStruct *h); -void __fastcall CreatePlrItems(int p); -BOOL __fastcall ItemSpaceOk(int i, int j); -BOOL __fastcall GetItemSpace(int x, int y, char inum); -void __fastcall GetSuperItemSpace(int x, int y, char inum); -void __fastcall GetSuperItemLoc(int x, int y, int *xx, int *yy); -void __fastcall CalcItemValue(int i); -void __fastcall GetBookSpell(int i, int lvl); -void __fastcall GetStaffPower(int i, int lvl, int bs, unsigned char onlygood); -void __fastcall GetStaffSpell(int i, int lvl, unsigned char onlygood); -void __fastcall GetItemAttrs(int i, int idata, int lvl); -int __fastcall RndPL(int param1, int param2); -int __fastcall PLVal(int pv, int p1, int p2, int minv, int maxv); -void __fastcall SaveItemPower(int i, int power, int param1, int param2, int minval, int maxval, int multval); -void __fastcall GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygood); -void __fastcall GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlygood); -void __fastcall SetupItem(int i); -int __fastcall RndItem(int m); -int __fastcall RndUItem(int m); -int __cdecl RndAllItems(); -int __fastcall RndTypeItems(int itype, int imid); -int __fastcall CheckUnique(int i, int lvl, int uper, BOOLEAN recreate); -void __fastcall GetUniqueItem(int i, int uid); -void __fastcall SpawnUnique(int uid, int x, int y); -void __fastcall ItemRndDur(int ii); -void __fastcall SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, int recreate, int pregen); -void __fastcall SpawnItem(int m, int x, int y, BOOL sendmsg); -void __fastcall CreateItem(int uid, int x, int y); -void __fastcall CreateRndItem(int x, int y, unsigned char onlygood, unsigned char sendmsg, int delta); -void __fastcall SetupAllUseful(int ii, int iseed, int lvl); -void __fastcall CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg); -void __fastcall CreateTypeItem(int x, int y, unsigned char onlygood, int itype, int imisc, int sendmsg, int delta); -void __fastcall RecreateItem(int ii, int idx, unsigned short ic, int iseed, int ivalue); -void __fastcall RecreateEar(int ii, unsigned short ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff); -void __fastcall SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag); -void __cdecl SpawnRock(); -void __fastcall RespawnItem(int i, BOOL FlipFlag); -void __fastcall DeleteItem(int ii, int i); -void __cdecl ItemDoppel(); -void __cdecl ProcessItems(); -void __cdecl FreeItemGFX(); -void __fastcall GetItemFrm(int i); -void __fastcall GetItemStr(int i); -void __fastcall CheckIdentify(int pnum, int cii); -void __fastcall DoRepair(int pnum, int cii); -void __fastcall RepairItem(ItemStruct *i, int lvl); -void __fastcall DoRecharge(int pnum, int cii); -void __fastcall RechargeItem(ItemStruct *i, int r); -void __fastcall PrintItemOil(char IDidx); -void __fastcall PrintItemPower(char plidx, ItemStruct *x); -void __cdecl DrawUTextBack(); -void __fastcall PrintUString(int x, int y, int cjustflag, char *str, int col); -void __fastcall DrawULine(int y); -void __cdecl DrawUniqueInfo(); -void __fastcall PrintItemMisc(ItemStruct *x); -void __fastcall PrintItemDetails(ItemStruct *x); -void __fastcall PrintItemDur(ItemStruct *x); -void __fastcall UseItem(int p, int Mid, int spl); -BOOL __fastcall StoreStatOk(ItemStruct *h); -BOOL __fastcall SmithItemOk(int i); -int __fastcall RndSmithItem(int lvl); -void __fastcall BubbleSwapItem(ItemStruct *a, ItemStruct *b); -void __cdecl SortSmith(); -void __fastcall SpawnSmith(int lvl); -BOOL __fastcall PremiumItemOk(int i); -int __fastcall RndPremiumItem(int minlvl, int maxlvl); -void __fastcall SpawnOnePremium(int i, int plvl); -void __fastcall SpawnPremium(int lvl); -BOOL __fastcall WitchItemOk(int i); -int __fastcall RndWitchItem(int lvl); -void __cdecl SortWitch(); -void __fastcall WitchBookLevel(int ii); -void __fastcall SpawnWitch(int lvl); -int __fastcall RndBoyItem(int lvl); -void __fastcall SpawnBoy(int lvl); -BOOL __fastcall HealerItemOk(int i); -int __fastcall RndHealerItem(int lvl); -void __cdecl SortHealer(); -void __fastcall SpawnHealer(int lvl); -void __cdecl SpawnStoreGold(); -void __fastcall RecreateSmithItem(int ii, int idx, int plvl, int iseed); -void __fastcall RecreatePremiumItem(int ii, int idx, int lvl, int iseed); -void __fastcall RecreateBoyItem(int ii, int idx, int lvl, int iseed); -void __fastcall RecreateWitchItem(int ii, int idx, int lvl, int iseed); -void __fastcall RecreateHealerItem(int ii, int idx, int lvl, int iseed); -void __fastcall RecreateTownItem(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue); -void __cdecl RecalcStoreStats(); -int __cdecl ItemNoFlippy(); -void __fastcall CreateSpellBook(int x, int y, int ispell, BOOLEAN sendmsg, int delta); -void __fastcall CreateMagicArmor(int x, int y, int imisc, int icurs, int sendmsg, int delta); -void __fastcall CreateMagicWeapon(int x, int y, int imisc, int icurs, int sendmsg, int delta); -BOOL __fastcall GetItemRecord(int dwSeed, WORD CI, int indx); -void __fastcall NextItemRecord(int i); -void __fastcall SetItemRecord(int dwSeed, WORD CI, int indx); -void __fastcall PutItemRecord(int seed, WORD ci, int index); +void InitItemGFX(); +BOOL ItemPlace(int xp, int yp); +void AddInitItems(); +void InitItems(); +void CalcPlrItemVals(int p, BOOL Loadgfx); +void CalcPlrScrolls(int p); +void CalcPlrStaff(int pnum); +void CalcSelfItems(int pnum); +void CalcPlrItemMin(int pnum); +BOOL ItemMinStats(PlayerStruct *p, ItemStruct *x); +void CalcPlrBookVals(int p); +void CalcPlrInv(int p, BOOL Loadgfx); +void SetPlrHandItem(ItemStruct *h, int idata); +void GetPlrHandSeed(ItemStruct *h); +void GetGoldSeed(int pnum, ItemStruct *h); +void SetPlrHandSeed(ItemStruct *h, int iseed); +void SetPlrHandGoldCurs(ItemStruct *h); +void CreatePlrItems(int p); +BOOL ItemSpaceOk(int i, int j); +BOOL GetItemSpace(int x, int y, char inum); +void GetSuperItemSpace(int x, int y, char inum); +void GetSuperItemLoc(int x, int y, int *xx, int *yy); +void CalcItemValue(int i); +void GetBookSpell(int i, int lvl); +void GetStaffPower(int i, int lvl, int bs, unsigned char onlygood); +void GetStaffSpell(int i, int lvl, unsigned char onlygood); +void GetItemAttrs(int i, int idata, int lvl); +int RndPL(int param1, int param2); +int PLVal(int pv, int p1, int p2, int minv, int maxv); +void SaveItemPower(int i, int power, int param1, int param2, int minval, int maxval, int multval); +void GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygood); +void GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlygood); +void SetupItem(int i); +int RndItem(int m); +int RndUItem(int m); +int RndAllItems(); +int RndTypeItems(int itype, int imid); +int CheckUnique(int i, int lvl, int uper, BOOLEAN recreate); +void GetUniqueItem(int i, int uid); +void SpawnUnique(int uid, int x, int y); +void ItemRndDur(int ii); +void SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, int recreate, int pregen); +void SpawnItem(int m, int x, int y, BOOL sendmsg); +void CreateItem(int uid, int x, int y); +void CreateRndItem(int x, int y, unsigned char onlygood, unsigned char sendmsg, int delta); +void SetupAllUseful(int ii, int iseed, int lvl); +void CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg); +void CreateTypeItem(int x, int y, unsigned char onlygood, int itype, int imisc, int sendmsg, int delta); +void RecreateItem(int ii, int idx, unsigned short ic, int iseed, int ivalue); +void RecreateEar(int ii, unsigned short ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff); +void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag); +void SpawnRock(); +void RespawnItem(int i, BOOL FlipFlag); +void DeleteItem(int ii, int i); +void ItemDoppel(); +void ProcessItems(); +void FreeItemGFX(); +void GetItemFrm(int i); +void GetItemStr(int i); +void CheckIdentify(int pnum, int cii); +void DoRepair(int pnum, int cii); +void RepairItem(ItemStruct *i, int lvl); +void DoRecharge(int pnum, int cii); +void RechargeItem(ItemStruct *i, int r); +void PrintItemOil(char IDidx); +void PrintItemPower(char plidx, ItemStruct *x); +void DrawUTextBack(); +void PrintUString(int x, int y, int cjustflag, char *str, int col); +void DrawULine(int y); +void DrawUniqueInfo(); +void PrintItemMisc(ItemStruct *x); +void PrintItemDetails(ItemStruct *x); +void PrintItemDur(ItemStruct *x); +void UseItem(int p, int Mid, int spl); +BOOL StoreStatOk(ItemStruct *h); +BOOL SmithItemOk(int i); +int RndSmithItem(int lvl); +void BubbleSwapItem(ItemStruct *a, ItemStruct *b); +void SortSmith(); +void SpawnSmith(int lvl); +BOOL PremiumItemOk(int i); +int RndPremiumItem(int minlvl, int maxlvl); +void SpawnOnePremium(int i, int plvl); +void SpawnPremium(int lvl); +BOOL WitchItemOk(int i); +int RndWitchItem(int lvl); +void SortWitch(); +void WitchBookLevel(int ii); +void SpawnWitch(int lvl); +int RndBoyItem(int lvl); +void SpawnBoy(int lvl); +BOOL HealerItemOk(int i); +int RndHealerItem(int lvl); +void SortHealer(); +void SpawnHealer(int lvl); +void SpawnStoreGold(); +void RecreateSmithItem(int ii, int idx, int plvl, int iseed); +void RecreatePremiumItem(int ii, int idx, int lvl, int iseed); +void RecreateBoyItem(int ii, int idx, int lvl, int iseed); +void RecreateWitchItem(int ii, int idx, int lvl, int iseed); +void RecreateHealerItem(int ii, int idx, int lvl, int iseed); +void RecreateTownItem(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue); +void RecalcStoreStats(); +int ItemNoFlippy(); +void CreateSpellBook(int x, int y, int ispell, BOOLEAN sendmsg, int delta); +void CreateMagicArmor(int x, int y, int imisc, int icurs, int sendmsg, int delta); +void CreateMagicWeapon(int x, int y, int imisc, int icurs, int sendmsg, int delta); +BOOL GetItemRecord(int dwSeed, WORD CI, int indx); +void NextItemRecord(int i); +void SetItemRecord(int dwSeed, WORD CI, int indx); +void PutItemRecord(int seed, WORD ci, int index); /* rdata */ diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 9b6ddff1..59bd1d16 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -451,7 +451,7 @@ unsigned char byte_49463C[18][18] = /* unused */ unsigned char RadiusAdj[23] = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0 }; -void __fastcall RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by) +void RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by) { int swap; @@ -478,7 +478,7 @@ void __fastcall RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, } } -void __fastcall DoLighting(int nXPos, int nYPos, int nRadius, int Lnum) +void DoLighting(int nXPos, int nYPos, int nRadius, int Lnum) { int x, y, v, xoff, yoff, mult, radius_block; int min_x, max_x, min_y, max_y; @@ -601,7 +601,7 @@ void __fastcall DoLighting(int nXPos, int nYPos, int nRadius, int Lnum) } } -void __fastcall DoUnLight(int nXPos, int nYPos, int nRadius) +void DoUnLight(int nXPos, int nYPos, int nRadius) { int x, y, min_x, min_y, max_x, max_y; @@ -633,7 +633,7 @@ void __fastcall DoUnLight(int nXPos, int nYPos, int nRadius) } } -void __fastcall DoUnVision(int nXPos, int nYPos, int nRadius) +void DoUnVision(int nXPos, int nYPos, int nRadius) { int i, j, x1, y1, x2, y2; @@ -663,7 +663,7 @@ void __fastcall DoUnVision(int nXPos, int nYPos, int nRadius) } } -void __fastcall DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible) +void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible) { int nCrawlX, nCrawlY, nLineLen, nBlockerFlag, nTrans; int j, k, v, x1adj, x2adj, y1adj, y2adj; @@ -751,7 +751,7 @@ void __fastcall DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL } } -void __cdecl FreeLightTable() +void FreeLightTable() { BYTE *ptr; @@ -760,13 +760,13 @@ void __cdecl FreeLightTable() mem_free_dbg(ptr); } -void __cdecl InitLightTable() +void InitLightTable() { /// ASSERT: assert(! pLightTbl); pLightTbl = DiabloAllocPtr(LIGHTSIZE); } -void __cdecl MakeLightTable() +void MakeLightTable() { int i, j, k, l, lights, shade, l1, l2, cnt, rem, div; double fs, fa; @@ -949,7 +949,7 @@ void __cdecl MakeLightTable() // 525728: using guessed type int light4flag; #ifdef _DEBUG -void __cdecl ToggleLighting_2() +void ToggleLighting_2() { int i; @@ -965,7 +965,7 @@ void __cdecl ToggleLighting_2() } } -void __cdecl ToggleLighting() +void ToggleLighting() { int i; @@ -984,7 +984,7 @@ void __cdecl ToggleLighting() } #endif -void __cdecl InitLightMax() +void InitLightMax() { if (light4flag) { lightmax = 3; @@ -995,7 +995,7 @@ void __cdecl InitLightMax() // 525728: using guessed type int light4flag; // 642A14: using guessed type char lightmax; -void __cdecl InitLighting() +void InitLighting() { int i; @@ -1010,7 +1010,7 @@ void __cdecl InitLighting() // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -int __fastcall AddLight(int x, int y, int r) +int AddLight(int x, int y, int r) { int lid; @@ -1037,7 +1037,7 @@ int __fastcall AddLight(int x, int y, int r) // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -void __fastcall AddUnLight(int i) +void AddUnLight(int i) { if (lightflag || i == -1) { return; @@ -1049,7 +1049,7 @@ void __fastcall AddUnLight(int i) // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -void __fastcall ChangeLightRadius(int i, int r) +void ChangeLightRadius(int i, int r) { if (lightflag || i == -1) { return; @@ -1065,7 +1065,7 @@ void __fastcall ChangeLightRadius(int i, int r) // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -void __fastcall ChangeLightXY(int i, int x, int y) +void ChangeLightXY(int i, int x, int y) { if (lightflag || i == -1) { return; @@ -1082,7 +1082,7 @@ void __fastcall ChangeLightXY(int i, int x, int y) // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -void __fastcall ChangeLightOff(int i, int x, int y) +void ChangeLightOff(int i, int x, int y) { if (lightflag || i == -1) { return; @@ -1099,7 +1099,7 @@ void __fastcall ChangeLightOff(int i, int x, int y) // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -void __fastcall ChangeLight(int i, int x, int y, int r) +void ChangeLight(int i, int x, int y, int r) { if (lightflag || i == -1) { return; @@ -1117,7 +1117,7 @@ void __fastcall ChangeLight(int i, int x, int y, int r) // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -void __cdecl ProcessLightList() +void ProcessLightList() { int i, j; unsigned char temp; @@ -1161,12 +1161,12 @@ void __cdecl ProcessLightList() // 642A18: using guessed type int dolighting; // 646A28: using guessed type int lightflag; -void __cdecl SavePreLighting() +void SavePreLighting() { memcpy(dPreLight, dLight, sizeof(dPreLight)); } -void __cdecl InitVision() +void InitVision() { int i; @@ -1181,7 +1181,7 @@ void __cdecl InitVision() // 5A5590: using guessed type char TransVal; // 642A0C: using guessed type int dovision; -int __fastcall AddVision(int x, int y, int r, BOOL mine) +int AddVision(int x, int y, int r, BOOL mine) { int vid; @@ -1204,7 +1204,7 @@ int __fastcall AddVision(int x, int y, int r, BOOL mine) } // 642A0C: using guessed type int dovision; -void __fastcall ChangeVisionRadius(int id, int r) +void ChangeVisionRadius(int id, int r) { int i; @@ -1221,7 +1221,7 @@ void __fastcall ChangeVisionRadius(int id, int r) } // 642A0C: using guessed type int dovision; -void __fastcall ChangeVisionXY(int id, int x, int y) +void ChangeVisionXY(int id, int x, int y) { int i; @@ -1239,7 +1239,7 @@ void __fastcall ChangeVisionXY(int id, int x, int y) } // 642A0C: using guessed type int dovision; -void __cdecl ProcessVisionList() +void ProcessVisionList() { int i; BOOL delflag; @@ -1286,7 +1286,7 @@ void __cdecl ProcessVisionList() // 5A5590: using guessed type char TransVal; // 642A0C: using guessed type int dovision; -void __cdecl lighting_color_cycling() +void lighting_color_cycling() { int i, j, l; BYTE col; diff --git a/Source/lighting.h b/Source/lighting.h index c2d55502..bf5471b9 100644 --- a/Source/lighting.h +++ b/Source/lighting.h @@ -16,34 +16,34 @@ extern int visionid; extern BYTE *pLightTbl; extern BOOL lightflag; -void __fastcall RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by); -void __fastcall DoLighting(int nXPos, int nYPos, int nRadius, int Lnum); -void __fastcall DoUnLight(int nXPos, int nYPos, int nRadius); -void __fastcall DoUnVision(int nXPos, int nYPos, int nRadius); -void __fastcall DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible); -void __cdecl FreeLightTable(); -void __cdecl InitLightTable(); -void __cdecl MakeLightTable(); +void RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by); +void DoLighting(int nXPos, int nYPos, int nRadius, int Lnum); +void DoUnLight(int nXPos, int nYPos, int nRadius); +void DoUnVision(int nXPos, int nYPos, int nRadius); +void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible); +void FreeLightTable(); +void InitLightTable(); +void MakeLightTable(); #ifdef _DEBUG -void __cdecl ToggleLighting_2(); -void __cdecl ToggleLighting(); +void ToggleLighting_2(); +void ToggleLighting(); #endif -void __cdecl InitLightMax(); -void __cdecl InitLighting(); -int __fastcall AddLight(int x, int y, int r); -void __fastcall AddUnLight(int i); -void __fastcall ChangeLightRadius(int i, int r); -void __fastcall ChangeLightXY(int i, int x, int y); -void __fastcall ChangeLightOff(int i, int x, int y); -void __fastcall ChangeLight(int i, int x, int y, int r); -void __cdecl ProcessLightList(); -void __cdecl SavePreLighting(); -void __cdecl InitVision(); -int __fastcall AddVision(int x, int y, int r, BOOL mine); -void __fastcall ChangeVisionRadius(int id, int r); -void __fastcall ChangeVisionXY(int id, int x, int y); -void __cdecl ProcessVisionList(); -void __cdecl lighting_color_cycling(); +void InitLightMax(); +void InitLighting(); +int AddLight(int x, int y, int r); +void AddUnLight(int i); +void ChangeLightRadius(int i, int r); +void ChangeLightXY(int i, int x, int y); +void ChangeLightOff(int i, int x, int y); +void ChangeLight(int i, int x, int y, int r); +void ProcessLightList(); +void SavePreLighting(); +void InitVision(); +int AddVision(int x, int y, int r, BOOL mine); +void ChangeVisionRadius(int id, int r); +void ChangeVisionXY(int id, int x, int y); +void ProcessVisionList(); +void lighting_color_cycling(); /* rdata */ diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index 05a3650a..3be16f8b 100644 --- a/Source/loadsave.cpp +++ b/Source/loadsave.cpp @@ -4,7 +4,7 @@ unsigned char *tbuff; -void __fastcall LoadGame(BOOL firstflag) +void LoadGame(BOOL firstflag) { int i, j; DWORD dwLen; @@ -175,12 +175,12 @@ void __fastcall LoadGame(BOOL firstflag) } // 5CF31D: using guessed type char setlevel; -char __cdecl BLoad() +char BLoad() { return *tbuff++; } -int __cdecl WLoad() +int WLoad() { int rv = *tbuff++ << 24; rv |= *tbuff++ << 16; @@ -190,7 +190,7 @@ int __cdecl WLoad() return rv; } -int __cdecl ILoad() +int ILoad() { int rv = *tbuff++ << 24; rv |= *tbuff++ << 16; @@ -200,7 +200,7 @@ int __cdecl ILoad() return rv; } -BOOL __cdecl OLoad() +BOOL OLoad() { if (*tbuff++ == TRUE) return TRUE; @@ -208,45 +208,45 @@ BOOL __cdecl OLoad() return FALSE; } -void __fastcall LoadPlayer(int i) +void LoadPlayer(int i) { memcpy(&plr[i], tbuff, sizeof(*plr) - (10 * sizeof(void *))); tbuff += sizeof(*plr) - (10 * sizeof(void *)); // omit last 10 pointers } -void __fastcall LoadMonster(int i) +void LoadMonster(int i) { memcpy(&monster[i], tbuff, sizeof(*monster) - (3 * sizeof(void *))); tbuff += sizeof(*monster) - (3 * sizeof(void *)); // omit last 3 pointers SyncMonsterAnim(i); } -void __fastcall LoadMissile(int i) +void LoadMissile(int i) { memcpy(&missile[i], tbuff, sizeof(*missile)); tbuff += sizeof(*missile); } -void __fastcall LoadObject(int i) +void LoadObject(int i) { memcpy(&object[i], tbuff, sizeof(*object)); tbuff += sizeof(*object); } -void __fastcall LoadItem(int i) +void LoadItem(int i) { memcpy(&item[i], tbuff, sizeof(*item)); tbuff += sizeof(*item); GetItemFrm(i); } -void __fastcall LoadPremium(int i) +void LoadPremium(int i) { memcpy(&premiumitem[i], tbuff, sizeof(*premiumitem)); tbuff += sizeof(*premiumitem); } -void __fastcall LoadQuest(int i) +void LoadQuest(int i) { memcpy(&quests[i], tbuff, sizeof(*quests)); tbuff += sizeof(*quests); @@ -257,25 +257,25 @@ void __fastcall LoadQuest(int i) DoomQuestState = WLoad(); } -void __fastcall LoadLighting(int i) +void LoadLighting(int i) { memcpy(&LightList[i], tbuff, sizeof(*LightList)); tbuff += sizeof(*LightList); } -void __fastcall LoadVision(int i) +void LoadVision(int i) { memcpy(&VisionList[i], tbuff, sizeof(*VisionList)); tbuff += sizeof(*VisionList); } -void __fastcall LoadPortal(int i) +void LoadPortal(int i) { memcpy(&portal[i], tbuff, sizeof(*portal)); tbuff += sizeof(*portal); } -void __cdecl SaveGame() +void SaveGame() { int i, j; char szName[MAX_PATH]; @@ -419,12 +419,12 @@ void __cdecl SaveGame() } // 5CF31D: using guessed type char setlevel; -void __fastcall BSave(char v) +void BSave(char v) { *tbuff++ = v; } -void __fastcall WSave(int v) +void WSave(int v) { *tbuff++ = v >> 24; *tbuff++ = v >> 16; @@ -432,7 +432,7 @@ void __fastcall WSave(int v) *tbuff++ = v; } -void __fastcall ISave(int v) +void ISave(int v) { *tbuff++ = v >> 24; *tbuff++ = v >> 16; @@ -440,7 +440,7 @@ void __fastcall ISave(int v) *tbuff++ = v; } -void __fastcall OSave(BOOL v) +void OSave(BOOL v) { if (v != FALSE) *tbuff++ = TRUE; @@ -448,43 +448,43 @@ void __fastcall OSave(BOOL v) *tbuff++ = FALSE; } -void __fastcall SavePlayer(int i) +void SavePlayer(int i) { memcpy(tbuff, &plr[i], sizeof(*plr) - (10 * sizeof(void *))); tbuff += sizeof(*plr) - (10 * sizeof(void *)); // omit last 10 pointers } -void __fastcall SaveMonster(int i) +void SaveMonster(int i) { memcpy(tbuff, &monster[i], sizeof(*monster) - (3 * sizeof(void *))); tbuff += sizeof(*monster) - (3 * sizeof(void *)); // omit last 3 pointers } -void __fastcall SaveMissile(int i) +void SaveMissile(int i) { memcpy(tbuff, &missile[i], sizeof(*missile)); tbuff += sizeof(*missile); } -void __fastcall SaveObject(int i) +void SaveObject(int i) { memcpy(tbuff, &object[i], sizeof(*object)); tbuff += sizeof(*object); } -void __fastcall SaveItem(int i) +void SaveItem(int i) { memcpy(tbuff, &item[i], sizeof(*item)); tbuff += sizeof(*item); } -void __fastcall SavePremium(int i) +void SavePremium(int i) { memcpy(tbuff, &premiumitem[i], sizeof(*premiumitem)); tbuff += sizeof(*premiumitem); } -void __fastcall SaveQuest(int i) +void SaveQuest(int i) { memcpy(tbuff, &quests[i], sizeof(*quests)); tbuff += sizeof(*quests); @@ -495,25 +495,25 @@ void __fastcall SaveQuest(int i) WSave(DoomQuestState); } -void __fastcall SaveLighting(int i) +void SaveLighting(int i) { memcpy(tbuff, &LightList[i], sizeof(*LightList)); tbuff += sizeof(*LightList); } -void __fastcall SaveVision(int i) +void SaveVision(int i) { memcpy(tbuff, &VisionList[i], sizeof(*VisionList)); tbuff += sizeof(*VisionList); } -void __fastcall SavePortal(int i) +void SavePortal(int i) { memcpy(tbuff, &portal[i], sizeof(*portal)); tbuff += sizeof(*portal); } -void __cdecl SaveLevel() +void SaveLevel() { int i, j; char szName[MAX_PATH]; @@ -606,7 +606,7 @@ void __cdecl SaveLevel() } // 5CF31D: using guessed type char setlevel; -void __cdecl LoadLevel() +void LoadLevel() { int i, j; DWORD dwLen; diff --git a/Source/loadsave.h b/Source/loadsave.h index d7b6b300..1011b14b 100644 --- a/Source/loadsave.h +++ b/Source/loadsave.h @@ -4,37 +4,37 @@ extern unsigned char *tbuff; -void __fastcall LoadGame(BOOL firstflag); -char __cdecl BLoad(); -int __cdecl WLoad(); -int __cdecl ILoad(); -BOOL __cdecl OLoad(); -void __fastcall LoadPlayer(int i); -void __fastcall LoadMonster(int i); -void __fastcall LoadMissile(int i); -void __fastcall LoadObject(int i); -void __fastcall LoadItem(int i); -void __fastcall LoadPremium(int i); -void __fastcall LoadQuest(int i); -void __fastcall LoadLighting(int i); -void __fastcall LoadVision(int i); -void __fastcall LoadPortal(int i); -void __cdecl SaveGame(); -void __fastcall BSave(char v); -void __fastcall WSave(int v); -void __fastcall ISave(int v); -void __fastcall OSave(BOOL v); -void __fastcall SavePlayer(int i); -void __fastcall SaveMonster(int i); -void __fastcall SaveMissile(int i); -void __fastcall SaveObject(int i); -void __fastcall SaveItem(int i); -void __fastcall SavePremium(int i); -void __fastcall SaveQuest(int i); -void __fastcall SaveLighting(int i); -void __fastcall SaveVision(int i); -void __fastcall SavePortal(int i); -void __cdecl SaveLevel(); -void __cdecl LoadLevel(); +void LoadGame(BOOL firstflag); +char BLoad(); +int WLoad(); +int ILoad(); +BOOL OLoad(); +void LoadPlayer(int i); +void LoadMonster(int i); +void LoadMissile(int i); +void LoadObject(int i); +void LoadItem(int i); +void LoadPremium(int i); +void LoadQuest(int i); +void LoadLighting(int i); +void LoadVision(int i); +void LoadPortal(int i); +void SaveGame(); +void BSave(char v); +void WSave(int v); +void ISave(int v); +void OSave(BOOL v); +void SavePlayer(int i); +void SaveMonster(int i); +void SaveMissile(int i); +void SaveObject(int i); +void SaveItem(int i); +void SavePremium(int i); +void SaveQuest(int i); +void SaveLighting(int i); +void SaveVision(int i); +void SavePortal(int i); +void SaveLevel(); +void LoadLevel(); #endif /* __LOADSAVE_H__ */ diff --git a/Source/logging.cpp b/Source/logging.cpp index da2f1ca0..3d3e08a3 100644 --- a/Source/logging.cpp +++ b/Source/logging.cpp @@ -26,12 +26,12 @@ log_c_init(void) SEG_ALLOCATE(SEGMENT_C_INIT) _PVFV log_c_init_funcs[] = { &log_c_init }; -void __cdecl log_init_mutex() +void log_init_mutex() { InitializeCriticalSection(&sgMemCrit); } -void __cdecl j_log_cleanup_mutex() +void j_log_cleanup_mutex() { atexit(log_cleanup_mutex); } @@ -67,7 +67,7 @@ void __cdecl log_flush(BOOLEAN force_close) LeaveCriticalSection(&sgMemCrit); } -HANDLE __cdecl log_create() +HANDLE log_create() { char *v0; // eax HANDLE v1; // ebx @@ -119,7 +119,7 @@ HANDLE __cdecl log_create() } // 4947D4: using guessed type int log_not_created; -void __fastcall log_get_version(VS_FIXEDFILEINFO *file_info) +void log_get_version(VS_FIXEDFILEINFO *file_info) { DWORD v1; // eax DWORD v2; // esi @@ -149,7 +149,7 @@ void __fastcall log_get_version(VS_FIXEDFILEINFO *file_info) } } -void log_printf(const char *pszFmt, ...) +void __cdecl log_printf(const char *pszFmt, ...) { size_t v1; // edi char *v2; // eax @@ -175,7 +175,7 @@ void log_printf(const char *pszFmt, ...) LeaveCriticalSection(&sgMemCrit); } -void __cdecl log_dump_computer_info() +void log_dump_computer_info() { char Buffer[64]; // [esp+0h] [ebp-88h] VS_FIXEDFILEINFO file_info; // [esp+40h] [ebp-48h] diff --git a/Source/logging.h b/Source/logging.h index f0f59bb1..709cc8c3 100644 --- a/Source/logging.h +++ b/Source/logging.h @@ -7,14 +7,14 @@ extern char log_buffer[388]; extern LPCVOID lpAddress; // idb extern DWORD nNumberOfBytesToWrite; // idb -void __cdecl log_init_mutex(); -void __cdecl j_log_cleanup_mutex(); +void log_init_mutex(); +void j_log_cleanup_mutex(); void __cdecl log_cleanup_mutex(void); void __cdecl log_flush(BOOLEAN force_close); -HANDLE __cdecl log_create(); // should be HANDLE -void __fastcall log_get_version(VS_FIXEDFILEINFO *file_info); -void log_printf(const char *pszFmt, ...); // LogMessage -void __cdecl log_dump_computer_info(); +HANDLE log_create(); // should be HANDLE +void log_get_version(VS_FIXEDFILEINFO *file_info); +void __cdecl log_printf(const char *pszFmt, ...); // LogMessage +void log_dump_computer_info(); /* rdata */ diff --git a/Source/mainmenu.cpp b/Source/mainmenu.cpp index 56f738fa..2a7dc414 100644 --- a/Source/mainmenu.cpp +++ b/Source/mainmenu.cpp @@ -8,7 +8,7 @@ char gszHero[16]; int menu_music_track_id = 5; -void __cdecl mainmenu_refresh_music() +void mainmenu_refresh_music() { music_start(menu_music_track_id); do { @@ -80,7 +80,7 @@ int __stdcall mainmenu_select_hero_dialog( return 1; } -void __cdecl mainmenu_loop() +void mainmenu_loop() { BOOL done; int menu; @@ -120,14 +120,14 @@ void __cdecl mainmenu_loop() } // 634980: using guessed type int gbActive; -BOOL __cdecl mainmenu_single_player() +BOOL mainmenu_single_player() { gbMaxPlayers = 1; return mainmenu_init_menu(1); } // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall mainmenu_init_menu(int type) +BOOL mainmenu_init_menu(int type) { BOOL success; @@ -143,13 +143,13 @@ BOOL __fastcall mainmenu_init_menu(int type) return success; } -BOOL __cdecl mainmenu_multi_player() +BOOL mainmenu_multi_player() { gbMaxPlayers = MAX_PLRS; return mainmenu_init_menu(3); } -void __cdecl mainmenu_play_intro() +void mainmenu_play_intro() { music_stop(); play_movie("gendata\\diablo1.smk", 1); diff --git a/Source/mainmenu.h b/Source/mainmenu.h index 8d0832d7..8e7f9257 100644 --- a/Source/mainmenu.h +++ b/Source/mainmenu.h @@ -4,7 +4,7 @@ extern char gszHero[16]; -void __cdecl mainmenu_refresh_music(); +void mainmenu_refresh_music(); void __stdcall mainmenu_create_hero(char *name_1, char *name_2); int __stdcall mainmenu_select_hero_dialog( const _SNETPROGRAMDATA *client_info, @@ -15,11 +15,11 @@ int __stdcall mainmenu_select_hero_dialog( char *cname, DWORD clen, // character name will be copied here char *cdesc, DWORD cdlen, // character "description" will be copied here (used to advertise games) BOOL *multi); // new character? - unsure about this -void __cdecl mainmenu_loop(); -BOOL __cdecl mainmenu_single_player(); -BOOL __fastcall mainmenu_init_menu(int a1); -BOOL __cdecl mainmenu_multi_player(); -void __cdecl mainmenu_play_intro(); +void mainmenu_loop(); +BOOL mainmenu_single_player(); +BOOL mainmenu_init_menu(int a1); +BOOL mainmenu_multi_player(); +void mainmenu_play_intro(); /* rdata */ diff --git a/Source/minitext.cpp b/Source/minitext.cpp index a8b9701d..93a51955 100644 --- a/Source/minitext.cpp +++ b/Source/minitext.cpp @@ -39,7 +39,7 @@ const unsigned char mfontkern[56] = { int qscroll_spd_tbl[9] = { 2, 4, 6, 8, 0, -1, -2, -3, -4 }; -void __cdecl FreeQuestText() +void FreeQuestText() { void *ptr; @@ -51,7 +51,7 @@ void __cdecl FreeQuestText() mem_free_dbg(ptr); } -void __cdecl InitQuestText() +void InitQuestText() { unsigned char *v0; // eax @@ -62,7 +62,7 @@ void __cdecl InitQuestText() } // 646D00: using guessed type char qtextflag; -void __fastcall InitQTextMsg(int m) +void InitQTextMsg(int m) { if (alltext[m].scrlltxt) { questlog = 0; @@ -82,7 +82,7 @@ void __fastcall InitQTextMsg(int m) // 646D08: using guessed type int sgLastScroll; // 69BD04: using guessed type int questlog; -void __cdecl DrawQTextBack() +void DrawQTextBack() { CelDecodeOnly(88, 487, (BYTE *)pTextBoxCels, 1, 591); @@ -93,7 +93,7 @@ void __cdecl DrawQTextBack() #include "asm_trans_rect.inc" } -void __fastcall PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel) +void PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel) { BYTE *dst, *pStart, *pEnd, *end; @@ -210,7 +210,7 @@ void __fastcall PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel) #endif } -void __cdecl DrawQText() +void DrawQText() { char *v0; // edi signed int v1; // edx diff --git a/Source/minitext.h b/Source/minitext.h index fa27ae73..0e149981 100644 --- a/Source/minitext.h +++ b/Source/minitext.h @@ -10,12 +10,12 @@ extern int scrolltexty; // weak extern void *pMedTextCels; extern void *pTextBoxCels; -void __cdecl FreeQuestText(); -void __cdecl InitQuestText(); -void __fastcall InitQTextMsg(int m); -void __cdecl DrawQTextBack(); -void __fastcall PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel); -void __cdecl DrawQText(); +void FreeQuestText(); +void InitQuestText(); +void InitQTextMsg(int m); +void DrawQTextBack(); +void PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel); +void DrawQText(); /* rdata */ diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 8c575d01..ce4052b4 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -139,7 +139,7 @@ MisFileData misfiledata[47] = { int XDirAdd[8] = { 1, 0, -1, -1, -1, 0, 1, 1 }; int YDirAdd[8] = { 1, 1, 1, 0, -1, -1, -1, 0 }; -void __fastcall GetDamageAmt(int i, int *mind, int *maxd) +void GetDamageAmt(int i, int *mind, int *maxd) { int v3; // eax int v4; // esi @@ -412,7 +412,7 @@ void __fastcall GetDamageAmt(int i, int *mind, int *maxd) } } -BOOL __fastcall CheckBlock(int fx, int fy, int tx, int ty) +BOOL CheckBlock(int fx, int fy, int tx, int ty) { int pn; BOOL coll; @@ -429,7 +429,7 @@ BOOL __fastcall CheckBlock(int fx, int fy, int tx, int ty) return coll; } -int __fastcall FindClosest(int sx, int sy, int rad) +int FindClosest(int sx, int sy, int rad) { int j, i, mid, tx, ty, cr; int CrawlNum[19] = { 0, 3, 12, 45, 94, 159, 240, 337, 450, 579, 724, 885, 1062, 1255, 1464, 1689, 1930, 2187, 2460 }; @@ -453,7 +453,7 @@ int __fastcall FindClosest(int sx, int sy, int rad) return -1; } -int __fastcall GetSpellLevel(int id, int sn) +int GetSpellLevel(int id, int sn) { int result; @@ -468,7 +468,7 @@ int __fastcall GetSpellLevel(int id, int sn) return result; } -int __fastcall GetDirection8(int x1, int y1, int x2, int y2) +int GetDirection8(int x1, int y1, int x2, int y2) { unsigned char Dirs[16][16] = { { 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -513,7 +513,7 @@ int __fastcall GetDirection8(int x1, int y1, int x2, int y2) return md; } -int __fastcall GetDirection16(int x1, int y1, int x2, int y2) +int GetDirection16(int x1, int y1, int x2, int y2) { BYTE Dirs[16][16] = { { 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -559,7 +559,7 @@ int __fastcall GetDirection16(int x1, int y1, int x2, int y2) return md; } -void __fastcall DeleteMissile(int mi, int i) +void DeleteMissile(int mi, int i) { int src; @@ -575,7 +575,7 @@ void __fastcall DeleteMissile(int mi, int i) missileactive[i] = missileactive[nummissiles]; } -void __fastcall GetMissileVel(int i, int sx, int sy, int dx, int dy, int v) +void GetMissileVel(int i, int sx, int sy, int dx, int dy, int v) { double dxp, dyp, dr; @@ -591,7 +591,7 @@ void __fastcall GetMissileVel(int i, int sx, int sy, int dx, int dy, int v) } } -void __fastcall PutMissile(int i) +void PutMissile(int i) { int x, y; @@ -611,7 +611,7 @@ void __fastcall PutMissile(int i) } // 64CCD4: using guessed type int MissilePreFlag; -void __fastcall GetMissilePos(int i) +void GetMissilePos(int i) { int mx, my, dx, dy, lx, ly; @@ -640,7 +640,7 @@ void __fastcall GetMissilePos(int i) ChangeLightOff(missile[i]._mlid, lx - (dx << 3), ly - (dy << 3)); } -void __fastcall MoveMissilePos(int i) +void MoveMissilePos(int i) { int dx, dy; @@ -686,7 +686,7 @@ void __fastcall MoveMissilePos(int i) } } -BOOL __fastcall MonsterTrapHit(int m, int mindam, int maxdam, int dist, int t, int shift) +BOOL MonsterTrapHit(int m, int mindam, int maxdam, int dist, int t, int shift) { int v6; // esi int v8; // ecx @@ -771,7 +771,7 @@ BOOL __fastcall MonsterTrapHit(int m, int mindam, int maxdam, int dist, int t, i return 1; } -BOOLEAN __fastcall MonsterMHit(int pnum, int m, int mindam, int maxdam, int dist, int t, int shift) +BOOLEAN MonsterMHit(int pnum, int m, int mindam, int maxdam, int dist, int t, int shift) { int v7; // edi BOOLEAN v8; // zf @@ -915,7 +915,7 @@ BOOLEAN __fastcall MonsterMHit(int pnum, int m, int mindam, int maxdam, int dist return 1; } -BOOLEAN __fastcall PlayerMHit(int pnum, int m, int dist, int mind, int maxd, int mtype, int shift, int earflag) +BOOLEAN PlayerMHit(int pnum, int m, int dist, int mind, int maxd, int mtype, int shift, int earflag) { int v8; // ebx int v9; // esi @@ -1107,7 +1107,7 @@ LABEL_50: return 0; } -BOOLEAN __fastcall Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int mtype, int shift) +BOOLEAN Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int mtype, int shift) { int v7; // edi unsigned char v8; // al @@ -1232,7 +1232,7 @@ LABEL_14: return 0; } -void __fastcall CheckMissileCol(int i, int mindam, int maxdam, BOOLEAN shift, int mx, int my, int nodel) +void CheckMissileCol(int i, int mindam, int maxdam, BOOLEAN shift, int mx, int my, int nodel) { int v7; // ebx int v8; // esi @@ -1395,7 +1395,7 @@ LABEL_39: } } -void __fastcall SetMissAnim(int mi, int animtype) +void SetMissAnim(int mi, int animtype) { int dir = missile[mi]._mimfnum; @@ -1410,13 +1410,13 @@ void __fastcall SetMissAnim(int mi, int animtype) missile[mi]._miAnimFrame = 1; } -void __fastcall SetMissDir(int mi, int dir) +void SetMissDir(int mi, int dir) { missile[mi]._mimfnum = dir; SetMissAnim(mi, missile[mi]._miAnimType); } -void __fastcall LoadMissileGFX(BYTE mi) +void LoadMissileGFX(BYTE mi) { char pszName[256]; int i; @@ -1444,7 +1444,7 @@ void __fastcall LoadMissileGFX(BYTE mi) } } -void __cdecl InitMissileGFX() +void InitMissileGFX() { int mi; @@ -1454,7 +1454,7 @@ void __cdecl InitMissileGFX() } } -void __fastcall FreeMissileGFX(int mi) +void FreeMissileGFX(int mi) { int i; DWORD *pFrameTable; @@ -1477,7 +1477,7 @@ void __fastcall FreeMissileGFX(int mi) } } -void __cdecl FreeMissiles() +void FreeMissiles() { int mi; @@ -1487,7 +1487,7 @@ void __cdecl FreeMissiles() } } -void __cdecl FreeMissiles2() +void FreeMissiles2() { int mi; @@ -1497,7 +1497,7 @@ void __cdecl FreeMissiles2() } } -void __cdecl InitMissiles() +void InitMissiles() { int mi, src, i, j; @@ -1531,7 +1531,7 @@ void __cdecl InitMissiles() } // 64CCD8: using guessed type int numchains; -void __fastcall AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { if (sx == dx && sy == dy) { dx += XDirAdd[midir]; @@ -1554,7 +1554,7 @@ void __fastcall AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, cha missile[mi]._mlid = AddLight(sx, sy, 5); } -void __fastcall AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int av; @@ -1579,7 +1579,7 @@ void __fastcall AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char missile[mi]._mirange = 256; } -void __fastcall GetVileMissPos(int mi, int dx, int dy) +void GetVileMissPos(int mi, int dx, int dy) { int xx, yy, k, j, i; @@ -1600,7 +1600,7 @@ void __fastcall GetVileMissPos(int mi, int dx, int dy) missile[mi]._miy = dy; } -void __fastcall AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int pn, r1, r2, nTries; @@ -1640,7 +1640,7 @@ void __fastcall AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir } // 5CF31D: using guessed type char setlevel; -void __fastcall AddFirebolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam) +void AddFirebolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam) { int i, mx, sp; @@ -1674,7 +1674,7 @@ void __fastcall AddFirebolt(int mi, int sx, int sy, int dx, int dy, int midir, c missile[mi]._mlid = AddLight(sx, sy, 8); } -void __fastcall AddMagmaball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddMagmaball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { GetMissileVel(mi, sx, sy, dx, dy, 16); missile[mi]._mitxoff += 3 * missile[mi]._mixvel; @@ -1686,7 +1686,7 @@ void __fastcall AddMagmaball(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._mlid = AddLight(sx, sy, 8); } -void __fastcall miss_null_33(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_33(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { GetMissileVel(mi, sx, sy, dx, dy, 16); missile[mi]._mirange = 256; @@ -1695,7 +1695,7 @@ void __fastcall miss_null_33(int mi, int sx, int sy, int dx, int dy, int midir, PutMissile(mi); } -void __fastcall AddTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i, pn, k, j, tx, ty; int CrawlNum[6] = { 0, 3, 12, 45, 94, 159 }; @@ -1728,7 +1728,7 @@ void __fastcall AddTeleport(int mi, int sx, int sy, int dx, int dy, int midir, c } } -void __fastcall AddLightball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddLightball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { GetMissileVel(mi, sx, sy, dx, dy, 16); missile[mi]._midam = dam; @@ -1743,7 +1743,7 @@ void __fastcall AddLightball(int mi, int sx, int sy, int dx, int dy, int midir, } } -void __fastcall AddFirewall(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFirewall(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -1758,7 +1758,7 @@ void __fastcall AddFirewall(int mi, int sx, int sy, int dx, int dy, int midir, c missile[mi]._miVar2 = 0; } -void __fastcall AddFireball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFireball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -1789,7 +1789,7 @@ void __fastcall AddFireball(int mi, int sx, int sy, int dx, int dy, int midir, c missile[mi]._mlid = AddLight(sx, sy, 8); } -void __fastcall AddLightctrl(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddLightctrl(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { if (!dam && !mienemy) UseMana(id, 3); @@ -1800,7 +1800,7 @@ void __fastcall AddLightctrl(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._mirange = 256; } -void __fastcall AddLightning(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddLightning(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._misx = dx; missile[mi]._misy = dy; @@ -1823,7 +1823,7 @@ void __fastcall AddLightning(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._mlid = AddLight(missile[mi]._mix, missile[mi]._miy, 4); } -void __fastcall AddMisexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddMisexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { CMonster *mon; @@ -1853,7 +1853,7 @@ void __fastcall AddMisexp(int mi, int sx, int sy, int dx, int dy, int midir, cha missile[mi]._miVar1 = 0; } -void __fastcall AddWeapexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddWeapexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._mix = sx; missile[mi]._miy = sy; @@ -1871,7 +1871,7 @@ void __fastcall AddWeapexp(int mi, int sx, int sy, int dx, int dy, int midir, ch missile[mi]._mirange = missile[mi]._miAnimLen - 1; } -BOOL __fastcall CheckIfTrig(int x, int y) +BOOL CheckIfTrig(int x, int y) { int i; @@ -1882,7 +1882,7 @@ BOOL __fastcall CheckIfTrig(int x, int y) return FALSE; } -void __fastcall AddTown(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddTown(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i, j, k, mx, tx, ty; int CrawlNum[6] = { 0, 3, 12, 45, 94, 159 }; @@ -1938,7 +1938,7 @@ void __fastcall AddTown(int mi, int sx, int sy, int dx, int dy, int midir, char } // 5CF31D: using guessed type char setlevel; -void __fastcall AddFlash(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFlash(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -1962,7 +1962,7 @@ void __fastcall AddFlash(int mi, int sx, int sy, int dx, int dy, int midir, char missile[mi]._mirange = 19; } -void __fastcall AddFlash2(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFlash2(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -1984,7 +1984,7 @@ void __fastcall AddFlash2(int mi, int sx, int sy, int dx, int dy, int midir, cha missile[mi]._mirange = 19; } -void __fastcall AddManashield(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddManashield(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._mirange = 48 * plr[id]._pLevel; missile[mi]._miVar1 = plr[id]._pHitPoints; @@ -1997,7 +1997,7 @@ void __fastcall AddManashield(int mi, int sx, int sy, int dx, int dy, int midir, plr[id].pManaShield = TRUE; } -void __fastcall AddFiremove(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFiremove(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._midam = random(59, 10) + plr[id]._pLevel + 1; GetMissileVel(mi, sx, sy, dx, dy, 16); @@ -2009,7 +2009,7 @@ void __fastcall AddFiremove(int mi, int sx, int sy, int dx, int dy, int midir, c missile[mi]._miyoff -= 32; } -void __fastcall AddGuardian(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddGuardian(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i, pn, k, j, tx, ty; int CrawlNum[6] = { 0, 3, 12, 45, 94, 159 }; @@ -2065,7 +2065,7 @@ void __fastcall AddGuardian(int mi, int sx, int sy, int dx, int dy, int midir, c } } -void __fastcall AddChain(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddChain(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miVar1 = dx; missile[mi]._miVar2 = dy; @@ -2073,7 +2073,7 @@ void __fastcall AddChain(int mi, int sx, int sy, int dx, int dy, int midir, char UseMana(id, 14); } -void __fastcall miss_null_11(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_11(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { SetMissDir(mi, dx); missile[mi]._midam = 0; @@ -2081,7 +2081,7 @@ void __fastcall miss_null_11(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._mirange = 250; } -void __fastcall miss_null_12(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_12(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { if (dx > 3) dx = 2; @@ -2091,7 +2091,7 @@ void __fastcall miss_null_12(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._mirange = 250; } -void __fastcall miss_null_13(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_13(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { if (dx > 3) dx = 2; @@ -2101,7 +2101,7 @@ void __fastcall miss_null_13(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._mirange = missile[mi]._miAnimLen; } -void __fastcall AddRhino(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddRhino(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { AnimStruct *anim; @@ -2136,7 +2136,7 @@ void __fastcall AddRhino(int mi, int sx, int sy, int dx, int dy, int midir, char PutMissile(mi); } -void __fastcall miss_null_32(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_32(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { AnimStruct *anim; @@ -2160,7 +2160,7 @@ void __fastcall miss_null_32(int mi, int sx, int sy, int dx, int dy, int midir, PutMissile(mi); } -void __fastcall AddFlare(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFlare(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { if (sx == dx && sy == dy) { dx += XDirAdd[midir]; @@ -2192,7 +2192,7 @@ void __fastcall AddFlare(int mi, int sx, int sy, int dx, int dy, int midir, char } } -void __fastcall AddAcid(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddAcid(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { GetMissileVel(mi, sx, sy, dx, dy, 16); SetMissDir(mi, GetDirection16(sx, sy, dx, dy)); @@ -2203,7 +2203,7 @@ void __fastcall AddAcid(int mi, int sx, int sy, int dx, int dy, int midir, char PutMissile(mi); } -void __fastcall miss_null_1D(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_1D(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._midam = dam; missile[mi]._mirange = 50; @@ -2213,7 +2213,7 @@ void __fastcall miss_null_1D(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._miVar2 = 0; } -void __fastcall AddAcidpud(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddAcidpud(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int monst; @@ -2227,7 +2227,7 @@ void __fastcall AddAcidpud(int mi, int sx, int sy, int dx, int dy, int midir, ch missile[mi]._miPreFlag = TRUE; } -void __fastcall AddStone(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddStone(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i, j, k, l, tx, ty, mid; int CrawlNum[6] = { 0, 3, 12, 45, 94, 159 }; @@ -2275,7 +2275,7 @@ void __fastcall AddStone(int mi, int sx, int sy, int dx, int dy, int midir, char } } -void __fastcall AddGolem(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddGolem(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; int mx; @@ -2299,7 +2299,7 @@ void __fastcall AddGolem(int mi, int sx, int sy, int dx, int dy, int midir, char UseMana(id, 21); } -void __fastcall AddEtherealize(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddEtherealize(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -2314,12 +2314,12 @@ void __fastcall AddEtherealize(int mi, int sx, int sy, int dx, int dy, int midir UseMana(id, 25); } -void __fastcall miss_null_1F(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_1F(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miDelFlag = TRUE; } -void __fastcall miss_null_23(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void miss_null_23(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._midam = dam; missile[mi]._mix = sx; @@ -2335,7 +2335,7 @@ void __fastcall miss_null_23(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._mirange = missile[mi]._miAnimLen; } -void __fastcall AddBoom(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddBoom(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._mix = dx; missile[mi]._miy = dy; @@ -2348,7 +2348,7 @@ void __fastcall AddBoom(int mi, int sx, int sy, int dx, int dy, int midir, char missile[mi]._miVar1 = 0; } -void __fastcall AddHeal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddHeal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; int HealAmount; @@ -2380,7 +2380,7 @@ void __fastcall AddHeal(int mi, int sx, int sy, int dx, int dy, int midir, char drawhpflag = TRUE; } -void __fastcall AddHealOther(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddHealOther(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miDelFlag = TRUE; UseMana(id, 34); @@ -2388,7 +2388,7 @@ void __fastcall AddHealOther(int mi, int sx, int sy, int dx, int dy, int midir, SetCursor_(CURSOR_HEALOTHER); } -void __fastcall AddElement(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddElement(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -2413,7 +2413,7 @@ void __fastcall AddElement(int mi, int sx, int sy, int dx, int dy, int midir, ch UseMana(id, 29); } -void __fastcall AddIdentify(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddIdentify(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miDelFlag = TRUE; UseMana(id, 5); @@ -2427,7 +2427,7 @@ void __fastcall AddIdentify(int mi, int sx, int sy, int dx, int dy, int midir, c } // 4B8968: using guessed type int sbookflag; -void __fastcall AddFirewallC(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFirewallC(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i, j, k, tx, ty, pn; int CrawlNum[6] = { 0, 3, 12, 45, 94, 159 }; @@ -2467,7 +2467,7 @@ void __fastcall AddFirewallC(int mi, int sx, int sy, int dx, int dy, int midir, } } -void __fastcall AddInfra(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddInfra(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -2480,7 +2480,7 @@ void __fastcall AddInfra(int mi, int sx, int sy, int dx, int dy, int midir, char UseMana(id, 9); } -void __fastcall AddWave(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddWave(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miVar1 = dx; missile[mi]._miVar2 = dy; @@ -2491,7 +2491,7 @@ void __fastcall AddWave(int mi, int sx, int sy, int dx, int dy, int midir, char UseMana(id, 15); } -void __fastcall AddNova(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddNova(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int k; @@ -2510,7 +2510,7 @@ void __fastcall AddNova(int mi, int sx, int sy, int dx, int dy, int midir, char missile[mi]._mirange = 1; } -void __fastcall AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miDelFlag = TRUE; UseMana(id, 26); @@ -2524,7 +2524,7 @@ void __fastcall AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, cha } // 4B8968: using guessed type int sbookflag; -void __fastcall AddRecharge(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddRecharge(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miDelFlag = TRUE; UseMana(id, 27); @@ -2538,7 +2538,7 @@ void __fastcall AddRecharge(int mi, int sx, int sy, int dx, int dy, int midir, c } // 4B8968: using guessed type int sbookflag; -void __fastcall AddDisarm(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddDisarm(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miDelFlag = TRUE; UseMana(id, 28); @@ -2546,7 +2546,7 @@ void __fastcall AddDisarm(int mi, int sx, int sy, int dx, int dy, int midir, cha SetCursor_(CURSOR_DISARM); } -void __fastcall AddApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -2572,7 +2572,7 @@ void __fastcall AddApoca(int mi, int sx, int sy, int dx, int dy, int midir, char UseMana(id, 24); } -void __fastcall AddFlame(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFlame(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int i; @@ -2595,7 +2595,7 @@ void __fastcall AddFlame(int mi, int sx, int sy, int dx, int dy, int midir, char } } -void __fastcall AddFlamec(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddFlamec(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { if (sx == dx && sy == dy) { dx += XDirAdd[midir]; @@ -2610,7 +2610,7 @@ void __fastcall AddFlamec(int mi, int sx, int sy, int dx, int dy, int midir, cha missile[mi]._mirange = 256; } -void __fastcall AddCbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam) +void AddCbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam) { int v9; // esi int v10; // eax @@ -2648,7 +2648,7 @@ void __fastcall AddCbolt(int mi, int sx, int sy, int dx, int dy, int midir, char missile[v9]._mirange = 256; } -void __fastcall AddHbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam) +void AddHbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam) { int sp; @@ -2674,7 +2674,7 @@ void __fastcall AddHbolt(int mi, int sx, int sy, int dx, int dy, int midir, char UseMana(id, 31); } -void __fastcall AddResurrect(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddResurrect(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { UseMana(id, 32); if (id == myplr) @@ -2682,7 +2682,7 @@ void __fastcall AddResurrect(int mi, int sx, int sy, int dx, int dy, int midir, missile[mi]._miDelFlag = TRUE; } -void __fastcall AddResurrectBeam(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddResurrectBeam(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._mix = dx; missile[mi]._miy = dy; @@ -2693,7 +2693,7 @@ void __fastcall AddResurrectBeam(int mi, int sx, int sy, int dx, int dy, int mid missile[mi]._mirange = misfiledata[36].mAnimLen[0]; } -void __fastcall AddTelekinesis(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddTelekinesis(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._miDelFlag = TRUE; UseMana(id, 33); @@ -2701,7 +2701,7 @@ void __fastcall AddTelekinesis(int mi, int sx, int sy, int dx, int dy, int midir SetCursor_(CURSOR_TELEKINESIS); } -void __fastcall AddBoneSpirit(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddBoneSpirit(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { if (sx == dx && sy == dy) { dx = XDirAdd[midir] + dx; @@ -2727,7 +2727,7 @@ void __fastcall AddBoneSpirit(int mi, int sx, int sy, int dx, int dy, int midir, } } -void __fastcall AddRportal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddRportal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { missile[mi]._mix = sx; missile[mi]._miy = sy; @@ -2739,7 +2739,7 @@ void __fastcall AddRportal(int mi, int sx, int sy, int dx, int dy, int midir, ch PutMissile(mi); } -void __fastcall AddDiabApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) +void AddDiabApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) { int pnum; @@ -2754,7 +2754,7 @@ void __fastcall AddDiabApoca(int mi, int sx, int sy, int dx, int dy, int midir, } // 679660: using guessed type char gbMaxPlayers; -int __fastcall AddMissile(int sx, int sy, int dx, int dy, int midir, int mitype, char micaster, int id, int midam, int spllvl) +int AddMissile(int sx, int sy, int dx, int dy, int midir, int mitype, char micaster, int id, int midam, int spllvl) { int i, mi; @@ -2819,7 +2819,7 @@ int __fastcall AddMissile(int sx, int sy, int dx, int dy, int midir, int mitype, return mi; } -int __fastcall Sentfire(int i, int sx, int sy) +int Sentfire(int i, int sx, int sy) { int ex, dir; @@ -2838,12 +2838,12 @@ int __fastcall Sentfire(int i, int sx, int sy) return ex; } -void __fastcall MI_Dummy(int i) +void MI_Dummy(int i) { return; } -void __fastcall MI_Golem(int i) +void MI_Golem(int i) { int CrawlNum[6] = { 0, 3, 12, 45, 94, 159 }; int tx, ty, dp, l, m, src, k, tid; @@ -2873,12 +2873,12 @@ void __fastcall MI_Golem(int i) missile[i]._miDelFlag = TRUE; } -void __fastcall MI_SetManashield(int i) +void MI_SetManashield(int i) { ManashieldFlag = 1; } -void __fastcall MI_LArrow(int i) +void MI_LArrow(int i) { int p, mind, maxd, rst; @@ -2960,7 +2960,7 @@ void __fastcall MI_LArrow(int i) PutMissile(i); } -void __fastcall MI_Arrow(int i) +void MI_Arrow(int i) { int p, mind, maxd; @@ -2989,7 +2989,7 @@ void __fastcall MI_Arrow(int i) PutMissile(i); } -void __fastcall MI_Firebolt(int i) +void MI_Firebolt(int i) { int v1; // edi int v2; // esi @@ -3144,7 +3144,7 @@ LABEL_39: PutMissile(v1); } -void __fastcall MI_Lightball(int i) +void MI_Lightball(int i) { int tx, ty, j, oi; char obj; @@ -3174,7 +3174,7 @@ void __fastcall MI_Lightball(int i) PutMissile(i); } -void __fastcall mi_null_33(int i) +void mi_null_33(int i) { missile[i]._mirange--; missile[i]._mitxoff += missile[i]._mixvel; @@ -3186,7 +3186,7 @@ void __fastcall mi_null_33(int i) PutMissile(i); } -void __fastcall MI_Acidpud(int i) +void MI_Acidpud(int i) { int range; @@ -3205,7 +3205,7 @@ void __fastcall MI_Acidpud(int i) PutMissile(i); } -void __fastcall MI_Firewall(int i) +void MI_Firewall(int i) { int ExpLight[14] = { 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 12 }; @@ -3233,7 +3233,7 @@ void __fastcall MI_Firewall(int i) PutMissile(i); } -void __fastcall MI_Fireball(int i) +void MI_Fireball(int i) { int dam, id, px, py, mx, my; @@ -3311,7 +3311,7 @@ void __fastcall MI_Fireball(int i) PutMissile(i); } -void __fastcall MI_Lightctrl(int i) +void MI_Lightctrl(int i) { int v1; // esi int v2; // eax @@ -3389,7 +3389,7 @@ LABEL_27: missile[v1]._miDelFlag = TRUE; } -void __fastcall MI_Lightning(int i) +void MI_Lightning(int i) { int j; @@ -3406,7 +3406,7 @@ void __fastcall MI_Lightning(int i) PutMissile(i); } -void __fastcall MI_Town(int i) +void MI_Town(int i) { int ExpLight[17] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15 }; int p; @@ -3439,7 +3439,7 @@ void __fastcall MI_Town(int i) PutMissile(i); } -void __fastcall MI_Flash(int i) +void MI_Flash(int i) { if (!missile[i]._micaster) { if (missile[i]._misource != -1) @@ -3462,7 +3462,7 @@ void __fastcall MI_Flash(int i) PutMissile(i); } -void __fastcall MI_Flash2(int i) +void MI_Flash2(int i) { if (!missile[i]._micaster) { if (missile[i]._misource != -1) @@ -3482,7 +3482,7 @@ void __fastcall MI_Flash2(int i) PutMissile(i); } -void __fastcall MI_Manashield(int i) +void MI_Manashield(int i) { int v1; // edi int v2; // esi @@ -3591,7 +3591,7 @@ LABEL_33: PutMissile(ia); } -void __fastcall MI_Etherealize(int i) +void MI_Etherealize(int i) { int src; @@ -3623,7 +3623,7 @@ void __fastcall MI_Etherealize(int i) PutMissile(i); } -void __fastcall MI_Firemove(int i) +void MI_Firemove(int i) { int j; int ExpLight[14] = { 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 12 }; @@ -3665,7 +3665,7 @@ void __fastcall MI_Firemove(int i) PutMissile(i); } -void __fastcall MI_Guardian(int i) +void MI_Guardian(int i) { int v1; // esi int v2; // eax @@ -3756,7 +3756,7 @@ void __fastcall MI_Guardian(int i) PutMissile(ia); } -void __fastcall MI_Chain(int i) +void MI_Chain(int i) { int sx, sy, id, l, n, m, k, rad, tx, ty, dir; int CrawlNum[19] = { 0, 3, 12, 45, 94, 159, 240, 337, 450, 579, 724, 885, 1062, 1255, 1464, 1689, 1930, 2187, 2460 }; @@ -3787,7 +3787,7 @@ void __fastcall MI_Chain(int i) missile[i]._miDelFlag = TRUE; } -void __fastcall mi_null_11(int i) +void mi_null_11(int i) { missile[i]._mirange--; if (!missile[i]._mirange) @@ -3797,7 +3797,7 @@ void __fastcall mi_null_11(int i) PutMissile(i); } -void __fastcall MI_Weapexp(int i) +void MI_Weapexp(int i) { int id, mind, maxd; int ExpLight[10] = { 9, 10, 11, 12, 11, 10, 8, 6, 4, 2 }; @@ -3829,7 +3829,7 @@ void __fastcall MI_Weapexp(int i) } } -void __fastcall MI_Misexp(int i) +void MI_Misexp(int i) { int ExpLight[10] = { 9, 10, 11, 12, 11, 10, 8, 6, 4, 2 }; @@ -3847,7 +3847,7 @@ void __fastcall MI_Misexp(int i) } } -void __fastcall MI_Acidsplat(int i) +void MI_Acidsplat(int i) { int monst, dam; @@ -3867,7 +3867,7 @@ void __fastcall MI_Acidsplat(int i) } } -void __fastcall MI_Teleport(int i) +void MI_Teleport(int i) { int id; @@ -3898,7 +3898,7 @@ void __fastcall MI_Teleport(int i) } } -void __fastcall MI_Stone(int i) +void MI_Stone(int i) { int m; @@ -3925,7 +3925,7 @@ void __fastcall MI_Stone(int i) } } -void __fastcall MI_Boom(int i) +void MI_Boom(int i) { missile[i]._mirange--; if (!missile[i]._miVar1) @@ -3937,7 +3937,7 @@ void __fastcall MI_Boom(int i) PutMissile(i); } -void __fastcall MI_Rhino(int i) +void MI_Rhino(int i) { int mix, miy, mix2, miy2, omx, omy, monst; @@ -3983,7 +3983,7 @@ void __fastcall MI_Rhino(int i) PutMissile(i); } -void __fastcall mi_null_32(int i) +void mi_null_32(int i) { int src, enemy, ax, ay, bx, by, cx, cy, j; @@ -4025,7 +4025,7 @@ void __fastcall mi_null_32(int i) PutMissile(i); } -void __fastcall MI_FirewallC(int i) +void MI_FirewallC(int i) { int tx, ty, id; @@ -4055,7 +4055,7 @@ void __fastcall MI_FirewallC(int i) } } -void __fastcall MI_Infra(int i) +void MI_Infra(int i) { missile[i]._mirange--; plr[missile[i]._misource]._pInfraFlag = TRUE; @@ -4065,7 +4065,7 @@ void __fastcall MI_Infra(int i) } } -void __fastcall MI_Apoca(int i) +void MI_Apoca(int i) { int j, k, id; BOOL exit; @@ -4092,7 +4092,7 @@ void __fastcall MI_Apoca(int i) } } -void __fastcall MI_Wave(int i) +void MI_Wave(int i) { int v1; // esi int v2; // ebx @@ -4173,7 +4173,7 @@ void __fastcall MI_Wave(int i) missile[v1]._miDelFlag = TRUE; } -void __fastcall MI_Nova(int i) +void MI_Nova(int i) { int k, id, sx, sy, dir, en, sx1, sy1, dam; @@ -4205,12 +4205,12 @@ void __fastcall MI_Nova(int i) missile[i]._miDelFlag = TRUE; } -void __fastcall MI_Blodboil(int i) +void MI_Blodboil(int i) { missile[i]._miDelFlag = TRUE; } -void __fastcall MI_Flame(int i) +void MI_Flame(int i) { int k; @@ -4236,7 +4236,7 @@ void __fastcall MI_Flame(int i) PutMissile(i); } -void __fastcall MI_Flamec(int i) +void MI_Flamec(int i) { int id, src; @@ -4270,7 +4270,7 @@ void __fastcall MI_Flamec(int i) missile[i]._miDelFlag = TRUE; } -void __fastcall MI_Cbolt(int i) +void MI_Cbolt(int i) { int md; int bpath[16] = { -1, 0, 1, -1, 0, 1, -1, -1, 0, 0, 1, 1, 0, 1, -1, 0 }; @@ -4307,7 +4307,7 @@ void __fastcall MI_Cbolt(int i) PutMissile(i); } -void __fastcall MI_Hbolt(int i) +void MI_Hbolt(int i) { int dam; @@ -4344,7 +4344,7 @@ void __fastcall MI_Hbolt(int i) PutMissile(i); } -void __fastcall MI_Element(int i) +void MI_Element(int i) { int mid, sd, dam, cx, cy, px, py, id; @@ -4415,7 +4415,7 @@ void __fastcall MI_Element(int i) PutMissile(i); } -void __fastcall MI_Bonespirit(int i) +void MI_Bonespirit(int i) { int v1; // ebx int v2; // esi @@ -4495,7 +4495,7 @@ void __fastcall MI_Bonespirit(int i) PutMissile(v5); } -void __fastcall MI_ResurrectBeam(int i) +void MI_ResurrectBeam(int i) { missile[i]._mirange--; if (missile[i]._mirange == 0) @@ -4503,7 +4503,7 @@ void __fastcall MI_ResurrectBeam(int i) PutMissile(i); } -void __fastcall MI_Rportal(int i) +void MI_Rportal(int i) { int ExpLight[17] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15 }; @@ -4525,7 +4525,7 @@ void __fastcall MI_Rportal(int i) PutMissile(i); } -void __cdecl ProcessMissiles() +void ProcessMissiles() { int i, mi; @@ -4583,7 +4583,7 @@ void __cdecl ProcessMissiles() } // 64CCD4: using guessed type int MissilePreFlag; -void __cdecl missiles_process_charge() +void missiles_process_charge() { CMonster *mon; AnimStruct *anim; @@ -4609,7 +4609,7 @@ void __cdecl missiles_process_charge() } } -void __fastcall ClearMissileSpot(int mi) +void ClearMissileSpot(int mi) { dFlags[missile[mi]._mix][missile[mi]._miy] &= ~DFLAG_MISSILE; dMissile[missile[mi]._mix][missile[mi]._miy] = 0; diff --git a/Source/missiles.h b/Source/missiles.h index af9b9365..d49e82f0 100644 --- a/Source/missiles.h +++ b/Source/missiles.h @@ -11,139 +11,139 @@ extern ChainStruct chain[MAXMISSILES]; extern int MissilePreFlag; // weak extern int numchains; // weak -void __fastcall GetDamageAmt(int i, int *mind, int *maxd); -BOOL __fastcall CheckBlock(int fx, int fy, int tx, int ty); -int __fastcall FindClosest(int sx, int sy, int rad); -int __fastcall GetSpellLevel(int id, int sn); -int __fastcall GetDirection8(int x1, int y1, int x2, int y2); -int __fastcall GetDirection16(int x1, int y1, int x2, int y2); -void __fastcall DeleteMissile(int mi, int i); -void __fastcall GetMissileVel(int i, int sx, int sy, int dx, int dy, int v); -void __fastcall PutMissile(int i); -void __fastcall GetMissilePos(int i); -void __fastcall MoveMissilePos(int i); -BOOL __fastcall MonsterTrapHit(int m, int mindam, int maxdam, int dist, int t, int shift); -BOOLEAN __fastcall MonsterMHit(int pnum, int m, int mindam, int maxdam, int dist, int t, int shift); -BOOLEAN __fastcall PlayerMHit(int pnum, int m, int dist, int mind, int maxd, int mtype, int shift, int earflag); -BOOLEAN __fastcall Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int mtype, int shift); -void __fastcall CheckMissileCol(int i, int mindam, int maxdam, BOOLEAN shift, int mx, int my, int nodel); -void __fastcall SetMissAnim(int mi, int animtype); -void __fastcall SetMissDir(int mi, int dir); -void __fastcall LoadMissileGFX(BYTE mi); -void __cdecl InitMissileGFX(); -void __fastcall FreeMissileGFX(int mi); -void __cdecl FreeMissiles(); -void __cdecl FreeMissiles2(); -void __cdecl InitMissiles(); -void __fastcall AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall GetVileMissPos(int mi, int dx, int dy); -void __fastcall AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFirebolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam); -void __fastcall AddMagmaball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_33(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddLightball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFirewall(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFireball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddLightctrl(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddLightning(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddMisexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddWeapexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -BOOL __fastcall CheckIfTrig(int x, int y); -void __fastcall AddTown(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFlash(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFlash2(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddManashield(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFiremove(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddGuardian(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddChain(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_11(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_12(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_13(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddRhino(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_32(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFlare(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddAcid(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_1D(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddAcidpud(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddStone(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddGolem(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddEtherealize(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_1F(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall miss_null_23(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddBoom(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddHeal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddHealOther(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddElement(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddIdentify(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFirewallC(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddInfra(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddWave(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddNova(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddRecharge(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddDisarm(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFlame(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddFlamec(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddCbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam); -void __fastcall AddHbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam); -void __fastcall AddResurrect(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddResurrectBeam(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddTelekinesis(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddBoneSpirit(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddRportal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -void __fastcall AddDiabApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); -int __fastcall AddMissile(int sx, int sy, int dx, int dy, int midir, int mitype, char micaster, int id, int midam, int spllvl); -int __fastcall Sentfire(int i, int sx, int sy); -void __fastcall MI_Dummy(int i); -void __fastcall MI_Golem(int i); -void __fastcall MI_SetManashield(int i); -void __fastcall MI_LArrow(int i); -void __fastcall MI_Arrow(int i); -void __fastcall MI_Firebolt(int i); -void __fastcall MI_Lightball(int i); -void __fastcall mi_null_33(int i); -void __fastcall MI_Acidpud(int i); -void __fastcall MI_Firewall(int i); -void __fastcall MI_Fireball(int i); -void __fastcall MI_Lightctrl(int i); -void __fastcall MI_Lightning(int i); -void __fastcall MI_Town(int i); -void __fastcall MI_Flash(int i); -void __fastcall MI_Flash2(int i); -void __fastcall MI_Manashield(int i); -void __fastcall MI_Etherealize(int i); -void __fastcall MI_Firemove(int i); -void __fastcall MI_Guardian(int i); -void __fastcall MI_Chain(int i); -void __fastcall mi_null_11(int i); -void __fastcall MI_Weapexp(int i); -void __fastcall MI_Misexp(int i); -void __fastcall MI_Acidsplat(int i); -void __fastcall MI_Teleport(int i); -void __fastcall MI_Stone(int i); -void __fastcall MI_Boom(int i); -void __fastcall MI_Rhino(int i); -void __fastcall mi_null_32(int i); -void __fastcall MI_FirewallC(int i); -void __fastcall MI_Infra(int i); -void __fastcall MI_Apoca(int i); -void __fastcall MI_Wave(int i); -void __fastcall MI_Nova(int i); -void __fastcall MI_Blodboil(int i); -void __fastcall MI_Flame(int i); -void __fastcall MI_Flamec(int i); -void __fastcall MI_Cbolt(int i); -void __fastcall MI_Hbolt(int i); -void __fastcall MI_Element(int i); -void __fastcall MI_Bonespirit(int i); -void __fastcall MI_ResurrectBeam(int i); -void __fastcall MI_Rportal(int i); -void __cdecl ProcessMissiles(); -void __cdecl missiles_process_charge(); -void __fastcall ClearMissileSpot(int mi); +void GetDamageAmt(int i, int *mind, int *maxd); +BOOL CheckBlock(int fx, int fy, int tx, int ty); +int FindClosest(int sx, int sy, int rad); +int GetSpellLevel(int id, int sn); +int GetDirection8(int x1, int y1, int x2, int y2); +int GetDirection16(int x1, int y1, int x2, int y2); +void DeleteMissile(int mi, int i); +void GetMissileVel(int i, int sx, int sy, int dx, int dy, int v); +void PutMissile(int i); +void GetMissilePos(int i); +void MoveMissilePos(int i); +BOOL MonsterTrapHit(int m, int mindam, int maxdam, int dist, int t, int shift); +BOOLEAN MonsterMHit(int pnum, int m, int mindam, int maxdam, int dist, int t, int shift); +BOOLEAN PlayerMHit(int pnum, int m, int dist, int mind, int maxd, int mtype, int shift, int earflag); +BOOLEAN Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int mtype, int shift); +void CheckMissileCol(int i, int mindam, int maxdam, BOOLEAN shift, int mx, int my, int nodel); +void SetMissAnim(int mi, int animtype); +void SetMissDir(int mi, int dir); +void LoadMissileGFX(BYTE mi); +void InitMissileGFX(); +void FreeMissileGFX(int mi); +void FreeMissiles(); +void FreeMissiles2(); +void InitMissiles(); +void AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void GetVileMissPos(int mi, int dx, int dy); +void AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFirebolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam); +void AddMagmaball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_33(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddLightball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFirewall(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFireball(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddLightctrl(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddLightning(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddMisexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddWeapexp(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +BOOL CheckIfTrig(int x, int y); +void AddTown(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFlash(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFlash2(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddManashield(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFiremove(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddGuardian(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddChain(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_11(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_12(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_13(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddRhino(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_32(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFlare(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddAcid(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_1D(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddAcidpud(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddStone(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddGolem(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddEtherealize(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_1F(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void miss_null_23(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddBoom(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddHeal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddHealOther(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddElement(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddIdentify(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFirewallC(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddInfra(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddWave(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddNova(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddRecharge(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddDisarm(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFlame(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddFlamec(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddCbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam); +void AddHbolt(int mi, int sx, int sy, int dx, int dy, int midir, char micaster, int id, int dam); +void AddResurrect(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddResurrectBeam(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddTelekinesis(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddBoneSpirit(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddRportal(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +void AddDiabApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); +int AddMissile(int sx, int sy, int dx, int dy, int midir, int mitype, char micaster, int id, int midam, int spllvl); +int Sentfire(int i, int sx, int sy); +void MI_Dummy(int i); +void MI_Golem(int i); +void MI_SetManashield(int i); +void MI_LArrow(int i); +void MI_Arrow(int i); +void MI_Firebolt(int i); +void MI_Lightball(int i); +void mi_null_33(int i); +void MI_Acidpud(int i); +void MI_Firewall(int i); +void MI_Fireball(int i); +void MI_Lightctrl(int i); +void MI_Lightning(int i); +void MI_Town(int i); +void MI_Flash(int i); +void MI_Flash2(int i); +void MI_Manashield(int i); +void MI_Etherealize(int i); +void MI_Firemove(int i); +void MI_Guardian(int i); +void MI_Chain(int i); +void mi_null_11(int i); +void MI_Weapexp(int i); +void MI_Misexp(int i); +void MI_Acidsplat(int i); +void MI_Teleport(int i); +void MI_Stone(int i); +void MI_Boom(int i); +void MI_Rhino(int i); +void mi_null_32(int i); +void MI_FirewallC(int i); +void MI_Infra(int i); +void MI_Apoca(int i); +void MI_Wave(int i); +void MI_Nova(int i); +void MI_Blodboil(int i); +void MI_Flame(int i); +void MI_Flamec(int i); +void MI_Cbolt(int i); +void MI_Hbolt(int i); +void MI_Element(int i); +void MI_Bonespirit(int i); +void MI_ResurrectBeam(int i); +void MI_Rportal(int i); +void ProcessMissiles(); +void missiles_process_charge(); +void ClearMissileSpot(int mi); /* rdata */ diff --git a/Source/monster.cpp b/Source/monster.cpp index 8c3e2f86..c7d101a8 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -312,7 +312,7 @@ int rnd20[4] = { 20, 30, 40, 50 }; int rnd60[4] = { 60, 70, 80, 90 }; // -void(__fastcall *AiProc[])(int i) = { +void(*AiProc[])(int i) = { &MAI_Zombie, &MAI_Fat, &MAI_SkelSd, @@ -347,7 +347,7 @@ void(__fastcall *AiProc[])(int i) = { &MAI_Warlord }; -void __fastcall InitMonsterTRN(int monst, BOOL special) +void InitMonsterTRN(int monst, BOOL special) { BYTE *f; int i, n, j, k; @@ -373,7 +373,7 @@ void __fastcall InitMonsterTRN(int monst, BOOL special) } } -void __cdecl InitLevelMonsters() +void InitLevelMonsters() { int i; @@ -396,7 +396,7 @@ void __cdecl InitLevelMonsters() uniquetrans = 0; } -int __fastcall AddMonsterType(int type, int placeflag) +int AddMonsterType(int type, int placeflag) { BOOL done = FALSE; int i; @@ -420,7 +420,7 @@ int __fastcall AddMonsterType(int type, int placeflag) return i; } -void __cdecl GetLevelMTypes() +void GetLevelMTypes() { int i; @@ -521,7 +521,7 @@ void __cdecl GetLevelMTypes() } } -void __fastcall InitMonsterGFX(int monst) +void InitMonsterGFX(int monst) { int mtype, anim, i; char strBuff[256]; @@ -627,7 +627,7 @@ void __fastcall InitMonsterGFX(int monst) } } -void __fastcall ClearMVars(int i) +void ClearMVars(int i) { monster[i]._mVar1 = 0; monster[i]._mVar2 = 0; @@ -639,7 +639,7 @@ void __fastcall ClearMVars(int i) monster[i]._mVar8 = 0; } -void __fastcall InitMonster(int i, int rd, int mtype, int x, int y) +void InitMonster(int i, int rd, int mtype, int x, int y) { CMonster *monst = &Monsters[mtype]; @@ -741,7 +741,7 @@ void __fastcall InitMonster(int i, int rd, int mtype, int x, int y) } } -void __cdecl ClrAllMonsters() +void ClrAllMonsters() { int i; MonsterStruct *Monst; @@ -776,7 +776,7 @@ void __cdecl ClrAllMonsters() } } -BOOL __fastcall MonstPlace(int xp, int yp) +BOOL MonstPlace(int xp, int yp) { char f; @@ -800,7 +800,7 @@ BOOL __fastcall MonstPlace(int xp, int yp) return !SolidLoc(xp, yp); } -void __fastcall PlaceMonster(int i, int mtype, int x, int y) +void PlaceMonster(int i, int mtype, int x, int y) { int rd; @@ -810,7 +810,7 @@ void __fastcall PlaceMonster(int i, int mtype, int x, int y) InitMonster(i, rd, mtype, x, y); } -void __fastcall PlaceUniqueMonst(int uniqindex, int miniontype, int packsize) +void PlaceUniqueMonst(int uniqindex, int miniontype, int packsize) { int xp, yp, x, y, i; int uniqtype; @@ -1012,7 +1012,7 @@ void __fastcall PlaceUniqueMonst(int uniqindex, int miniontype, int packsize) } } -void __cdecl PlaceQuestMonsters() +void PlaceQuestMonsters() { int skeltype; unsigned char *setp; @@ -1084,7 +1084,7 @@ void __cdecl PlaceQuestMonsters() } } -void __fastcall PlaceGroup(int mtype, int num, int leaderf, int leader) +void PlaceGroup(int mtype, int num, int leaderf, int leader) { int placed, try1, try2, j; int xp, yp, x1, y1; @@ -1160,7 +1160,7 @@ void __fastcall PlaceGroup(int mtype, int num, int leaderf, int leader) } } -void __cdecl LoadDiabMonsts() +void LoadDiabMonsts() { unsigned char *lpSetPiece; // esi @@ -1180,7 +1180,7 @@ void __cdecl LoadDiabMonsts() // 5289C4: using guessed type int diabquad1x; // 5289C8: using guessed type int diabquad1y; -void __cdecl InitMonsters() +void InitMonsters() { int v0; // ebp int v1; // ebx @@ -1319,7 +1319,7 @@ LABEL_42: // 679660: using guessed type char gbMaxPlayers; // 432637: using guessed type int var_1BC[111]; -void __cdecl PlaceUniques() +void PlaceUniques() { int v0; // edi int v1; // eax @@ -1387,7 +1387,7 @@ void __cdecl PlaceUniques() } } -void __fastcall SetMapMonsters(unsigned char *pMap, int startx, int starty) +void SetMapMonsters(unsigned char *pMap, int startx, int starty) { unsigned char *v3; // esi unsigned short v4; // cx @@ -1444,7 +1444,7 @@ void __fastcall SetMapMonsters(unsigned char *pMap, int startx, int starty) } // 5CF31D: using guessed type char setlevel; -void __fastcall DeleteMonster(int i) +void DeleteMonster(int i) { int temp; @@ -1454,7 +1454,7 @@ void __fastcall DeleteMonster(int i) monstactive[i] = temp; } -int __fastcall AddMonster(int x, int y, int dir, int mtype, int InMap) +int AddMonster(int x, int y, int dir, int mtype, int InMap) { if (nummonsters < MAXMONSTERS) { int i = monstactive[nummonsters++]; @@ -1467,7 +1467,7 @@ int __fastcall AddMonster(int x, int y, int dir, int mtype, int InMap) return -1; } -void __fastcall NewMonsterAnim(int i, AnimStruct *anim, int md) +void NewMonsterAnim(int i, AnimStruct *anim, int md) { monster[i]._mAnimData = anim->Data[md]; monster[i]._mAnimCnt = 0; @@ -1478,13 +1478,13 @@ void __fastcall NewMonsterAnim(int i, AnimStruct *anim, int md) monster[i]._mdir = md; } -BOOL __fastcall M_Ranged(int i) +BOOL M_Ranged(int i) { char ai = monster[i]._mAi; return ai == AI_SKELBOW || ai == AI_GOATBOW || ai == AI_SUCC || ai == AI_LAZHELP; } -BOOL __fastcall M_Talker(int i) +BOOL M_Talker(int i) { char ai = monster[i]._mAi; return ai == AI_LAZURUS @@ -1496,7 +1496,7 @@ BOOL __fastcall M_Talker(int i) || ai == AI_LAZHELP; } -void __fastcall M_Enemy(int i) +void M_Enemy(int i) { MonsterStruct *v1; // esi int *v2; // edi @@ -1624,12 +1624,12 @@ void __fastcall M_Enemy(int i) } // 679660: using guessed type char gbMaxPlayers; -int __fastcall M_GetDir(int i) +int M_GetDir(int i) { return GetDirection(monster[i]._mx, monster[i]._my, monster[i]._menemyx, monster[i]._menemyy); } -void __fastcall M_CheckEFlag(int i) +void M_CheckEFlag(int i) { int v1; // ecx int v2; // edi @@ -1652,7 +1652,7 @@ void __fastcall M_CheckEFlag(int i) monster[v1]._meflag = 0; } -void __fastcall M_StartStand(int i, int md) +void M_StartStand(int i, int md) { ClearMVars(i); if (monster[i].MType->mtype == MT_GOLEM) @@ -1673,7 +1673,7 @@ void __fastcall M_StartStand(int i, int md) M_Enemy(i); } -void __fastcall M_StartDelay(int i, int len) +void M_StartDelay(int i, int len) { if (len <= 0) { return; @@ -1685,7 +1685,7 @@ void __fastcall M_StartDelay(int i, int len) } } -void __fastcall M_StartSpStand(int i, int md) +void M_StartSpStand(int i, int md) { NewMonsterAnim(i, &monster[i].MType->Anims[MA_SPECIAL], md); monster[i]._mmode = MM_SPSTAND; @@ -1699,7 +1699,7 @@ void __fastcall M_StartSpStand(int i, int md) M_CheckEFlag(i); } -void __fastcall M_StartWalk(int i, int xvel, int yvel, int xadd, int yadd, int EndDir) +void M_StartWalk(int i, int xvel, int yvel, int xadd, int yadd, int EndDir) { int fx = xadd + monster[i]._mx; int fy = yadd + monster[i]._my; @@ -1723,7 +1723,7 @@ void __fastcall M_StartWalk(int i, int xvel, int yvel, int xadd, int yadd, int E M_CheckEFlag(i); } -void __fastcall M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir) +void M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir) { int fx = xadd + monster[i]._mx; int fy = yadd + monster[i]._my; @@ -1754,7 +1754,7 @@ void __fastcall M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int M_CheckEFlag(i); } -void __fastcall M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir) +void M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir) { int fx = xadd + monster[i]._mx; int fy = yadd + monster[i]._my; @@ -1789,7 +1789,7 @@ void __fastcall M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int M_CheckEFlag(i); } -void __fastcall M_StartAttack(int i) +void M_StartAttack(int i) { int md = M_GetDir(i); NewMonsterAnim(i, &monster[i].MType->Anims[MA_ATTACK], md); @@ -1804,7 +1804,7 @@ void __fastcall M_StartAttack(int i) M_CheckEFlag(i); } -void __fastcall M_StartRAttack(int i, int missile_type, int dam) +void M_StartRAttack(int i, int missile_type, int dam) { int md = M_GetDir(i); NewMonsterAnim(i, &monster[i].MType->Anims[MA_ATTACK], md); @@ -1821,7 +1821,7 @@ void __fastcall M_StartRAttack(int i, int missile_type, int dam) M_CheckEFlag(i); } -void __fastcall M_StartRSpAttack(int i, int missile_type, int dam) +void M_StartRSpAttack(int i, int missile_type, int dam) { int md = M_GetDir(i); NewMonsterAnim(i, &monster[i].MType->Anims[MA_SPECIAL], md); @@ -1839,7 +1839,7 @@ void __fastcall M_StartRSpAttack(int i, int missile_type, int dam) M_CheckEFlag(i); } -void __fastcall M_StartSpAttack(int i) +void M_StartSpAttack(int i) { int md = M_GetDir(i); NewMonsterAnim(i, &monster[i].MType->Anims[MA_SPECIAL], md); @@ -1854,7 +1854,7 @@ void __fastcall M_StartSpAttack(int i) M_CheckEFlag(i); } -void __fastcall M_StartEat(int i) +void M_StartEat(int i) { NewMonsterAnim(i, &monster[i].MType->Anims[MA_SPECIAL], monster[i]._mdir); monster[i]._mmode = MM_SATTACK; @@ -1867,7 +1867,7 @@ void __fastcall M_StartEat(int i) M_CheckEFlag(i); } -void __fastcall M_ClearSquares(int i) +void M_ClearSquares(int i) { int x, y, mx, my, m1, m2; @@ -1891,7 +1891,7 @@ void __fastcall M_ClearSquares(int i) dFlags[mx][my + 1] &= ~DFLAG_MONSTER; } -void __fastcall M_GetKnockback(int i) +void M_GetKnockback(int i) { int d = (monster[i]._mdir - 4) & 7; if (DirOK(i, d)) { @@ -1912,7 +1912,7 @@ void __fastcall M_GetKnockback(int i) } } -void __fastcall M_StartHit(int i, int pnum, int dam) +void M_StartHit(int i, int pnum, int dam) { if (pnum >= 0) monster[i].mWhoHit |= 1 << pnum; @@ -1950,7 +1950,7 @@ void __fastcall M_StartHit(int i, int pnum, int dam) } } -void __fastcall M_DiabloDeath(int i, BOOL sendmsg) +void M_DiabloDeath(int i, BOOL sendmsg) { int v2; // esi int v3; // edi @@ -2021,7 +2021,7 @@ void __fastcall M_DiabloDeath(int i, BOOL sendmsg) } // 64D32C: using guessed type int sgbSaveSoundOn; -void __fastcall M2MStartHit(int mid, int i, int dam) +void M2MStartHit(int mid, int i, int dam) { if ((DWORD)mid >= MAXMONSTERS) { app_fatal("Invalid monster %d getting hit by monster", mid); @@ -2067,7 +2067,7 @@ void __fastcall M2MStartHit(int mid, int i, int dam) } } -void __fastcall MonstStartKill(int i, int pnum, BOOL sendmsg) +void MonstStartKill(int i, int pnum, BOOL sendmsg) { int md; @@ -2118,7 +2118,7 @@ void __fastcall MonstStartKill(int i, int pnum, BOOL sendmsg) AddMissile(monster[i]._mx, monster[i]._my, 0, 0, 0, MIS_ACIDPUD, 1, i, monster[i]._mint + 1, 0); } -void __fastcall M2MStartKill(int i, int mid) +void M2MStartKill(int i, int mid) { int md; @@ -2172,7 +2172,7 @@ void __fastcall M2MStartKill(int i, int mid) AddMissile(monster[mid]._mx, monster[mid]._my, 0, 0, 0, MIS_ACIDPUD, 1, mid, monster[mid]._mint + 1, 0); } -void __fastcall M_StartKill(int i, int pnum) +void M_StartKill(int i, int pnum) { if ((DWORD)i >= MAXMONSTERS) { app_fatal("M_StartKill: Invalid monster %d", i); @@ -2190,7 +2190,7 @@ void __fastcall M_StartKill(int i, int pnum) MonstStartKill(i, pnum, TRUE); } -void __fastcall M_SyncStartKill(int i, int x, int y, int pnum) +void M_SyncStartKill(int i, int x, int y, int pnum) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_SyncStartKill: Invalid monster %d", i); @@ -2215,7 +2215,7 @@ void __fastcall M_SyncStartKill(int i, int x, int y, int pnum) } } -void __fastcall M_StartFadein(int i, int md, BOOL backwards) +void M_StartFadein(int i, int md, BOOL backwards) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_StartFadein: Invalid monster %d", i); @@ -2239,7 +2239,7 @@ void __fastcall M_StartFadein(int i, int md, BOOL backwards) } } -void __fastcall M_StartFadeout(int i, int md, BOOL backwards) +void M_StartFadeout(int i, int md, BOOL backwards) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_StartFadeout: Invalid monster %d", i); @@ -2262,7 +2262,7 @@ void __fastcall M_StartFadeout(int i, int md, BOOL backwards) } } -void __fastcall M_StartHeal(int i) +void M_StartHeal(int i) { MonsterStruct *Monst; @@ -2279,7 +2279,7 @@ void __fastcall M_StartHeal(int i) Monst->_mVar1 = Monst->_mmaxhp / (16 * (random(97, 5) + 4)); } -void __fastcall M_ChangeLightOffset(int monst) +void M_ChangeLightOffset(int monst) { int lx, ly, _mxoff, _myoff, sign; @@ -2307,7 +2307,7 @@ void __fastcall M_ChangeLightOffset(int monst) ChangeLightOff(monster[monst].mlid, _mxoff, _myoff * (ly >> 3)); } -int __fastcall M_DoStand(int i) +int M_DoStand(int i) { MonsterStruct *Monst; @@ -2330,7 +2330,7 @@ int __fastcall M_DoStand(int i) return FALSE; } -BOOL __fastcall M_DoWalk(int i) +BOOL M_DoWalk(int i) { BOOL rv; @@ -2363,7 +2363,7 @@ BOOL __fastcall M_DoWalk(int i) return rv; } -BOOL __fastcall M_DoWalk2(int i) +BOOL M_DoWalk2(int i) { BOOL rv; @@ -2394,7 +2394,7 @@ BOOL __fastcall M_DoWalk2(int i) return rv; } -BOOL __fastcall M_DoWalk3(int i) +BOOL M_DoWalk3(int i) { BOOL rv; @@ -2429,7 +2429,7 @@ BOOL __fastcall M_DoWalk3(int i) return rv; } -void __fastcall M_TryM2MHit(int i, int mid, int hper, int mind, int maxd) +void M_TryM2MHit(int i, int mid, int hper, int mind, int maxd) { BOOL ret; @@ -2464,7 +2464,7 @@ void __fastcall M_TryM2MHit(int i, int mid, int hper, int mind, int maxd) } } -void __fastcall M_TryH2HHit(int i, int pnum, int Hit, int MinDam, int MaxDam) +void M_TryH2HHit(int i, int pnum, int Hit, int MinDam, int MaxDam) { int v5; // esi int v6; // ebx @@ -2658,7 +2658,7 @@ void __fastcall M_TryH2HHit(int i, int pnum, int Hit, int MinDam, int MaxDam) } // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall M_DoAttack(int i) +BOOL M_DoAttack(int i) { MonsterStruct *Monst; @@ -2694,7 +2694,7 @@ BOOL __fastcall M_DoAttack(int i) return FALSE; } -BOOL __fastcall M_DoRAttack(int i) +BOOL M_DoRAttack(int i) { int multimissiles, mi; @@ -2736,7 +2736,7 @@ BOOL __fastcall M_DoRAttack(int i) return FALSE; } -int __fastcall M_DoRSpAttack(int i) +int M_DoRSpAttack(int i) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_DoRSpAttack: Invalid monster %d", i); @@ -2778,7 +2778,7 @@ int __fastcall M_DoRSpAttack(int i) return FALSE; } -BOOL __fastcall M_DoSAttack(int i) +BOOL M_DoSAttack(int i) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_DoSAttack: Invalid monster %d", i); @@ -2798,7 +2798,7 @@ BOOL __fastcall M_DoSAttack(int i) return FALSE; } -BOOL __fastcall M_DoFadein(int i) +BOOL M_DoFadein(int i) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_DoFadein: Invalid monster %d", i); @@ -2814,7 +2814,7 @@ BOOL __fastcall M_DoFadein(int i) return TRUE; } -BOOL __fastcall M_DoFadeout(int i) +BOOL M_DoFadeout(int i) { int mt; @@ -2839,7 +2839,7 @@ BOOL __fastcall M_DoFadeout(int i) return TRUE; } -int __fastcall M_DoHeal(int i) +int M_DoHeal(int i) { int v1; // esi int v2; // eax @@ -2876,7 +2876,7 @@ int __fastcall M_DoHeal(int i) return 0; } -int __fastcall M_DoTalk(int i) +int M_DoTalk(int i) { int v1; // edi int v2; // esi @@ -2963,7 +2963,7 @@ int __fastcall M_DoTalk(int i) // 5CF334: using guessed type int setpc_w; // 679660: using guessed type char gbMaxPlayers; -void __fastcall M_Teleport(int i) +void M_Teleport(int i) { BOOL tren; MonsterStruct *Monst; @@ -3006,7 +3006,7 @@ void __fastcall M_Teleport(int i) } } -BOOL __fastcall M_DoGotHit(int i) +BOOL M_DoGotHit(int i) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_DoGotHit: Invalid monster %d", i); @@ -3022,7 +3022,7 @@ BOOL __fastcall M_DoGotHit(int i) return FALSE; } -void __fastcall M_UpdateLeader(int i) +void M_UpdateLeader(int i) { int ma, j; @@ -3040,7 +3040,7 @@ void __fastcall M_UpdateLeader(int i) } } -void __cdecl DoEnding() +void DoEnding() { BOOL bMusicOn; int musicVolume; @@ -3081,7 +3081,7 @@ void __cdecl DoEnding() } // 679660: using guessed type char gbMaxPlayers; -void __cdecl PrepDoEnding() +void PrepDoEnding() { int newKillLevel, i; DWORD *killLevel; @@ -3112,7 +3112,7 @@ void __cdecl PrepDoEnding() // 64D32C: using guessed type int sgbSaveSoundOn; // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall M_DoDeath(int i) +BOOL M_DoDeath(int i) { int var1; int x, y; @@ -3156,7 +3156,7 @@ BOOL __fastcall M_DoDeath(int i) return FALSE; } -BOOL __fastcall M_DoSpStand(int i) +BOOL M_DoSpStand(int i) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_DoSpStand: Invalid monster %d", i); @@ -3174,7 +3174,7 @@ BOOL __fastcall M_DoSpStand(int i) return FALSE; } -BOOL __fastcall M_DoDelay(int i) +BOOL M_DoDelay(int i) { int mVar2; int oFrame; @@ -3203,7 +3203,7 @@ BOOL __fastcall M_DoDelay(int i) return FALSE; } -BOOL __fastcall M_DoStone(int i) +BOOL M_DoStone(int i) { if ((DWORD)i >= MAXMONSTERS) app_fatal("M_DoStone: Invalid monster %d", i); @@ -3216,7 +3216,7 @@ BOOL __fastcall M_DoStone(int i) return FALSE; } -void __fastcall M_WalkDir(int i, int md) +void M_WalkDir(int i, int md) { int mwi; @@ -3252,7 +3252,7 @@ void __fastcall M_WalkDir(int i, int md) } } -void __fastcall GroupUnity(int i) +void GroupUnity(int i) { int v1; // ebx int v2; // esi @@ -3334,7 +3334,7 @@ LABEL_18: } } -BOOL __fastcall M_CallWalk(int i, int md) +BOOL M_CallWalk(int i, int md) { int v2; // esi int v3; // edi @@ -3411,10 +3411,10 @@ LABEL_11: return 0; } -BOOL __fastcall M_PathWalk(int i) +BOOL M_PathWalk(int i) { char path[25]; - BOOL(__fastcall * Check) + BOOL(* Check) (int, int, int); if ((DWORD)i >= MAXMONSTERS) @@ -3432,7 +3432,7 @@ BOOL __fastcall M_PathWalk(int i) return FALSE; } -BOOL __fastcall M_CallWalk2(int i, int md) +BOOL M_CallWalk2(int i, int md) { BOOL ok; int mdtemp; @@ -3451,7 +3451,7 @@ BOOL __fastcall M_CallWalk2(int i, int md) return ok; } -BOOL __fastcall M_DumbWalk(int i, int md) +BOOL M_DumbWalk(int i, int md) { BOOL ok; ok = DirOK(i, md); @@ -3461,7 +3461,7 @@ BOOL __fastcall M_DumbWalk(int i, int md) return ok; } -BOOLEAN __fastcall M_RoundWalk(int i, int md, int *dir) +BOOLEAN M_RoundWalk(int i, int md, int *dir) { int *v3; // ebp int v4; // ebx @@ -3516,7 +3516,7 @@ LABEL_12: return v7; } -void __fastcall MAI_Zombie(int i) +void MAI_Zombie(int i) { MonsterStruct *Monst; int mx, my; @@ -3561,7 +3561,7 @@ void __fastcall MAI_Zombie(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[Monst->_mdir]; } -void __fastcall MAI_SkelSd(int i) +void MAI_SkelSd(int i) { MonsterStruct *Monst; int mx, my, x, y, md; @@ -3598,7 +3598,7 @@ void __fastcall MAI_SkelSd(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -BOOL __fastcall MAI_Path(int i) +BOOL MAI_Path(int i) { MonsterStruct *Monst; BOOL clear; @@ -3641,7 +3641,7 @@ BOOL __fastcall MAI_Path(int i) return FALSE; } -void __fastcall MAI_Snake(int i) +void MAI_Snake(int i) { int esi1; // esi MonsterStruct *esi3; // esi @@ -3812,7 +3812,7 @@ void __fastcall MAI_Snake(int i) } } -void __fastcall MAI_Bat(int i) +void MAI_Bat(int i) { MonsterStruct *Monst; int md, v, pnum; @@ -3876,7 +3876,7 @@ void __fastcall MAI_Bat(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -void __fastcall MAI_SkelBow(int i) +void MAI_SkelBow(int i) { MonsterStruct *Monst; int mx, my, md, v; @@ -3920,7 +3920,7 @@ void __fastcall MAI_SkelBow(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -void __fastcall MAI_Fat(int i) +void MAI_Fat(int i) { MonsterStruct *Monst; int mx, my, md, v; @@ -3955,7 +3955,7 @@ void __fastcall MAI_Fat(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -void __fastcall MAI_Sneak(int i) +void MAI_Sneak(int i) { int v1; // edi MonsterStruct *v2; // esi @@ -4044,7 +4044,7 @@ void __fastcall MAI_Sneak(int i) } // 642A14: using guessed type char lightmax; -void __fastcall MAI_Fireman(int i) +void MAI_Fireman(int i) { int xd, yd; int md, pnum; @@ -4105,7 +4105,7 @@ void __fastcall MAI_Fireman(int i) } } -void __fastcall MAI_Fallen(int i) +void MAI_Fallen(int i) { int x, y, xpos, ypos; int m, rad, md; @@ -4177,7 +4177,7 @@ void __fastcall MAI_Fallen(int i) } } -void __fastcall MAI_Cleaver(int i) +void MAI_Cleaver(int i) { MonsterStruct *Monst; int x, y, mx, my, md; @@ -4207,7 +4207,7 @@ void __fastcall MAI_Cleaver(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -void __fastcall MAI_Round(int i, BOOL special) +void MAI_Round(int i, BOOL special) { int v2; // esi MonsterStruct *v3; // esi @@ -4318,12 +4318,12 @@ void __fastcall MAI_Round(int i, BOOL special) } } -void __fastcall MAI_GoatMc(int i) +void MAI_GoatMc(int i) { MAI_Round(i, 1u); } -void __fastcall MAI_Ranged(int i, int missile_type, BOOL special) +void MAI_Ranged(int i, int missile_type, BOOL special) { int md; int mx, my, fx, fy; @@ -4368,22 +4368,22 @@ void __fastcall MAI_Ranged(int i, int missile_type, BOOL special) } } -void __fastcall MAI_GoatBow(int i) +void MAI_GoatBow(int i) { MAI_Ranged(i, MIS_ARROW, 0); } -void __fastcall MAI_Succ(int i) +void MAI_Succ(int i) { MAI_Ranged(i, MIS_FLARE, 0); } -void __fastcall MAI_AcidUniq(int i) +void MAI_AcidUniq(int i) { MAI_Ranged(i, MIS_ACID, 1u); } -void __fastcall MAI_Scav(int i) +void MAI_Scav(int i) { int v1; // edi int v2; // esi @@ -4519,7 +4519,7 @@ void __fastcall MAI_Scav(int i) } } -void __fastcall MAI_Garg(int i) +void MAI_Garg(int i) { MonsterStruct *Monst; int mx, my, dx, dy, md; @@ -4558,7 +4558,7 @@ void __fastcall MAI_Garg(int i) MAI_Round(i, 0); } -void __fastcall MAI_RoundRanged(int i, int missile_type, unsigned char checkdoors, int dam, int lessmissiles) +void MAI_RoundRanged(int i, int missile_type, unsigned char checkdoors, int dam, int lessmissiles) { int v5; // esi MonsterStruct *v6; // esi @@ -4689,27 +4689,27 @@ void __fastcall MAI_RoundRanged(int i, int missile_type, unsigned char checkdoor } } -void __fastcall MAI_Magma(int i) +void MAI_Magma(int i) { MAI_RoundRanged(i, MIS_MAGMABALL, 1u, 4, 0); } -void __fastcall MAI_Storm(int i) +void MAI_Storm(int i) { MAI_RoundRanged(i, MIS_LIGHTCTRL2, 1u, 4, 0); } -void __fastcall MAI_Acid(int i) +void MAI_Acid(int i) { MAI_RoundRanged(i, MIS_ACID, 0, 4, 1); } -void __fastcall MAI_Diablo(int i) +void MAI_Diablo(int i) { MAI_RoundRanged(i, MIS_DIABAPOCA, 0, 40, 0); } -void __fastcall MAI_RR2(int i, int mistype, int dam) +void MAI_RR2(int i, int mistype, int dam) { int v3; // ebx MonsterStruct *v4; // esi @@ -4860,12 +4860,12 @@ void __fastcall MAI_RR2(int i, int mistype, int dam) } } -void __fastcall MAI_Mega(int i) +void MAI_Mega(int i) { MAI_RR2(i, MIS_FLAMEC, 0); } -void __fastcall MAI_Golum(int i) +void MAI_Golum(int i) { int mx, my, _mex, _mey; int md, j, k, _menemy; @@ -4944,7 +4944,7 @@ void __fastcall MAI_Golum(int i) } } -void __fastcall MAI_SkelKing(int i) +void MAI_SkelKing(int i) { int v1; // esi MonsterStruct *v2; // esi @@ -5076,7 +5076,7 @@ void __fastcall MAI_SkelKing(int i) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall MAI_Rhino(int i) +void MAI_Rhino(int i) { int esi1; // esi MonsterStruct *esi3; // esi @@ -5209,7 +5209,7 @@ void __fastcall MAI_Rhino(int i) } } -void __fastcall MAI_Counselor(int i) +void MAI_Counselor(int i) { int v1; // ebx int v2; // esi @@ -5367,7 +5367,7 @@ void __fastcall MAI_Counselor(int i) } } -void __fastcall MAI_Garbud(int i) +void MAI_Garbud(int i) { int _mx, _my, md; MonsterStruct *Monst; @@ -5411,7 +5411,7 @@ void __fastcall MAI_Garbud(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -void __fastcall MAI_Zhar(int i) +void MAI_Zhar(int i) { int mx, my, _mx, _my, md; MonsterStruct *Monst; @@ -5457,7 +5457,7 @@ void __fastcall MAI_Zhar(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -void __fastcall MAI_SnotSpil(int i) +void MAI_SnotSpil(int i) { int mx, my, md; MonsterStruct *Monst; @@ -5509,7 +5509,7 @@ void __fastcall MAI_SnotSpil(int i) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall MAI_Lazurus(int i) +void MAI_Lazurus(int i) { int mx, my, md; MonsterStruct *Monst; @@ -5560,7 +5560,7 @@ void __fastcall MAI_Lazurus(int i) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall MAI_Lazhelp(int i) +void MAI_Lazhelp(int i) { int v1; // esi int v2; // esi @@ -5598,7 +5598,7 @@ void __fastcall MAI_Lazhelp(int i) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall MAI_Lachdanan(int i) +void MAI_Lachdanan(int i) { int _mx, _my, md; MonsterStruct *Monst; @@ -5635,7 +5635,7 @@ void __fastcall MAI_Lachdanan(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; } -void __fastcall MAI_Warlord(int i) +void MAI_Warlord(int i) { MonsterStruct *Monst; int mx, my, md; @@ -5670,7 +5670,7 @@ void __fastcall MAI_Warlord(int i) Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[Monst->_mdir]; } -void __cdecl DeleteMonsterList() +void DeleteMonsterList() { int i; for (i = 0; i < MAX_PLRS; i++) { @@ -5696,7 +5696,7 @@ void __cdecl DeleteMonsterList() } } -void __cdecl ProcessMonsters() +void ProcessMonsters() { int v0; // edi int v1; // esi @@ -5879,7 +5879,7 @@ LABEL_60: } // 679660: using guessed type char gbMaxPlayers; -void __cdecl FreeMonsters() +void FreeMonsters() { int mtype; int i, j; @@ -5899,7 +5899,7 @@ void __cdecl FreeMonsters() FreeMissiles2(); } -BOOL __fastcall DirOK(int i, int mdir) +BOOL DirOK(int i, int mdir) { int v2; // ebx int v3; // esi @@ -6015,17 +6015,17 @@ LABEL_24: return v26 == (unsigned char)monster[v4].packsize; } -BOOL __fastcall PosOkMissile(int x, int y) +BOOL PosOkMissile(int x, int y) { return !nMissileTable[dPiece[x][y]] && !(dFlags[x][y] & DFLAG_MONSTER); } -BOOL __fastcall CheckNoSolid(int x, int y) +BOOL CheckNoSolid(int x, int y) { return nSolidTable[dPiece[x][y]] == 0; } -BOOL __fastcall LineClearF(BOOL(__fastcall *Clear)(int, int), int x1, int y1, int x2, int y2) +BOOL LineClearF(BOOL(*Clear)(int, int), int x1, int y1, int x2, int y2) { int v5; // esi int v6; // edi @@ -6137,12 +6137,12 @@ BOOL __fastcall LineClearF(BOOL(__fastcall *Clear)(int, int), int x1, int y1, in return 0; } -BOOL __fastcall LineClear(int x1, int y1, int x2, int y2) +BOOL LineClear(int x1, int y1, int x2, int y2) { return LineClearF(PosOkMissile, x1, y1, x2, y2); } -BOOL __fastcall LineClearF1(BOOL(__fastcall *Clear)(int, int, int), int monst, int x1, int y1, int x2, int y2) +BOOL LineClearF1(BOOL(*Clear)(int, int, int), int monst, int x1, int y1, int x2, int y2) { int v6; // esi int v7; // edi @@ -6252,7 +6252,7 @@ BOOL __fastcall LineClearF1(BOOL(__fastcall *Clear)(int, int, int), int monst, i return 0; } -void __fastcall SyncMonsterAnim(int i) +void SyncMonsterAnim(int i) { int v1; // esi int v2; // eax @@ -6332,7 +6332,7 @@ void __fastcall SyncMonsterAnim(int i) monster[v2]._mAnimLen = v12; } -void __fastcall M_FallenFear(int x, int y) +void M_FallenFear(int x, int y) { int v2; // eax int *v3; // ebx @@ -6399,7 +6399,7 @@ void __fastcall M_FallenFear(int x, int y) } } -void __fastcall PrintMonstHistory(int mt) +void PrintMonstHistory(int mt) { int v1; // edi int *v2; // ebx @@ -6475,7 +6475,7 @@ void __fastcall PrintMonstHistory(int mt) // 4B8824: using guessed type int pinfoflag; // 679660: using guessed type char gbMaxPlayers; -void __cdecl PrintUniqueHistory() +void PrintUniqueHistory() { char v0; // bl @@ -6501,7 +6501,7 @@ LABEL_4: } // 4B8824: using guessed type int pinfoflag; -void __fastcall MissToMonst(int i, int x, int y) +void MissToMonst(int i, int x, int y) { int v3; // edi MissileStruct *v4; // edi @@ -6622,7 +6622,7 @@ void __fastcall MissToMonst(int i, int x, int y) } } -BOOL __fastcall PosOkMonst(int i, int x, int y) +BOOL PosOkMonst(int i, int x, int y) { int oi, mi, j; BOOL ret, fire; @@ -6654,7 +6654,7 @@ BOOL __fastcall PosOkMonst(int i, int x, int y) return ret; } -BOOL __fastcall PosOkMonst2(int i, int x, int y) +BOOL PosOkMonst2(int i, int x, int y) { int oi, mi, j; BOOL ret, fire; @@ -6686,7 +6686,7 @@ BOOL __fastcall PosOkMonst2(int i, int x, int y) return ret; } -BOOL __fastcall PosOkMonst3(int i, int x, int y) +BOOL PosOkMonst3(int i, int x, int y) { int oi, mi, j, objtype; BOOL ret, fire, isdoor; @@ -6731,20 +6731,20 @@ BOOL __fastcall PosOkMonst3(int i, int x, int y) return ret; } -BOOL __fastcall IsSkel(int mt) +BOOL IsSkel(int mt) { return mt >= MT_WSKELAX && mt <= MT_XSKELAX || mt >= MT_WSKELBW && mt <= MT_XSKELBW || mt >= MT_WSKELSD && mt <= MT_XSKELSD; } -BOOL __fastcall IsGoat(int mt) +BOOL IsGoat(int mt) { return mt >= MT_NGOATMC && mt <= MT_GGOATMC || mt >= MT_NGOATBW && mt <= MT_GGOATBW; } -int __fastcall M_SpawnSkel(int x, int y, int dir) +int M_SpawnSkel(int x, int y, int dir) { int i, j, skeltypes, skel; @@ -6771,7 +6771,7 @@ int __fastcall M_SpawnSkel(int x, int y, int dir) return -1; } -void __fastcall ActivateSpawn(int i, int x, int y, int dir) +void ActivateSpawn(int i, int x, int y, int dir) { dMonster[x][y] = i + 1; monster[i]._mx = x; @@ -6783,7 +6783,7 @@ void __fastcall ActivateSpawn(int i, int x, int y, int dir) M_StartSpStand(i, dir); } -BOOL __fastcall SpawnSkeleton(int ii, int x, int y) +BOOL SpawnSkeleton(int ii, int x, int y) { int dx, dy, xx, yy, dir, j, k, rs; BOOL savail; @@ -6838,7 +6838,7 @@ BOOL __fastcall SpawnSkeleton(int ii, int x, int y) return TRUE; } -int __cdecl PreSpawnSkeleton() +int PreSpawnSkeleton() { int i, j, skeltypes, skel; @@ -6869,7 +6869,7 @@ int __cdecl PreSpawnSkeleton() return -1; } -void __fastcall TalktoMonster(int i) +void TalktoMonster(int i) { MonsterStruct *Monst; int pnum, itm; @@ -6897,7 +6897,7 @@ void __fastcall TalktoMonster(int i) } } -void __fastcall SpawnGolum(int i, int x, int y, int mi) +void SpawnGolum(int i, int x, int y, int mi) { if ((DWORD)i >= MAXMONSTERS) app_fatal("SpawnGolum: Invalid monster %d", i); @@ -6930,7 +6930,7 @@ void __fastcall SpawnGolum(int i, int x, int y, int mi) } } -BOOL __fastcall CanTalkToMonst(int m) +BOOL CanTalkToMonst(int m) { if ((DWORD)m >= MAXMONSTERS) { app_fatal("CanTalkToMonst: Invalid monster %d", m); @@ -6943,7 +6943,7 @@ BOOL __fastcall CanTalkToMonst(int m) return monster[m]._mgoal == MGOAL_TALKING; } -BOOL __fastcall CheckMonsterHit(int m, BOOL *ret) +BOOL CheckMonsterHit(int m, BOOL *ret) { if ((DWORD)m >= MAXMONSTERS) { app_fatal("CheckMonsterHit: Invalid monster %d", m); @@ -6965,7 +6965,7 @@ BOOL __fastcall CheckMonsterHit(int m, BOOL *ret) return TRUE; } -int __fastcall encode_enemy(int m) +int encode_enemy(int m) { int enemy; @@ -6976,7 +6976,7 @@ int __fastcall encode_enemy(int m) return enemy; } -void __fastcall decode_enemy(int m, int enemy) +void decode_enemy(int m, int enemy) { if (enemy < 4) { monster[m]._mFlags &= ~MFLAG_TARGETS_MONSTER; diff --git a/Source/monster.h b/Source/monster.h index 9eff64e0..d360da3a 100644 --- a/Source/monster.h +++ b/Source/monster.h @@ -14,151 +14,151 @@ extern int monstimgtot; // weak extern int uniquetrans; extern int nummtypes; -void __fastcall InitMonsterTRN(int monst, BOOL special); -void __cdecl InitLevelMonsters(); -int __fastcall AddMonsterType(int type, int placeflag); -void __cdecl GetLevelMTypes(); -void __fastcall InitMonsterGFX(int monst); -void __fastcall ClearMVars(int i); -void __fastcall InitMonster(int i, int rd, int mtype, int x, int y); -void __cdecl ClrAllMonsters(); -BOOL __fastcall MonstPlace(int xp, int yp); -void __fastcall PlaceMonster(int i, int mtype, int x, int y); -void __fastcall PlaceUniqueMonst(int uniqindex, int miniontype, int packsize); -void __cdecl PlaceQuestMonsters(); -void __fastcall PlaceGroup(int mtype, int num, int leaderf, int leader); -void __cdecl LoadDiabMonsts(); -void __cdecl InitMonsters(); -void __cdecl PlaceUniques(); -void __fastcall SetMapMonsters(unsigned char *pMap, int startx, int starty); -void __fastcall DeleteMonster(int i); -int __fastcall AddMonster(int x, int y, int dir, int mtype, int InMap); -void __fastcall NewMonsterAnim(int i, AnimStruct *anim, int md); -BOOL __fastcall M_Ranged(int i); -BOOL __fastcall M_Talker(int i); -void __fastcall M_Enemy(int i); -int __fastcall M_GetDir(int i); -void __fastcall M_CheckEFlag(int i); -void __fastcall M_StartStand(int i, int md); -void __fastcall M_StartDelay(int i, int len); -void __fastcall M_StartSpStand(int i, int md); -void __fastcall M_StartWalk(int i, int xvel, int yvel, int xadd, int yadd, int EndDir); -void __fastcall M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir); -void __fastcall M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir); -void __fastcall M_StartAttack(int i); -void __fastcall M_StartRAttack(int i, int missile_type, int dam); -void __fastcall M_StartRSpAttack(int i, int missile_type, int dam); -void __fastcall M_StartSpAttack(int i); -void __fastcall M_StartEat(int i); -void __fastcall M_ClearSquares(int i); -void __fastcall M_GetKnockback(int i); -void __fastcall M_StartHit(int i, int pnum, int dam); -void __fastcall M_DiabloDeath(int i, BOOL sendmsg); -void __fastcall M2MStartHit(int mid, int i, int dam); -void __fastcall MonstStartKill(int i, int pnum, BOOL sendmsg); -void __fastcall M2MStartKill(int i, int mid); -void __fastcall M_StartKill(int i, int pnum); -void __fastcall M_SyncStartKill(int i, int x, int y, int pnum); -void __fastcall M_StartFadein(int i, int md, BOOL backwards); -void __fastcall M_StartFadeout(int i, int md, BOOL backwards); -void __fastcall M_StartHeal(int i); -void __fastcall M_ChangeLightOffset(int monst); -BOOL __fastcall M_DoStand(int i); -BOOL __fastcall M_DoWalk(int i); -BOOL __fastcall M_DoWalk2(int i); -BOOL __fastcall M_DoWalk3(int i); -void __fastcall M_TryM2MHit(int i, int mid, int hper, int mind, int maxd); -void __fastcall M_TryH2HHit(int i, int pnum, int Hit, int MinDam, int MaxDam); -BOOL __fastcall M_DoAttack(int i); -BOOL __fastcall M_DoRAttack(int i); -int __fastcall M_DoRSpAttack(int i); -BOOL __fastcall M_DoSAttack(int i); -BOOL __fastcall M_DoFadein(int i); -BOOL __fastcall M_DoFadeout(int i); -int __fastcall M_DoHeal(int i); -int __fastcall M_DoTalk(int i); -void __fastcall M_Teleport(int i); -BOOL __fastcall M_DoGotHit(int i); -void __fastcall M_UpdateLeader(int i); -void __cdecl DoEnding(); -void __cdecl PrepDoEnding(); -BOOL __fastcall M_DoDeath(int i); -BOOL __fastcall M_DoSpStand(int i); -BOOL __fastcall M_DoDelay(int i); -BOOL __fastcall M_DoStone(int i); -void __fastcall M_WalkDir(int i, int md); -void __fastcall GroupUnity(int i); -BOOL __fastcall M_CallWalk(int i, int md); -BOOL __fastcall M_PathWalk(int i); -BOOL __fastcall M_CallWalk2(int i, int md); -BOOL __fastcall M_DumbWalk(int i, int md); -BOOLEAN __fastcall M_RoundWalk(int i, int md, int *dir); -void __fastcall MAI_Zombie(int i); -void __fastcall MAI_SkelSd(int i); -BOOL __fastcall MAI_Path(int i); -void __fastcall MAI_Snake(int i); -void __fastcall MAI_Bat(int i); -void __fastcall MAI_SkelBow(int i); -void __fastcall MAI_Fat(int i); -void __fastcall MAI_Sneak(int i); -void __fastcall MAI_Fireman(int i); -void __fastcall MAI_Fallen(int i); -void __fastcall MAI_Cleaver(int i); -void __fastcall MAI_Round(int i, BOOL special); -void __fastcall MAI_GoatMc(int i); -void __fastcall MAI_Ranged(int i, int missile_type, BOOL special); -void __fastcall MAI_GoatBow(int i); -void __fastcall MAI_Succ(int i); -void __fastcall MAI_AcidUniq(int i); -void __fastcall MAI_Scav(int i); -void __fastcall MAI_Garg(int i); -void __fastcall MAI_RoundRanged(int i, int missile_type, unsigned char checkdoors, int dam, int lessmissiles); -void __fastcall MAI_Magma(int i); -void __fastcall MAI_Storm(int i); -void __fastcall MAI_Acid(int i); -void __fastcall MAI_Diablo(int i); -void __fastcall MAI_RR2(int i, int mistype, int dam); -void __fastcall MAI_Mega(int i); -void __fastcall MAI_Golum(int i); -void __fastcall MAI_SkelKing(int i); -void __fastcall MAI_Rhino(int i); -void __fastcall MAI_Counselor(int i); -void __fastcall MAI_Garbud(int i); -void __fastcall MAI_Zhar(int i); -void __fastcall MAI_SnotSpil(int i); -void __fastcall MAI_Lazurus(int i); -void __fastcall MAI_Lazhelp(int i); -void __fastcall MAI_Lachdanan(int i); -void __fastcall MAI_Warlord(int i); -void __cdecl DeleteMonsterList(); -void __cdecl ProcessMonsters(); -void __cdecl FreeMonsters(); -BOOL __fastcall DirOK(int i, int mdir); -BOOL __fastcall PosOkMissile(int x, int y); -BOOL __fastcall CheckNoSolid(int x, int y); -BOOL __fastcall LineClearF(BOOL(__fastcall *Clear)(int, int), int x1, int y1, int x2, int y2); -BOOL __fastcall LineClear(int x1, int y1, int x2, int y2); -BOOL __fastcall LineClearF1(BOOL(__fastcall *Clear)(int, int, int), int monst, int x1, int y1, int x2, int y2); -void __fastcall SyncMonsterAnim(int i); -void __fastcall M_FallenFear(int x, int y); -void __fastcall PrintMonstHistory(int mt); -void __cdecl PrintUniqueHistory(); -void __fastcall MissToMonst(int i, int x, int y); -BOOL __fastcall PosOkMonst(int i, int x, int y); -BOOL __fastcall PosOkMonst2(int i, int x, int y); -BOOL __fastcall PosOkMonst3(int i, int x, int y); -BOOL __fastcall IsSkel(int mt); -BOOL __fastcall IsGoat(int mt); -int __fastcall M_SpawnSkel(int x, int y, int dir); -void __fastcall ActivateSpawn(int i, int x, int y, int dir); -BOOL __fastcall SpawnSkeleton(int ii, int x, int y); -int __cdecl PreSpawnSkeleton(); -void __fastcall TalktoMonster(int i); -void __fastcall SpawnGolum(int i, int x, int y, int mi); -BOOL __fastcall CanTalkToMonst(int m); -BOOL __fastcall CheckMonsterHit(int m, BOOL *ret); -int __fastcall encode_enemy(int m); -void __fastcall decode_enemy(int m, int enemy); +void InitMonsterTRN(int monst, BOOL special); +void InitLevelMonsters(); +int AddMonsterType(int type, int placeflag); +void GetLevelMTypes(); +void InitMonsterGFX(int monst); +void ClearMVars(int i); +void InitMonster(int i, int rd, int mtype, int x, int y); +void ClrAllMonsters(); +BOOL MonstPlace(int xp, int yp); +void PlaceMonster(int i, int mtype, int x, int y); +void PlaceUniqueMonst(int uniqindex, int miniontype, int packsize); +void PlaceQuestMonsters(); +void PlaceGroup(int mtype, int num, int leaderf, int leader); +void LoadDiabMonsts(); +void InitMonsters(); +void PlaceUniques(); +void SetMapMonsters(unsigned char *pMap, int startx, int starty); +void DeleteMonster(int i); +int AddMonster(int x, int y, int dir, int mtype, int InMap); +void NewMonsterAnim(int i, AnimStruct *anim, int md); +BOOL M_Ranged(int i); +BOOL M_Talker(int i); +void M_Enemy(int i); +int M_GetDir(int i); +void M_CheckEFlag(int i); +void M_StartStand(int i, int md); +void M_StartDelay(int i, int len); +void M_StartSpStand(int i, int md); +void M_StartWalk(int i, int xvel, int yvel, int xadd, int yadd, int EndDir); +void M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir); +void M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir); +void M_StartAttack(int i); +void M_StartRAttack(int i, int missile_type, int dam); +void M_StartRSpAttack(int i, int missile_type, int dam); +void M_StartSpAttack(int i); +void M_StartEat(int i); +void M_ClearSquares(int i); +void M_GetKnockback(int i); +void M_StartHit(int i, int pnum, int dam); +void M_DiabloDeath(int i, BOOL sendmsg); +void M2MStartHit(int mid, int i, int dam); +void MonstStartKill(int i, int pnum, BOOL sendmsg); +void M2MStartKill(int i, int mid); +void M_StartKill(int i, int pnum); +void M_SyncStartKill(int i, int x, int y, int pnum); +void M_StartFadein(int i, int md, BOOL backwards); +void M_StartFadeout(int i, int md, BOOL backwards); +void M_StartHeal(int i); +void M_ChangeLightOffset(int monst); +BOOL M_DoStand(int i); +BOOL M_DoWalk(int i); +BOOL M_DoWalk2(int i); +BOOL M_DoWalk3(int i); +void M_TryM2MHit(int i, int mid, int hper, int mind, int maxd); +void M_TryH2HHit(int i, int pnum, int Hit, int MinDam, int MaxDam); +BOOL M_DoAttack(int i); +BOOL M_DoRAttack(int i); +int M_DoRSpAttack(int i); +BOOL M_DoSAttack(int i); +BOOL M_DoFadein(int i); +BOOL M_DoFadeout(int i); +int M_DoHeal(int i); +int M_DoTalk(int i); +void M_Teleport(int i); +BOOL M_DoGotHit(int i); +void M_UpdateLeader(int i); +void DoEnding(); +void PrepDoEnding(); +BOOL M_DoDeath(int i); +BOOL M_DoSpStand(int i); +BOOL M_DoDelay(int i); +BOOL M_DoStone(int i); +void M_WalkDir(int i, int md); +void GroupUnity(int i); +BOOL M_CallWalk(int i, int md); +BOOL M_PathWalk(int i); +BOOL M_CallWalk2(int i, int md); +BOOL M_DumbWalk(int i, int md); +BOOLEAN M_RoundWalk(int i, int md, int *dir); +void MAI_Zombie(int i); +void MAI_SkelSd(int i); +BOOL MAI_Path(int i); +void MAI_Snake(int i); +void MAI_Bat(int i); +void MAI_SkelBow(int i); +void MAI_Fat(int i); +void MAI_Sneak(int i); +void MAI_Fireman(int i); +void MAI_Fallen(int i); +void MAI_Cleaver(int i); +void MAI_Round(int i, BOOL special); +void MAI_GoatMc(int i); +void MAI_Ranged(int i, int missile_type, BOOL special); +void MAI_GoatBow(int i); +void MAI_Succ(int i); +void MAI_AcidUniq(int i); +void MAI_Scav(int i); +void MAI_Garg(int i); +void MAI_RoundRanged(int i, int missile_type, unsigned char checkdoors, int dam, int lessmissiles); +void MAI_Magma(int i); +void MAI_Storm(int i); +void MAI_Acid(int i); +void MAI_Diablo(int i); +void MAI_RR2(int i, int mistype, int dam); +void MAI_Mega(int i); +void MAI_Golum(int i); +void MAI_SkelKing(int i); +void MAI_Rhino(int i); +void MAI_Counselor(int i); +void MAI_Garbud(int i); +void MAI_Zhar(int i); +void MAI_SnotSpil(int i); +void MAI_Lazurus(int i); +void MAI_Lazhelp(int i); +void MAI_Lachdanan(int i); +void MAI_Warlord(int i); +void DeleteMonsterList(); +void ProcessMonsters(); +void FreeMonsters(); +BOOL DirOK(int i, int mdir); +BOOL PosOkMissile(int x, int y); +BOOL CheckNoSolid(int x, int y); +BOOL LineClearF(BOOL(*Clear)(int, int), int x1, int y1, int x2, int y2); +BOOL LineClear(int x1, int y1, int x2, int y2); +BOOL LineClearF1(BOOL(*Clear)(int, int, int), int monst, int x1, int y1, int x2, int y2); +void SyncMonsterAnim(int i); +void M_FallenFear(int x, int y); +void PrintMonstHistory(int mt); +void PrintUniqueHistory(); +void MissToMonst(int i, int x, int y); +BOOL PosOkMonst(int i, int x, int y); +BOOL PosOkMonst2(int i, int x, int y); +BOOL PosOkMonst3(int i, int x, int y); +BOOL IsSkel(int mt); +BOOL IsGoat(int mt); +int M_SpawnSkel(int x, int y, int dir); +void ActivateSpawn(int i, int x, int y, int dir); +BOOL SpawnSkeleton(int ii, int x, int y); +int PreSpawnSkeleton(); +void TalktoMonster(int i); +void SpawnGolum(int i, int x, int y, int mi); +BOOL CanTalkToMonst(int m); +BOOL CheckMonsterHit(int m, BOOL *ret); +int encode_enemy(int m); +void decode_enemy(int m, int enemy); /* rdata */ @@ -186,6 +186,6 @@ extern int rnd20[4]; extern int rnd60[4]; // -extern void(__fastcall *AiProc[])(int i); +extern void(*AiProc[])(int i); #endif /* __MONSTER_H__ */ diff --git a/Source/movie.cpp b/Source/movie.cpp index cb24d0bf..380d07fd 100644 --- a/Source/movie.cpp +++ b/Source/movie.cpp @@ -5,7 +5,7 @@ BYTE movie_playing; BOOL loop_movie; -void __fastcall play_movie(char *pszMovie, BOOL user_can_close) +void play_movie(char *pszMovie, BOOL user_can_close) { WNDPROC saveProc; HANDLE video_stream; diff --git a/Source/movie.h b/Source/movie.h index 0b39f2d7..03fcab32 100644 --- a/Source/movie.h +++ b/Source/movie.h @@ -5,7 +5,7 @@ extern BYTE movie_playing; extern BOOL loop_movie; -void __fastcall play_movie(char *pszMovie, BOOL user_can_close); +void play_movie(char *pszMovie, BOOL user_can_close); LRESULT __stdcall MovieWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); /* rdata */ diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp index 65b3a9f0..5133fbe6 100644 --- a/Source/mpqapi.cpp +++ b/Source/mpqapi.cpp @@ -15,7 +15,7 @@ BOOLEAN save_archive_open; // weak HANDLE sghArchive = (HANDLE)0xFFFFFFFF; // idb -BOOL __fastcall mpqapi_set_hidden(const char *pszArchive, BOOL hidden) +BOOL mpqapi_set_hidden(const char *pszArchive, BOOL hidden) { DWORD dwFileAttributes; DWORD dwFileAttributesToSet; @@ -30,7 +30,7 @@ BOOL __fastcall mpqapi_set_hidden(const char *pszArchive, BOOL hidden) return SetFileAttributes(pszArchive, dwFileAttributesToSet); } -void __fastcall mpqapi_store_creation_time(const char *pszArchive, int dwChar) +void mpqapi_store_creation_time(const char *pszArchive, int dwChar) { int v2; // esi const char *v3; // ebx @@ -55,7 +55,7 @@ void __fastcall mpqapi_store_creation_time(const char *pszArchive, int dwChar) } // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall mpqapi_reg_load_modification_time(char *dst, int size) +BOOL mpqapi_reg_load_modification_time(char *dst, int size) { unsigned int iSize; char *pszDst; @@ -81,7 +81,7 @@ BOOL __fastcall mpqapi_reg_load_modification_time(char *dst, int size) return TRUE; } -void __fastcall mpqapi_xor_buf(char *pbData) +void mpqapi_xor_buf(char *pbData) { signed int v1; // eax char *v2; // esi @@ -98,11 +98,11 @@ void __fastcall mpqapi_xor_buf(char *pbData) } while (v3); } -void __fastcall mpqapi_update_multi_creation_time(DWORD dwChar) +void mpqapi_update_multi_creation_time(DWORD dwChar) { } -BOOLEAN __fastcall mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen) +BOOLEAN mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen) { char *pbCurrentData; DWORD i; @@ -122,7 +122,7 @@ BOOLEAN __fastcall mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen) return SRegSaveData("Diablo", "Video Player ", 0, (unsigned char *)pbData, dwLen); } -void __fastcall mpqapi_remove_hash_entry(const char *pszName) +void mpqapi_remove_hash_entry(const char *pszName) { int v1; // eax _HASHENTRY *v2; // ecx @@ -144,7 +144,7 @@ void __fastcall mpqapi_remove_hash_entry(const char *pszName) } // 65AB0C: using guessed type int save_archive_modified; -void __fastcall mpqapi_free_block(int block_offset, int block_size) +void mpqapi_free_block(int block_offset, int block_size) { int v2; // esi int v3; // edi @@ -194,7 +194,7 @@ LABEL_2: } } -_BLOCKENTRY *__fastcall mpqapi_new_block(int *block_index) +_BLOCKENTRY *mpqapi_new_block(int *block_index) { _BLOCKENTRY *result; // eax unsigned int v2; // edx @@ -214,12 +214,12 @@ _BLOCKENTRY *__fastcall mpqapi_new_block(int *block_index) return result; } -int __fastcall mpqapi_get_hash_index_of_path(const char *pszName) // FetchHandle +int mpqapi_get_hash_index_of_path(const char *pszName) // FetchHandle { return mpqapi_get_hash_index(Hash(pszName, 0), Hash(pszName, 1), Hash(pszName, 2), 0); } -int __fastcall mpqapi_get_hash_index(short index, int hash_a, int hash_b, int locale) +int mpqapi_get_hash_index(short index, int hash_a, int hash_b, int locale) { int v4; // ecx signed int v5; // eax @@ -247,7 +247,7 @@ int __fastcall mpqapi_get_hash_index(short index, int hash_a, int hash_b, int lo return i; } -void __fastcall mpqapi_remove_hash_entries(BOOL(__stdcall *fnGetName)(DWORD, char *)) +void mpqapi_remove_hash_entries(BOOL(__stdcall *fnGetName)(DWORD, char *)) { DWORD dwIndex; BOOL i; @@ -259,7 +259,7 @@ void __fastcall mpqapi_remove_hash_entries(BOOL(__stdcall *fnGetName)(DWORD, cha } } -BOOL __fastcall mpqapi_write_file(const char *pszName, const BYTE *pbData, DWORD dwLen) +BOOL mpqapi_write_file(const char *pszName, const BYTE *pbData, DWORD dwLen) { _BLOCKENTRY *blockEntry; @@ -274,7 +274,7 @@ BOOL __fastcall mpqapi_write_file(const char *pszName, const BYTE *pbData, DWORD } // 65AB0C: using guessed type int save_archive_modified; -_BLOCKENTRY *__fastcall mpqapi_add_file(const char *pszName, _BLOCKENTRY *pBlk, int block_index) +_BLOCKENTRY *mpqapi_add_file(const char *pszName, _BLOCKENTRY *pBlk, int block_index) { const char *v3; // edi short v4; // si @@ -318,7 +318,7 @@ _BLOCKENTRY *__fastcall mpqapi_add_file(const char *pszName, _BLOCKENTRY *pBlk, return v12; } -BOOL __fastcall mpqapi_write_file_contents(const char *pszName, const BYTE *pbData, int dwLen, _BLOCKENTRY *pBlk) +BOOL mpqapi_write_file_contents(const char *pszName, const BYTE *pbData, int dwLen, _BLOCKENTRY *pBlk) { const char *v4; // esi const char *v5; // eax @@ -414,7 +414,7 @@ BOOL __fastcall mpqapi_write_file_contents(const char *pszName, const BYTE *pbDa return 1; } -int __fastcall mpqapi_find_free_block(int size, int *block_size) +int mpqapi_find_free_block(int size, int *block_size) { _BLOCKENTRY *v2; // eax signed int v3; // esi @@ -448,7 +448,7 @@ int __fastcall mpqapi_find_free_block(int size, int *block_size) return v5; } -void __fastcall mpqapi_rename(char *pszOld, char *pszNew) +void mpqapi_rename(char *pszOld, char *pszNew) { int index, block; _HASHENTRY *hashEntry; @@ -466,12 +466,12 @@ void __fastcall mpqapi_rename(char *pszOld, char *pszNew) } // 65AB0C: using guessed type int save_archive_modified; -BOOL __fastcall mpqapi_has_file(const char *pszName) +BOOL mpqapi_has_file(const char *pszName) { return mpqapi_get_hash_index_of_path(pszName) != -1; } -BOOL __fastcall mpqapi_open_archive(const char *pszArchive, BOOL hidden, int dwChar) // OpenMPQ +BOOL mpqapi_open_archive(const char *pszArchive, BOOL hidden, int dwChar) // OpenMPQ { const char *v3; // ebp BOOL v4; // esi @@ -532,7 +532,7 @@ BOOL __fastcall mpqapi_open_archive(const char *pszArchive, BOOL hidden, int dwC // 65AB14: using guessed type char save_archive_open; // 679660: using guessed type char gbMaxPlayers; -BOOLEAN __fastcall mpqapi_parse_archive_header(_FILEHEADER *pHdr, int *pdwNextFileStart) // ParseMPQHeader +BOOLEAN mpqapi_parse_archive_header(_FILEHEADER *pHdr, int *pdwNextFileStart) // ParseMPQHeader { int *v2; // ebp _FILEHEADER *v3; // esi @@ -574,7 +574,7 @@ BOOLEAN __fastcall mpqapi_parse_archive_header(_FILEHEADER *pHdr, int *pdwNextFi // 65AB0C: using guessed type int save_archive_modified; // 65AB14: using guessed type char save_archive_open; -void __fastcall mpqapi_close_archive(const char *pszArchive, BOOL bFree, int dwChar) // CloseMPQ +void mpqapi_close_archive(const char *pszArchive, BOOL bFree, int dwChar) // CloseMPQ { _BLOCKENTRY *blockEntry; _HASHENTRY *hashEntry; @@ -603,7 +603,7 @@ void __fastcall mpqapi_close_archive(const char *pszArchive, BOOL bFree, int dwC // 65AB0C: using guessed type int save_archive_modified; // 65AB14: using guessed type char save_archive_open; -void __fastcall mpqapi_store_modified_time(const char *pszArchive, int dwChar) +void mpqapi_store_modified_time(const char *pszArchive, int dwChar) { int v2; // esi const char *v3; // ebx @@ -628,7 +628,7 @@ void __fastcall mpqapi_store_modified_time(const char *pszArchive, int dwChar) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, int dwChar) +void mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, int dwChar) { if (sghArchive != (HANDLE)-1) { if (save_archive_modified) { @@ -644,7 +644,7 @@ void __fastcall mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, int d } // 65AB0C: using guessed type int save_archive_modified; -BOOLEAN __cdecl mpqapi_write_header() // WriteMPQHeader +BOOLEAN mpqapi_write_header() // WriteMPQHeader { BOOLEAN result; // al _FILEHEADER fhdr; // [esp+8h] [ebp-6Ch] @@ -667,7 +667,7 @@ BOOLEAN __cdecl mpqapi_write_header() // WriteMPQHeader return result; } -BOOLEAN __cdecl mpqapi_write_block_table() +BOOLEAN mpqapi_write_block_table() { int v1; // eax BOOL v2; // ebx @@ -684,7 +684,7 @@ BOOLEAN __cdecl mpqapi_write_block_table() return v2 && NumberOfBytesWritten == 0x8000; } -BOOLEAN __cdecl mpqapi_write_hash_table() +BOOLEAN mpqapi_write_hash_table() { int v1; // eax BOOL v2; // ebx @@ -701,7 +701,7 @@ BOOLEAN __cdecl mpqapi_write_hash_table() return v2 && NumberOfBytesWritten == 0x8000; } -BOOLEAN __cdecl mpqapi_can_seek() +BOOLEAN mpqapi_can_seek() { BOOLEAN result; // al diff --git a/Source/mpqapi.h b/Source/mpqapi.h index ff46804c..513ebf26 100644 --- a/Source/mpqapi.h +++ b/Source/mpqapi.h @@ -6,34 +6,34 @@ extern char mpq_buf[4096]; extern BOOL save_archive_modified; // weak extern BOOLEAN save_archive_open; // weak -BOOL __fastcall mpqapi_set_hidden(const char *pszArchive, BOOL hidden); -void __fastcall mpqapi_store_creation_time(const char *pszArchive, int dwChar); -BOOL __fastcall mpqapi_reg_load_modification_time(char *dst, int size); -void __fastcall mpqapi_xor_buf(char *pbData); -void __fastcall mpqapi_update_multi_creation_time(DWORD dwChar); -BOOLEAN __fastcall mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen); -_BLOCKENTRY *__fastcall j_mpqapi_remove_hash_entry(char *pszName); -void __fastcall mpqapi_remove_hash_entry(const char *pszName); -void __fastcall mpqapi_free_block(int block_offset, int block_size); -_BLOCKENTRY *__fastcall mpqapi_new_block(int *block_index); -int __fastcall mpqapi_get_hash_index_of_path(const char *pszName); -int __fastcall mpqapi_get_hash_index(short index, int hash_a, int hash_b, int locale); -void __fastcall mpqapi_remove_hash_entries(BOOL(__stdcall *fnGetName)(DWORD, char *)); -BOOL __fastcall mpqapi_write_file(const char *pszName, const BYTE *pbData, DWORD dwLen); -_BLOCKENTRY *__fastcall mpqapi_add_file(const char *pszName, _BLOCKENTRY *pBlk, int block_index); -BOOL __fastcall mpqapi_write_file_contents(const char *pszName, const BYTE *pbData, int dwLen, _BLOCKENTRY *pBlk); -int __fastcall mpqapi_find_free_block(int size, int *block_size); -void __fastcall mpqapi_rename(char *pszOld, char *pszNew); -BOOL __fastcall mpqapi_has_file(const char *pszName); -BOOL __fastcall mpqapi_open_archive(const char *pszArchive, BOOL hidden, int dwChar); -BOOLEAN __fastcall mpqapi_parse_archive_header(_FILEHEADER *pHdr, int *pdwNextFileStart); -void __fastcall mpqapi_close_archive(const char *pszArchive, BOOL bFree, int dwChar); -void __fastcall mpqapi_store_modified_time(const char *pszArchive, int dwChar); -void __fastcall mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, int dwChar); -BOOLEAN __cdecl mpqapi_write_header(); -BOOLEAN __cdecl mpqapi_write_block_table(); -BOOLEAN __cdecl mpqapi_write_hash_table(); -BOOLEAN __cdecl mpqapi_can_seek(); +BOOL mpqapi_set_hidden(const char *pszArchive, BOOL hidden); +void mpqapi_store_creation_time(const char *pszArchive, int dwChar); +BOOL mpqapi_reg_load_modification_time(char *dst, int size); +void mpqapi_xor_buf(char *pbData); +void mpqapi_update_multi_creation_time(DWORD dwChar); +BOOLEAN mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen); +_BLOCKENTRY *j_mpqapi_remove_hash_entry(char *pszName); +void mpqapi_remove_hash_entry(const char *pszName); +void mpqapi_free_block(int block_offset, int block_size); +_BLOCKENTRY *mpqapi_new_block(int *block_index); +int mpqapi_get_hash_index_of_path(const char *pszName); +int mpqapi_get_hash_index(short index, int hash_a, int hash_b, int locale); +void mpqapi_remove_hash_entries(BOOL(__stdcall *fnGetName)(DWORD, char *)); +BOOL mpqapi_write_file(const char *pszName, const BYTE *pbData, DWORD dwLen); +_BLOCKENTRY *mpqapi_add_file(const char *pszName, _BLOCKENTRY *pBlk, int block_index); +BOOL mpqapi_write_file_contents(const char *pszName, const BYTE *pbData, int dwLen, _BLOCKENTRY *pBlk); +int mpqapi_find_free_block(int size, int *block_size); +void mpqapi_rename(char *pszOld, char *pszNew); +BOOL mpqapi_has_file(const char *pszName); +BOOL mpqapi_open_archive(const char *pszArchive, BOOL hidden, int dwChar); +BOOLEAN mpqapi_parse_archive_header(_FILEHEADER *pHdr, int *pdwNextFileStart); +void mpqapi_close_archive(const char *pszArchive, BOOL bFree, int dwChar); +void mpqapi_store_modified_time(const char *pszArchive, int dwChar); +void mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, int dwChar); +BOOLEAN mpqapi_write_header(); +BOOLEAN mpqapi_write_block_table(); +BOOLEAN mpqapi_write_hash_table(); +BOOLEAN mpqapi_can_seek(); /* rdata */ diff --git a/Source/msg.cpp b/Source/msg.cpp index c242f2f1..a025569f 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -19,7 +19,7 @@ BOOL deltaload; BYTE gbBufferMsgs; int pkt_counter; -void __fastcall msg_send_drop_pkt(int pnum, int reason) +void msg_send_drop_pkt(int pnum, int reason) { TFakeDropPlr cmd; @@ -29,7 +29,7 @@ void __fastcall msg_send_drop_pkt(int pnum, int reason) msg_send_packet(pnum, &cmd, sizeof(cmd)); } -void __fastcall msg_send_packet(int pnum, const void *packet, DWORD dwSize) +void msg_send_packet(int pnum, const void *packet, DWORD dwSize) { TMegaPkt *packeta; TFakeCmdPlr cmd; @@ -50,7 +50,7 @@ void __fastcall msg_send_packet(int pnum, const void *packet, DWORD dwSize) } // 65AB24: using guessed type int sgnCurrMegaPlayer; -TMegaPkt *__cdecl msg_get_next_packet() +TMegaPkt *msg_get_next_packet() { TMegaPkt *result; @@ -67,7 +67,7 @@ TMegaPkt *__cdecl msg_get_next_packet() return result; } -BOOL __cdecl msg_wait_resync() +BOOL msg_wait_resync() { BOOL success; @@ -104,7 +104,7 @@ BOOL __cdecl msg_wait_resync() // 676194: using guessed type char gbBufferMsgs; // 67862D: using guessed type char gbGameDestroyed; -void __cdecl msg_free_packets() +void msg_free_packets() { TMegaPkt *tmp; @@ -117,7 +117,7 @@ void __cdecl msg_free_packets() } } -int __cdecl msg_wait_for_turns() +int msg_wait_for_turns() { int recieved; DWORD turns; @@ -155,7 +155,7 @@ int __cdecl msg_wait_for_turns() // 6796E4: using guessed type char gbDeltaSender; // 679738: using guessed type int gdwTurnsInTransit; -void __cdecl msg_process_net_packets() +void msg_process_net_packets() { if (gbMaxPlayers != 1) { gbBufferMsgs = 2; @@ -167,7 +167,7 @@ void __cdecl msg_process_net_packets() // 676194: using guessed type char gbBufferMsgs; // 679660: using guessed type char gbMaxPlayers; -void __cdecl msg_pre_packet() +void msg_pre_packet() { int i; int spaceLeft, pktSize; @@ -199,7 +199,7 @@ void __cdecl msg_pre_packet() } } -void __fastcall DeltaExportData(int pnum) +void DeltaExportData(int pnum) { BYTE *dst, *dstEnd; int size, i; @@ -225,7 +225,7 @@ void __fastcall DeltaExportData(int pnum) dthread_send_delta(pnum, CMD_DLEVEL_END, &src, 1); } -BYTE *__fastcall DeltaExportItem(BYTE *dst, TCmdPItem *src) +BYTE *DeltaExportItem(BYTE *dst, TCmdPItem *src) { int i; @@ -243,13 +243,13 @@ BYTE *__fastcall DeltaExportItem(BYTE *dst, TCmdPItem *src) return dst; } -BYTE *__fastcall DeltaExportObject(BYTE *dst, DObjectStr *src) +BYTE *DeltaExportObject(BYTE *dst, DObjectStr *src) { memcpy(dst, src, sizeof(DObjectStr) * MAXOBJECTS); return dst + sizeof(DObjectStr) * MAXOBJECTS; } -BYTE *__fastcall DeltaExportMonster(BYTE *dst, DMonsterStr *src) +BYTE *DeltaExportMonster(BYTE *dst, DMonsterStr *src) { int i; @@ -267,7 +267,7 @@ BYTE *__fastcall DeltaExportMonster(BYTE *dst, DMonsterStr *src) return dst; } -BYTE *__fastcall DeltaExportJunk(BYTE *dst) +BYTE *DeltaExportJunk(BYTE *dst) { int i; MultiQuests *mq; @@ -298,7 +298,7 @@ BYTE *__fastcall DeltaExportJunk(BYTE *dst) return dst; } -int __fastcall msg_comp_level(BYTE *buffer, BYTE *end) +int msg_comp_level(BYTE *buffer, BYTE *end) { int size, pkSize; @@ -309,7 +309,7 @@ int __fastcall msg_comp_level(BYTE *buffer, BYTE *end) return pkSize + 1; } -void __cdecl delta_init() +void delta_init() { sgbDeltaChanged = FALSE; memset(&sgJunk, 0xFF, sizeof(sgJunk)); @@ -319,7 +319,7 @@ void __cdecl delta_init() } // 676190: using guessed type int deltaload; -void __fastcall delta_kill_monster(int mi, BYTE x, BYTE y, BYTE bLevel) +void delta_kill_monster(int mi, BYTE x, BYTE y, BYTE bLevel) { DMonsterStr *pD; @@ -334,7 +334,7 @@ void __fastcall delta_kill_monster(int mi, BYTE x, BYTE y, BYTE bLevel) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall delta_monster_hp(int mi, int hp, BYTE bLevel) +void delta_monster_hp(int mi, int hp, BYTE bLevel) { DMonsterStr *pD; @@ -347,7 +347,7 @@ void __fastcall delta_monster_hp(int mi, int hp, BYTE bLevel) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall delta_sync_monster(const TSyncMonster *pSync, BYTE bLevel) +void delta_sync_monster(const TSyncMonster *pSync, BYTE bLevel) { DMonsterStr *pD; @@ -369,7 +369,7 @@ void __fastcall delta_sync_monster(const TSyncMonster *pSync, BYTE bLevel) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall delta_sync_golem(TCmdGolem *pG, int pnum, BYTE bLevel) +void delta_sync_golem(TCmdGolem *pG, int pnum, BYTE bLevel) { DMonsterStr *pD; @@ -386,7 +386,7 @@ void __fastcall delta_sync_golem(TCmdGolem *pG, int pnum, BYTE bLevel) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall delta_leave_sync(BYTE bLevel) +void delta_leave_sync(BYTE bLevel) { int i, ma; DMonsterStr *pD; @@ -416,17 +416,17 @@ void __fastcall delta_leave_sync(BYTE bLevel) // 43C17D: could not find valid save-restore pair for edi // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall delta_portal_inited(int i) +BOOL delta_portal_inited(int i) { return sgJunk.portal[i].x == 0xFF; } -BOOL __fastcall delta_quest_inited(int i) +BOOL delta_quest_inited(int i) { return sgJunk.quests[i].qstate != 0xFF; } -void __fastcall DeltaAddItem(int ii) +void DeltaAddItem(int ii) { int i; TCmdPItem *pD; @@ -468,7 +468,7 @@ void __fastcall DeltaAddItem(int ii) } // 679660: using guessed type char gbMaxPlayers; -void __cdecl DeltaSaveLevel() +void DeltaSaveLevel() { int i; @@ -483,7 +483,7 @@ void __cdecl DeltaSaveLevel() } // 679660: using guessed type char gbMaxPlayers; -void __cdecl DeltaLoadLevel() +void DeltaLoadLevel() { int ii, ot; int i, j, k, l; @@ -634,7 +634,7 @@ void __cdecl DeltaLoadLevel() } // 679660: using guessed type char gbMaxPlayers; -void __fastcall NetSendCmd(BOOL bHiPri, BYTE bCmd) +void NetSendCmd(BOOL bHiPri, BYTE bCmd) { TCmd cmd; @@ -645,7 +645,7 @@ void __fastcall NetSendCmd(BOOL bHiPri, BYTE bCmd) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdGolem(BYTE mx, BYTE my, BYTE dir, BYTE menemy, int hp, BYTE cl) +void NetSendCmdGolem(BYTE mx, BYTE my, BYTE dir, BYTE menemy, int hp, BYTE cl) { TCmdGolem cmd; @@ -659,7 +659,7 @@ void __fastcall NetSendCmdGolem(BYTE mx, BYTE my, BYTE dir, BYTE menemy, int hp, NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdLoc(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y) +void NetSendCmdLoc(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y) { TCmdLoc cmd; @@ -672,7 +672,7 @@ void __fastcall NetSendCmdLoc(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdLocParam1(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1) +void NetSendCmdLocParam1(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1) { TCmdLocParam1 cmd; @@ -686,7 +686,7 @@ void __fastcall NetSendCmdLocParam1(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdLocParam2(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2) +void NetSendCmdLocParam2(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2) { TCmdLocParam2 cmd; @@ -701,7 +701,7 @@ void __fastcall NetSendCmdLocParam2(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdLocParam3(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2, WORD wParam3) +void NetSendCmdLocParam3(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2, WORD wParam3) { TCmdLocParam3 cmd; @@ -717,7 +717,7 @@ void __fastcall NetSendCmdLocParam3(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdParam1(BOOL bHiPri, BYTE bCmd, WORD wParam1) +void NetSendCmdParam1(BOOL bHiPri, BYTE bCmd, WORD wParam1) { TCmdParam1 cmd; @@ -729,7 +729,7 @@ void __fastcall NetSendCmdParam1(BOOL bHiPri, BYTE bCmd, WORD wParam1) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdParam2(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2) +void NetSendCmdParam2(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2) { TCmdParam2 cmd; @@ -742,7 +742,7 @@ void __fastcall NetSendCmdParam2(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wPar NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdParam3(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2, WORD wParam3) +void NetSendCmdParam3(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2, WORD wParam3) { TCmdParam3 cmd; @@ -756,7 +756,7 @@ void __fastcall NetSendCmdParam3(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wPar NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdQuest(BOOL bHiPri, BYTE q) +void NetSendCmdQuest(BOOL bHiPri, BYTE q) { TCmdQuest cmd; @@ -771,7 +771,7 @@ void __fastcall NetSendCmdQuest(BOOL bHiPri, BYTE q) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdGItem(BOOL bHiPri, BYTE bCmd, BYTE mast, BYTE pnum, BYTE ii) +void NetSendCmdGItem(BOOL bHiPri, BYTE bCmd, BYTE mast, BYTE pnum, BYTE ii) { TCmdGItem cmd; @@ -812,7 +812,7 @@ void __fastcall NetSendCmdGItem(BOOL bHiPri, BYTE bCmd, BYTE mast, BYTE pnum, BY NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdGItem2(BOOL usonly, BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p) +void NetSendCmdGItem2(BOOL usonly, BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p) { int ticks; TCmdGItem cmd; @@ -838,7 +838,7 @@ void __fastcall NetSendCmdGItem2(BOOL usonly, BYTE bCmd, BYTE mast, BYTE pnum, T multi_msg_add((BYTE *)&cmd.bCmd, sizeof(cmd)); } -BOOL __fastcall NetSendCmdReq2(BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p) +BOOL NetSendCmdReq2(BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p) { int ticks; TCmdGItem cmd; @@ -860,7 +860,7 @@ BOOL __fastcall NetSendCmdReq2(BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p) return TRUE; } -void __fastcall NetSendCmdExtra(TCmdGItem *p) +void NetSendCmdExtra(TCmdGItem *p) { TCmdGItem cmd; @@ -870,7 +870,7 @@ void __fastcall NetSendCmdExtra(TCmdGItem *p) NetSendHiPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdPItem(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y) +void NetSendCmdPItem(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y) { TCmdPItem cmd; @@ -906,7 +906,7 @@ void __fastcall NetSendCmdPItem(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdChItem(BOOL bHiPri, BYTE bLoc) +void NetSendCmdChItem(BOOL bHiPri, BYTE bLoc) { TCmdChItem cmd; @@ -923,7 +923,7 @@ void __fastcall NetSendCmdChItem(BOOL bHiPri, BYTE bLoc) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdDelItem(BOOL bHiPri, BYTE bLoc) +void NetSendCmdDelItem(BOOL bHiPri, BYTE bLoc) { TCmdDelItem cmd; @@ -935,7 +935,7 @@ void __fastcall NetSendCmdDelItem(BOOL bHiPri, BYTE bLoc) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdDItem(BOOL bHiPri, int ii) +void NetSendCmdDItem(BOOL bHiPri, int ii) { TCmdPItem cmd; @@ -971,7 +971,7 @@ void __fastcall NetSendCmdDItem(BOOL bHiPri, int ii) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdDamage(BOOL bHiPri, BYTE bPlr, DWORD dwDam) +void NetSendCmdDamage(BOOL bHiPri, BYTE bPlr, DWORD dwDam) { TCmdDamage cmd; @@ -984,7 +984,7 @@ void __fastcall NetSendCmdDamage(BOOL bHiPri, BYTE bPlr, DWORD dwDam) NetSendLoPri((BYTE *)&cmd, sizeof(cmd)); } -void __fastcall NetSendCmdString(int pmask, const char *pszStr) +void NetSendCmdString(int pmask, const char *pszStr) { int dwStrLen; TCmdString cmd; @@ -995,13 +995,13 @@ void __fastcall NetSendCmdString(int pmask, const char *pszStr) multi_send_msg_packet(pmask, (BYTE *)&cmd.bCmd, dwStrLen + 2); } -void __fastcall RemovePlrPortal(int pnum) +void RemovePlrPortal(int pnum) { memset(&sgJunk.portal[pnum], 0xFF, sizeof(sgJunk.portal[pnum])); sgbDeltaChanged = TRUE; } -int __fastcall ParseCmd(int pnum, TCmd *pCmd) +int ParseCmd(int pnum, TCmd *pCmd) { sbLastCmd = pCmd->bCmd; if (sgwPackPlrOffsetTbl[pnum] != 0 && sbLastCmd != CMD_ACK_PLRINFO && sbLastCmd != CMD_SEND_PLRINFO) @@ -1169,7 +1169,7 @@ int __fastcall ParseCmd(int pnum, TCmd *pCmd) // 67618D: using guessed type char sgbDeltaChunks; // 6796E4: using guessed type char gbDeltaSender; -int __fastcall On_DLEVEL(int pnum, TCmdPlrInfoHdr *pCmd) +int On_DLEVEL(int pnum, TCmdPlrInfoHdr *pCmd) { if ((unsigned char)gbDeltaSender == pnum) { if (sgbRecvCmd != CMD_DLEVEL_END) { @@ -1207,7 +1207,7 @@ int __fastcall On_DLEVEL(int pnum, TCmdPlrInfoHdr *pCmd) return pCmd->wBytes + 5; } -void __fastcall DeltaImportData(BYTE cmd, DWORD recv_offset) +void DeltaImportData(BYTE cmd, DWORD recv_offset) { BYTE i; BYTE *src; @@ -1232,7 +1232,7 @@ void __fastcall DeltaImportData(BYTE cmd, DWORD recv_offset) } // 67618D: using guessed type char sgbDeltaChunks; -BYTE *__fastcall DeltaImportItem(BYTE *src, TCmdPItem *dst) +BYTE *DeltaImportItem(BYTE *src, TCmdPItem *dst) { int i; @@ -1250,13 +1250,13 @@ BYTE *__fastcall DeltaImportItem(BYTE *src, TCmdPItem *dst) return src; } -BYTE *__fastcall DeltaImportObject(BYTE *src, DObjectStr *dst) +BYTE *DeltaImportObject(BYTE *src, DObjectStr *dst) { memcpy(dst, src, sizeof(DObjectStr) * MAXOBJECTS); return src + sizeof(DObjectStr) * MAXOBJECTS; } -BYTE *__fastcall DeltaImportMonster(BYTE *src, DMonsterStr *dst) +BYTE *DeltaImportMonster(BYTE *src, DMonsterStr *dst) { int i; @@ -1274,7 +1274,7 @@ BYTE *__fastcall DeltaImportMonster(BYTE *src, DMonsterStr *dst) return src; } -void __fastcall DeltaImportJunk(BYTE *src) +void DeltaImportJunk(BYTE *src) { int i; @@ -1307,12 +1307,12 @@ void __fastcall DeltaImportJunk(BYTE *src) } } -int __fastcall On_SYNCDATA(void *packet, int pnum) +int On_SYNCDATA(void *packet, int pnum) { return sync_update(pnum, (const BYTE *)packet); } -int __fastcall On_WALKXY(TCmdLoc *pCmd, int pnum) +int On_WALKXY(TCmdLoc *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { ClrPlrPath(pnum); @@ -1323,7 +1323,7 @@ int __fastcall On_WALKXY(TCmdLoc *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ADDSTR(TCmdParam1 *pCmd, int pnum) +int On_ADDSTR(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1333,7 +1333,7 @@ int __fastcall On_ADDSTR(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ADDMAG(TCmdParam1 *pCmd, int pnum) +int On_ADDMAG(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1343,7 +1343,7 @@ int __fastcall On_ADDMAG(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ADDDEX(TCmdParam1 *pCmd, int pnum) +int On_ADDDEX(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1353,7 +1353,7 @@ int __fastcall On_ADDDEX(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ADDVIT(TCmdParam1 *pCmd, int pnum) +int On_ADDVIT(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1363,7 +1363,7 @@ int __fastcall On_ADDVIT(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SBSPELL(TCmdParam1 *pCmd, int pnum) +int On_SBSPELL(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1) { if (currlevel != 0 || spelldata[pCmd->wParam1].sTownSpell) { @@ -1378,7 +1378,7 @@ int __fastcall On_SBSPELL(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -void msg_errorf(const char *pszFmt, ...) +void __cdecl msg_errorf(const char *pszFmt, ...) { static DWORD msg_err_timer; DWORD ticks; @@ -1395,7 +1395,7 @@ void msg_errorf(const char *pszFmt, ...) va_end(va); } -int __fastcall On_GOTOGETITEM(TCmdLocParam1 *pCmd, int pnum) +int On_GOTOGETITEM(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { MakePlrPath(pnum, pCmd->x, pCmd->y, FALSE); @@ -1406,7 +1406,7 @@ int __fastcall On_GOTOGETITEM(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_REQUESTGITEM(TCmdGItem *pCmd, int pnum) +int On_REQUESTGITEM(TCmdGItem *pCmd, int pnum) { if (gbBufferMsgs != 1 && i_own_level(plr[pnum].plrlevel)) { if (GetItemRecord(pCmd->dwSeed, pCmd->wCI, pCmd->wIndx)) { @@ -1426,7 +1426,7 @@ int __fastcall On_REQUESTGITEM(TCmdGItem *pCmd, int pnum) return sizeof(*pCmd); } -BOOL __fastcall i_own_level(int nReqLevel) +BOOL i_own_level(int nReqLevel) { int i; @@ -1442,7 +1442,7 @@ BOOL __fastcall i_own_level(int nReqLevel) } // 676194: using guessed type char gbBufferMsgs; -int __fastcall On_GETITEM(TCmdGItem *pCmd, int pnum) +int On_GETITEM(TCmdGItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1467,7 +1467,7 @@ int __fastcall On_GETITEM(TCmdGItem *pCmd, int pnum) return sizeof(*pCmd); } -BOOL __fastcall delta_get_item(TCmdGItem *pI, BYTE bLevel) +BOOL delta_get_item(TCmdGItem *pI, BYTE bLevel) { BOOL result; TCmdPItem *pD; @@ -1525,7 +1525,7 @@ BOOL __fastcall delta_get_item(TCmdGItem *pI, BYTE bLevel) } // 679660: using guessed type char gbMaxPlayers; -int __fastcall On_GOTOAGETITEM(TCmdLocParam1 *pCmd, int pnum) +int On_GOTOAGETITEM(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { MakePlrPath(pnum, pCmd->x, pCmd->y, FALSE); @@ -1536,7 +1536,7 @@ int __fastcall On_GOTOAGETITEM(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_REQUESTAGITEM(TCmdGItem *pCmd, int pnum) +int On_REQUESTAGITEM(TCmdGItem *pCmd, int pnum) { if (gbBufferMsgs != 1 && i_own_level(plr[pnum].plrlevel)) { if (GetItemRecord(pCmd->dwSeed, pCmd->wCI, pCmd->wIndx)) { @@ -1556,7 +1556,7 @@ int __fastcall On_REQUESTAGITEM(TCmdGItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_AGETITEM(TCmdGItem *pCmd, int pnum) +int On_AGETITEM(TCmdGItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1581,7 +1581,7 @@ int __fastcall On_AGETITEM(TCmdGItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ITEMEXTRA(TCmdGItem *pCmd, int pnum) +int On_ITEMEXTRA(TCmdGItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1594,7 +1594,7 @@ int __fastcall On_ITEMEXTRA(TCmdGItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_PUTITEM(TCmdPItem *pCmd, int pnum) +int On_PUTITEM(TCmdPItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1619,7 +1619,7 @@ int __fastcall On_PUTITEM(TCmdPItem *pCmd, int pnum) return sizeof(*pCmd); } -void __fastcall delta_put_item(TCmdPItem *pI, int x, int y, BYTE bLevel) +void delta_put_item(TCmdPItem *pI, int x, int y, BYTE bLevel) { int i; TCmdPItem *pD; @@ -1653,14 +1653,14 @@ void __fastcall delta_put_item(TCmdPItem *pI, int x, int y, BYTE bLevel) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall check_update_plr(int pnum) +void check_update_plr(int pnum) { if (gbMaxPlayers != 1 && pnum == myplr) pfile_update(1); } // 679660: using guessed type char gbMaxPlayers; -int __fastcall On_SYNCPUTITEM(TCmdPItem *pCmd, int pnum) +int On_SYNCPUTITEM(TCmdPItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1681,7 +1681,7 @@ int __fastcall On_SYNCPUTITEM(TCmdPItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_RESPAWNITEM(TCmdPItem *pCmd, int pnum) +int On_RESPAWNITEM(TCmdPItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1695,7 +1695,7 @@ int __fastcall On_RESPAWNITEM(TCmdPItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ATTACKXY(TCmdLoc *pCmd, int pnum) +int On_ATTACKXY(TCmdLoc *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { MakePlrPath(pnum, pCmd->x, pCmd->y, FALSE); @@ -1707,7 +1707,7 @@ int __fastcall On_ATTACKXY(TCmdLoc *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SATTACKXY(TCmdLoc *pCmd, int pnum) +int On_SATTACKXY(TCmdLoc *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { ClrPlrPath(pnum); @@ -1719,7 +1719,7 @@ int __fastcall On_SATTACKXY(TCmdLoc *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_RATTACKXY(TCmdLoc *pCmd, int pnum) +int On_RATTACKXY(TCmdLoc *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { ClrPlrPath(pnum); @@ -1731,7 +1731,7 @@ int __fastcall On_RATTACKXY(TCmdLoc *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SPELLXYD(TCmdLocParam3 *pCmd, int pnum) +int On_SPELLXYD(TCmdLocParam3 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (currlevel != 0 || spelldata[pCmd->wParam1].sTownSpell) { @@ -1751,7 +1751,7 @@ int __fastcall On_SPELLXYD(TCmdLocParam3 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SPELLXY(TCmdLocParam2 *pCmd, int pnum) +int On_SPELLXY(TCmdLocParam2 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (currlevel != 0 || spelldata[pCmd->wParam1].sTownSpell) { @@ -1770,7 +1770,7 @@ int __fastcall On_SPELLXY(TCmdLocParam2 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_TSPELLXY(TCmdLocParam2 *pCmd, int pnum) +int On_TSPELLXY(TCmdLocParam2 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (currlevel != 0 || spelldata[pCmd->wParam1].sTownSpell) { @@ -1789,7 +1789,7 @@ int __fastcall On_TSPELLXY(TCmdLocParam2 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_OPOBJXY(TCmdLocParam1 *pCmd, int pnum) +int On_OPOBJXY(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (object[pCmd->wParam1]._oSolidFlag || object[pCmd->wParam1]._oDoorFlag) @@ -1803,7 +1803,7 @@ int __fastcall On_OPOBJXY(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_DISARMXY(TCmdLocParam1 *pCmd, int pnum) +int On_DISARMXY(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (object[pCmd->wParam1]._oSolidFlag || object[pCmd->wParam1]._oDoorFlag) @@ -1817,7 +1817,7 @@ int __fastcall On_DISARMXY(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_OPOBJT(TCmdParam1 *pCmd, int pnum) +int On_OPOBJT(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { plr[pnum].destAction = ACTION_OPERATETK; @@ -1827,7 +1827,7 @@ int __fastcall On_OPOBJT(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ATTACKID(TCmdParam1 *pCmd, int pnum) +int On_ATTACKID(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { int distx = abs(plr[pnum].WorldX - monster[pCmd->wParam1]._mfutx); @@ -1841,7 +1841,7 @@ int __fastcall On_ATTACKID(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ATTACKPID(TCmdParam1 *pCmd, int pnum) +int On_ATTACKPID(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { MakePlrPath(pnum, plr[pCmd->wParam1]._px, plr[pCmd->wParam1]._py, FALSE); @@ -1852,7 +1852,7 @@ int __fastcall On_ATTACKPID(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_RATTACKID(TCmdParam1 *pCmd, int pnum) +int On_RATTACKID(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { ClrPlrPath(pnum); @@ -1863,7 +1863,7 @@ int __fastcall On_RATTACKID(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_RATTACKPID(TCmdParam1 *pCmd, int pnum) +int On_RATTACKPID(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { ClrPlrPath(pnum); @@ -1874,7 +1874,7 @@ int __fastcall On_RATTACKPID(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SPELLID(TCmdParam3 *pCmd, int pnum) +int On_SPELLID(TCmdParam3 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (currlevel != 0 || spelldata[pCmd->wParam2].sTownSpell) { @@ -1892,7 +1892,7 @@ int __fastcall On_SPELLID(TCmdParam3 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SPELLPID(TCmdParam3 *pCmd, int pnum) +int On_SPELLPID(TCmdParam3 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (currlevel != 0 || spelldata[pCmd->wParam2].sTownSpell) { @@ -1910,7 +1910,7 @@ int __fastcall On_SPELLPID(TCmdParam3 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_TSPELLID(TCmdParam3 *pCmd, int pnum) +int On_TSPELLID(TCmdParam3 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (currlevel != 0 || spelldata[pCmd->wParam2].sTownSpell) { @@ -1928,7 +1928,7 @@ int __fastcall On_TSPELLID(TCmdParam3 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_TSPELLPID(TCmdParam3 *pCmd, int pnum) +int On_TSPELLPID(TCmdParam3 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { if (currlevel != 0 || spelldata[pCmd->wParam2].sTownSpell) { @@ -1946,7 +1946,7 @@ int __fastcall On_TSPELLPID(TCmdParam3 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_KNOCKBACK(TCmdParam1 *pCmd, int pnum) +int On_KNOCKBACK(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { M_GetKnockback(pCmd->wParam1); @@ -1956,7 +1956,7 @@ int __fastcall On_KNOCKBACK(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_RESURRECT(TCmdParam1 *pCmd, int pnum) +int On_RESURRECT(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1968,7 +1968,7 @@ int __fastcall On_RESURRECT(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_HEALOTHER(TCmdParam1 *pCmd, int pnum) +int On_HEALOTHER(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) DoHealOther(pnum, pCmd->wParam1); @@ -1976,7 +1976,7 @@ int __fastcall On_HEALOTHER(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_TALKXY(TCmdLocParam1 *pCmd, int pnum) +int On_TALKXY(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) { MakePlrPath(pnum, pCmd->x, pCmd->y, FALSE); @@ -1987,7 +1987,7 @@ int __fastcall On_TALKXY(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_NEWLVL(TCmdParam2 *pCmd, int pnum) +int On_NEWLVL(TCmdParam2 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -1997,7 +1997,7 @@ int __fastcall On_NEWLVL(TCmdParam2 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_WARP(TCmdParam1 *pCmd, int pnum) +int On_WARP(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2012,7 +2012,7 @@ int __fastcall On_WARP(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_MONSTDEATH(TCmdLocParam1 *pCmd, int pnum) +int On_MONSTDEATH(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2025,7 +2025,7 @@ int __fastcall On_MONSTDEATH(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_KILLGOLEM(TCmdLocParam1 *pCmd, int pnum) +int On_KILLGOLEM(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2038,7 +2038,7 @@ int __fastcall On_KILLGOLEM(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_AWAKEGOLEM(TCmdGolem *pCmd, int pnum) +int On_AWAKEGOLEM(TCmdGolem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2062,7 +2062,7 @@ int __fastcall On_AWAKEGOLEM(TCmdGolem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_MONSTDAMAGE(TCmdParam2 *pCmd, int pnum) +int On_MONSTDAMAGE(TCmdParam2 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2082,7 +2082,7 @@ int __fastcall On_MONSTDAMAGE(TCmdParam2 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_PLRDEAD(TCmdParam1 *pCmd, int pnum) +int On_PLRDEAD(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2094,7 +2094,7 @@ int __fastcall On_PLRDEAD(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_PLRDAMAGE(TCmdDamage *pCmd, int pnum) +int On_PLRDAMAGE(TCmdDamage *pCmd, int pnum) { if (pCmd->bPlr == myplr && currlevel != 0) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel && pCmd->dwDam <= 192000) { @@ -2115,7 +2115,7 @@ int __fastcall On_PLRDAMAGE(TCmdDamage *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_OPENDOOR(TCmdParam1 *pCmd, int pnum) +int On_OPENDOOR(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2128,7 +2128,7 @@ int __fastcall On_OPENDOOR(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -void __fastcall delta_sync_object(int oi, BYTE bCmd, BYTE bLevel) +void delta_sync_object(int oi, BYTE bCmd, BYTE bLevel) { if (gbMaxPlayers != 1) { sgbDeltaChanged = TRUE; @@ -2137,7 +2137,7 @@ void __fastcall delta_sync_object(int oi, BYTE bCmd, BYTE bLevel) } // 679660: using guessed type char gbMaxPlayers; -int __fastcall On_CLOSEDOOR(TCmdParam1 *pCmd, int pnum) +int On_CLOSEDOOR(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2150,7 +2150,7 @@ int __fastcall On_CLOSEDOOR(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_OPERATEOBJ(TCmdParam1 *pCmd, int pnum) +int On_OPERATEOBJ(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2163,7 +2163,7 @@ int __fastcall On_OPERATEOBJ(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_PLROPOBJ(TCmdParam2 *pCmd, int pnum) +int On_PLROPOBJ(TCmdParam2 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2176,7 +2176,7 @@ int __fastcall On_PLROPOBJ(TCmdParam2 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_BREAKOBJ(TCmdParam2 *pCmd, int pnum) +int On_BREAKOBJ(TCmdParam2 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2189,7 +2189,7 @@ int __fastcall On_BREAKOBJ(TCmdParam2 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_CHANGEPLRITEMS(TCmdChItem *pCmd, int pnum) +int On_CHANGEPLRITEMS(TCmdChItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2199,7 +2199,7 @@ int __fastcall On_CHANGEPLRITEMS(TCmdChItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_DELPLRITEMS(TCmdDelItem *pCmd, int pnum) +int On_DELPLRITEMS(TCmdDelItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2209,7 +2209,7 @@ int __fastcall On_DELPLRITEMS(TCmdDelItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_PLRLEVEL(TCmdParam1 *pCmd, int pnum) +int On_PLRLEVEL(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2219,7 +2219,7 @@ int __fastcall On_PLRLEVEL(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_DROPITEM(TCmdPItem *pCmd, int pnum) +int On_DROPITEM(TCmdPItem *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2229,7 +2229,7 @@ int __fastcall On_DROPITEM(TCmdPItem *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SEND_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum) +int On_SEND_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, pCmd->wBytes + sizeof(*pCmd)); @@ -2239,12 +2239,12 @@ int __fastcall On_SEND_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum) return pCmd->wBytes + sizeof(*pCmd); } -int __fastcall On_ACK_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum) +int On_ACK_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum) { return On_SEND_PLRINFO(pCmd, pnum); } -int __fastcall On_PLAYER_JOINLEVEL(TCmdLocParam1 *pCmd, int pnum) +int On_PLAYER_JOINLEVEL(TCmdLocParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2285,7 +2285,7 @@ int __fastcall On_PLAYER_JOINLEVEL(TCmdLocParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ACTIVATEPORTAL(TCmdLocParam3 *pCmd, int pnum) +int On_ACTIVATEPORTAL(TCmdLocParam3 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2315,7 +2315,7 @@ int __fastcall On_ACTIVATEPORTAL(TCmdLocParam3 *pCmd, int pnum) return sizeof(*pCmd); } -void __fastcall delta_open_portal(int pnum, BYTE x, BYTE y, BYTE bLevel, BYTE bLType, BYTE bSetLvl) +void delta_open_portal(int pnum, BYTE x, BYTE y, BYTE bLevel, BYTE bLType, BYTE bSetLvl) { sgbDeltaChanged = TRUE; sgJunk.portal[pnum].x = x; @@ -2325,7 +2325,7 @@ void __fastcall delta_open_portal(int pnum, BYTE x, BYTE y, BYTE bLevel, BYTE bL sgJunk.portal[pnum].setlvl = bSetLvl; } -int __fastcall On_DEACTIVATEPORTAL(TCmd *pCmd, int pnum) +int On_DEACTIVATEPORTAL(TCmd *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2339,7 +2339,7 @@ int __fastcall On_DEACTIVATEPORTAL(TCmd *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_RETOWN(TCmd *pCmd, int pnum) +int On_RETOWN(TCmd *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2354,7 +2354,7 @@ int __fastcall On_RETOWN(TCmd *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SETSTR(TCmdParam1 *pCmd, int pnum) +int On_SETSTR(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2364,7 +2364,7 @@ int __fastcall On_SETSTR(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SETDEX(TCmdParam1 *pCmd, int pnum) +int On_SETDEX(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2374,7 +2374,7 @@ int __fastcall On_SETDEX(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SETMAG(TCmdParam1 *pCmd, int pnum) +int On_SETMAG(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2384,7 +2384,7 @@ int __fastcall On_SETMAG(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SETVIT(TCmdParam1 *pCmd, int pnum) +int On_SETVIT(TCmdParam1 *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2394,12 +2394,12 @@ int __fastcall On_SETVIT(TCmdParam1 *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_STRING(TCmdString *pCmd, int pnum) +int On_STRING(TCmdString *pCmd, int pnum) { return On_STRING2(pnum, pCmd); } -int __fastcall On_STRING2(int pnum, TCmdString *pCmd) +int On_STRING2(int pnum, TCmdString *pCmd) { int len = strlen(pCmd->str); if (!gbBufferMsgs) @@ -2408,7 +2408,7 @@ int __fastcall On_STRING2(int pnum, TCmdString *pCmd) return len + 2; // length of string + nul terminator + sizeof(pCmd->bCmd) } -int __fastcall On_SYNCQUEST(TCmdQuest *pCmd, int pnum) +int On_SYNCQUEST(TCmdQuest *pCmd, int pnum) { if (gbBufferMsgs == 1) msg_send_packet(pnum, pCmd, sizeof(*pCmd)); @@ -2421,7 +2421,7 @@ int __fastcall On_SYNCQUEST(TCmdQuest *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_ENDSHIELD(TCmd *pCmd, int pnum) +int On_ENDSHIELD(TCmd *pCmd, int pnum) { int i; @@ -2438,7 +2438,7 @@ int __fastcall On_ENDSHIELD(TCmd *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_CHEAT_EXPERIENCE(TCmd *pCmd, int pnum) +int On_CHEAT_EXPERIENCE(TCmd *pCmd, int pnum) { #ifdef _DEBUG if (gbBufferMsgs == 1) @@ -2451,7 +2451,7 @@ int __fastcall On_CHEAT_EXPERIENCE(TCmd *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_CHEAT_SPELL_LEVEL(TCmd *pCmd, int pnum) +int On_CHEAT_SPELL_LEVEL(TCmd *pCmd, int pnum) { #ifdef _DEBUG if (gbBufferMsgs == 1) @@ -2462,12 +2462,12 @@ int __fastcall On_CHEAT_SPELL_LEVEL(TCmd *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_DEBUG(TCmd *pCmd, int pnum) +int On_DEBUG(TCmd *pCmd, int pnum) { return sizeof(*pCmd); } -int __fastcall On_NOVA(TCmdLoc *pCmd, int pnum) +int On_NOVA(TCmdLoc *pCmd, int pnum) { if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel && pnum != myplr) { ClrPlrPath(pnum); @@ -2482,7 +2482,7 @@ int __fastcall On_NOVA(TCmdLoc *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_SETSHIELD(TCmd *pCmd, int pnum) +int On_SETSHIELD(TCmd *pCmd, int pnum) { if (gbBufferMsgs != 1) plr[pnum].pManaShield = TRUE; @@ -2490,7 +2490,7 @@ int __fastcall On_SETSHIELD(TCmd *pCmd, int pnum) return sizeof(*pCmd); } -int __fastcall On_REMSHIELD(TCmd *pCmd, int pnum) +int On_REMSHIELD(TCmd *pCmd, int pnum) { if (gbBufferMsgs != 1) plr[pnum].pManaShield = FALSE; diff --git a/Source/msg.h b/Source/msg.h index 07c17f8f..c19d08c0 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -6,140 +6,140 @@ extern BOOL deltaload; extern BYTE gbBufferMsgs; extern int pkt_counter; -void __fastcall msg_send_drop_pkt(int pnum, int reason); -void __fastcall msg_send_packet(int pnum, const void *packet, DWORD dwSize); -TMegaPkt *__cdecl msg_get_next_packet(); -BOOL __cdecl msg_wait_resync(); -void __cdecl msg_free_packets(); -int __cdecl msg_wait_for_turns(); -void __cdecl msg_process_net_packets(); -void __cdecl msg_pre_packet(); -void __fastcall DeltaExportData(int pnum); -BYTE *__fastcall DeltaExportItem(BYTE *dst, TCmdPItem *src); -BYTE *__fastcall DeltaExportObject(BYTE *dst, DObjectStr *src); -BYTE *__fastcall DeltaExportMonster(BYTE *dst, DMonsterStr *src); -BYTE *__fastcall DeltaExportJunk(BYTE *dst); -int __fastcall msg_comp_level(BYTE *buffer, BYTE *end); -void __cdecl delta_init(); -void __fastcall delta_kill_monster(int mi, BYTE x, BYTE y, BYTE bLevel); -void __fastcall delta_monster_hp(int mi, int hp, BYTE bLevel); -void __fastcall delta_sync_monster(const TSyncMonster *pSync, BYTE bLevel); -void __fastcall delta_sync_golem(TCmdGolem *pG, int pnum, BYTE bLevel); -void __fastcall delta_leave_sync(BYTE bLevel); -BOOL __fastcall delta_portal_inited(int i); -BOOL __fastcall delta_quest_inited(int i); -void __fastcall DeltaAddItem(int ii); -void __cdecl DeltaSaveLevel(); -void __cdecl DeltaLoadLevel(); -void __fastcall NetSendCmd(BOOL bHiPri, BYTE bCmd); -void __fastcall NetSendCmdGolem(BYTE mx, BYTE my, BYTE dir, BYTE menemy, int hp, BYTE cl); -void __fastcall NetSendCmdLoc(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y); -void __fastcall NetSendCmdLocParam1(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1); -void __fastcall NetSendCmdLocParam2(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2); -void __fastcall NetSendCmdLocParam3(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2, WORD wParam3); -void __fastcall NetSendCmdParam1(BOOL bHiPri, BYTE bCmd, WORD wParam1); -void __fastcall NetSendCmdParam2(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2); -void __fastcall NetSendCmdParam3(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2, WORD wParam3); -void __fastcall NetSendCmdQuest(BOOL bHiPri, BYTE q); -void __fastcall NetSendCmdGItem(BOOL bHiPri, BYTE bCmd, BYTE mast, BYTE pnum, BYTE ii); -void __fastcall NetSendCmdGItem2(BOOL usonly, BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p); -BOOL __fastcall NetSendCmdReq2(BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p); -void __fastcall NetSendCmdExtra(TCmdGItem *p); -void __fastcall NetSendCmdPItem(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y); -void __fastcall NetSendCmdChItem(BOOL bHiPri, BYTE bLoc); -void __fastcall NetSendCmdDelItem(BOOL bHiPri, BYTE bLoc); -void __fastcall NetSendCmdDItem(BOOL bHiPri, int ii); -void __fastcall NetSendCmdDamage(BOOL bHiPri, BYTE bPlr, DWORD dwDam); -void __fastcall NetSendCmdString(int pmask, const char *pszStr); -void __fastcall RemovePlrPortal(int pnum); -int __fastcall ParseCmd(int pnum, TCmd *pCmd); -int __fastcall On_DLEVEL(int pnum, TCmdPlrInfoHdr *pCmd); -void __fastcall DeltaImportData(BYTE cmd, DWORD recv_offset); -BYTE *__fastcall DeltaImportItem(BYTE *src, TCmdPItem *dst); -BYTE *__fastcall DeltaImportObject(BYTE *src, DObjectStr *dst); -BYTE *__fastcall DeltaImportMonster(BYTE *src, DMonsterStr *dst); -void __fastcall DeltaImportJunk(BYTE *src); -int __fastcall On_SYNCDATA(void *packet, int pnum); -int __fastcall On_WALKXY(TCmdLoc *pCmd, int pnum); -int __fastcall On_ADDSTR(TCmdParam1 *pCmd, int pnum); -int __fastcall On_ADDMAG(TCmdParam1 *pCmd, int pnum); -int __fastcall On_ADDDEX(TCmdParam1 *pCmd, int pnum); -int __fastcall On_ADDVIT(TCmdParam1 *pCmd, int pnum); -int __fastcall On_SBSPELL(TCmdParam1 *pCmd, int pnum); -void msg_errorf(const char *pszFmt, ...); -int __fastcall On_GOTOGETITEM(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_REQUESTGITEM(TCmdGItem *pCmd, int pnum); -BOOL __fastcall i_own_level(int nReqLevel); -int __fastcall On_GETITEM(TCmdGItem *pCmd, int pnum); -BOOL __fastcall delta_get_item(TCmdGItem *pI, BYTE bLevel); -int __fastcall On_GOTOAGETITEM(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_REQUESTAGITEM(TCmdGItem *pCmd, int pnum); -int __fastcall On_AGETITEM(TCmdGItem *pCmd, int pnum); -int __fastcall On_ITEMEXTRA(TCmdGItem *pCmd, int pnum); -int __fastcall On_PUTITEM(TCmdPItem *pCmd, int pnum); -void __fastcall delta_put_item(TCmdPItem *pI, int x, int y, BYTE bLevel); -void __fastcall check_update_plr(int pnum); -int __fastcall On_SYNCPUTITEM(TCmdPItem *pCmd, int pnum); -int __fastcall On_RESPAWNITEM(TCmdPItem *pCmd, int pnum); -int __fastcall On_ATTACKXY(TCmdLoc *pCmd, int pnum); -int __fastcall On_SATTACKXY(TCmdLoc *pCmd, int pnum); -int __fastcall On_RATTACKXY(TCmdLoc *pCmd, int pnum); -int __fastcall On_SPELLXYD(TCmdLocParam3 *pCmd, int pnum); -int __fastcall On_SPELLXY(TCmdLocParam2 *pCmd, int pnum); -int __fastcall On_TSPELLXY(TCmdLocParam2 *pCmd, int pnum); -int __fastcall On_OPOBJXY(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_DISARMXY(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_OPOBJT(TCmdParam1 *pCmd, int pnum); -int __fastcall On_ATTACKID(TCmdParam1 *pCmd, int pnum); -int __fastcall On_ATTACKPID(TCmdParam1 *pCmd, int pnum); -int __fastcall On_RATTACKID(TCmdParam1 *pCmd, int pnum); -int __fastcall On_RATTACKPID(TCmdParam1 *pCmd, int pnum); -int __fastcall On_SPELLID(TCmdParam3 *pCmd, int pnum); -int __fastcall On_SPELLPID(TCmdParam3 *pCmd, int pnum); -int __fastcall On_TSPELLID(TCmdParam3 *pCmd, int pnum); -int __fastcall On_TSPELLPID(TCmdParam3 *pCmd, int pnum); -int __fastcall On_KNOCKBACK(TCmdParam1 *pCmd, int pnum); -int __fastcall On_RESURRECT(TCmdParam1 *pCmd, int pnum); -int __fastcall On_HEALOTHER(TCmdParam1 *pCmd, int pnum); -int __fastcall On_TALKXY(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_NEWLVL(TCmdParam2 *pCmd, int pnum); -int __fastcall On_WARP(TCmdParam1 *pCmd, int pnum); -int __fastcall On_MONSTDEATH(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_KILLGOLEM(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_AWAKEGOLEM(TCmdGolem *pCmd, int pnum); -int __fastcall On_MONSTDAMAGE(TCmdParam2 *pCmd, int pnum); -int __fastcall On_PLRDEAD(TCmdParam1 *pCmd, int pnum); -int __fastcall On_PLRDAMAGE(TCmdDamage *pCmd, int pnum); -int __fastcall On_OPENDOOR(TCmdParam1 *pCmd, int pnum); -void __fastcall delta_sync_object(int oi, BYTE bCmd, BYTE bLevel); -int __fastcall On_CLOSEDOOR(TCmdParam1 *pCmd, int pnum); -int __fastcall On_OPERATEOBJ(TCmdParam1 *pCmd, int pnum); -int __fastcall On_PLROPOBJ(TCmdParam2 *pCmd, int pnum); -int __fastcall On_BREAKOBJ(TCmdParam2 *pCmd, int pnum); -int __fastcall On_CHANGEPLRITEMS(TCmdChItem *pCmd, int pnum); -int __fastcall On_DELPLRITEMS(TCmdDelItem *pCmd, int pnum); -int __fastcall On_PLRLEVEL(TCmdParam1 *pCmd, int pnum); -int __fastcall On_DROPITEM(TCmdPItem *pCmd, int pnum); -int __fastcall On_SEND_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum); -int __fastcall On_ACK_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum); -int __fastcall On_PLAYER_JOINLEVEL(TCmdLocParam1 *pCmd, int pnum); -int __fastcall On_ACTIVATEPORTAL(TCmdLocParam3 *pCmd, int pnum); -void __fastcall delta_open_portal(int pnum, BYTE x, BYTE y, BYTE bLevel, BYTE bLType, BYTE bSetLvl); -int __fastcall On_DEACTIVATEPORTAL(TCmd *pCmd, int pnum); -int __fastcall On_RETOWN(TCmd *pCmd, int pnum); -int __fastcall On_SETSTR(TCmdParam1 *pCmd, int pnum); -int __fastcall On_SETDEX(TCmdParam1 *pCmd, int pnum); -int __fastcall On_SETMAG(TCmdParam1 *pCmd, int pnum); -int __fastcall On_SETVIT(TCmdParam1 *pCmd, int pnum); -int __fastcall On_STRING(TCmdString *pCmd, int pnum); -int __fastcall On_STRING2(int pnum, TCmdString *pCmd); -int __fastcall On_SYNCQUEST(TCmdQuest *pCmd, int pnum); -int __fastcall On_ENDSHIELD(TCmd *pCmd, int pnum); -int __fastcall On_CHEAT_EXPERIENCE(TCmd *pCmd, int pnum); -int __fastcall On_CHEAT_SPELL_LEVEL(TCmd *pCmd, int pnum); -int __fastcall On_DEBUG(TCmd *pCmd, int pnum); -int __fastcall On_NOVA(TCmdLoc *pCmd, int pnum); -int __fastcall On_SETSHIELD(TCmd *pCmd, int pnum); -int __fastcall On_REMSHIELD(TCmd *pCmd, int pnum); +void msg_send_drop_pkt(int pnum, int reason); +void msg_send_packet(int pnum, const void *packet, DWORD dwSize); +TMegaPkt *msg_get_next_packet(); +BOOL msg_wait_resync(); +void msg_free_packets(); +int msg_wait_for_turns(); +void msg_process_net_packets(); +void msg_pre_packet(); +void DeltaExportData(int pnum); +BYTE *DeltaExportItem(BYTE *dst, TCmdPItem *src); +BYTE *DeltaExportObject(BYTE *dst, DObjectStr *src); +BYTE *DeltaExportMonster(BYTE *dst, DMonsterStr *src); +BYTE *DeltaExportJunk(BYTE *dst); +int msg_comp_level(BYTE *buffer, BYTE *end); +void delta_init(); +void delta_kill_monster(int mi, BYTE x, BYTE y, BYTE bLevel); +void delta_monster_hp(int mi, int hp, BYTE bLevel); +void delta_sync_monster(const TSyncMonster *pSync, BYTE bLevel); +void delta_sync_golem(TCmdGolem *pG, int pnum, BYTE bLevel); +void delta_leave_sync(BYTE bLevel); +BOOL delta_portal_inited(int i); +BOOL delta_quest_inited(int i); +void DeltaAddItem(int ii); +void DeltaSaveLevel(); +void DeltaLoadLevel(); +void NetSendCmd(BOOL bHiPri, BYTE bCmd); +void NetSendCmdGolem(BYTE mx, BYTE my, BYTE dir, BYTE menemy, int hp, BYTE cl); +void NetSendCmdLoc(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y); +void NetSendCmdLocParam1(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1); +void NetSendCmdLocParam2(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2); +void NetSendCmdLocParam3(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wParam1, WORD wParam2, WORD wParam3); +void NetSendCmdParam1(BOOL bHiPri, BYTE bCmd, WORD wParam1); +void NetSendCmdParam2(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2); +void NetSendCmdParam3(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2, WORD wParam3); +void NetSendCmdQuest(BOOL bHiPri, BYTE q); +void NetSendCmdGItem(BOOL bHiPri, BYTE bCmd, BYTE mast, BYTE pnum, BYTE ii); +void NetSendCmdGItem2(BOOL usonly, BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p); +BOOL NetSendCmdReq2(BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p); +void NetSendCmdExtra(TCmdGItem *p); +void NetSendCmdPItem(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y); +void NetSendCmdChItem(BOOL bHiPri, BYTE bLoc); +void NetSendCmdDelItem(BOOL bHiPri, BYTE bLoc); +void NetSendCmdDItem(BOOL bHiPri, int ii); +void NetSendCmdDamage(BOOL bHiPri, BYTE bPlr, DWORD dwDam); +void NetSendCmdString(int pmask, const char *pszStr); +void RemovePlrPortal(int pnum); +int ParseCmd(int pnum, TCmd *pCmd); +int On_DLEVEL(int pnum, TCmdPlrInfoHdr *pCmd); +void DeltaImportData(BYTE cmd, DWORD recv_offset); +BYTE *DeltaImportItem(BYTE *src, TCmdPItem *dst); +BYTE *DeltaImportObject(BYTE *src, DObjectStr *dst); +BYTE *DeltaImportMonster(BYTE *src, DMonsterStr *dst); +void DeltaImportJunk(BYTE *src); +int On_SYNCDATA(void *packet, int pnum); +int On_WALKXY(TCmdLoc *pCmd, int pnum); +int On_ADDSTR(TCmdParam1 *pCmd, int pnum); +int On_ADDMAG(TCmdParam1 *pCmd, int pnum); +int On_ADDDEX(TCmdParam1 *pCmd, int pnum); +int On_ADDVIT(TCmdParam1 *pCmd, int pnum); +int On_SBSPELL(TCmdParam1 *pCmd, int pnum); +void __cdecl msg_errorf(const char *pszFmt, ...); +int On_GOTOGETITEM(TCmdLocParam1 *pCmd, int pnum); +int On_REQUESTGITEM(TCmdGItem *pCmd, int pnum); +BOOL i_own_level(int nReqLevel); +int On_GETITEM(TCmdGItem *pCmd, int pnum); +BOOL delta_get_item(TCmdGItem *pI, BYTE bLevel); +int On_GOTOAGETITEM(TCmdLocParam1 *pCmd, int pnum); +int On_REQUESTAGITEM(TCmdGItem *pCmd, int pnum); +int On_AGETITEM(TCmdGItem *pCmd, int pnum); +int On_ITEMEXTRA(TCmdGItem *pCmd, int pnum); +int On_PUTITEM(TCmdPItem *pCmd, int pnum); +void delta_put_item(TCmdPItem *pI, int x, int y, BYTE bLevel); +void check_update_plr(int pnum); +int On_SYNCPUTITEM(TCmdPItem *pCmd, int pnum); +int On_RESPAWNITEM(TCmdPItem *pCmd, int pnum); +int On_ATTACKXY(TCmdLoc *pCmd, int pnum); +int On_SATTACKXY(TCmdLoc *pCmd, int pnum); +int On_RATTACKXY(TCmdLoc *pCmd, int pnum); +int On_SPELLXYD(TCmdLocParam3 *pCmd, int pnum); +int On_SPELLXY(TCmdLocParam2 *pCmd, int pnum); +int On_TSPELLXY(TCmdLocParam2 *pCmd, int pnum); +int On_OPOBJXY(TCmdLocParam1 *pCmd, int pnum); +int On_DISARMXY(TCmdLocParam1 *pCmd, int pnum); +int On_OPOBJT(TCmdParam1 *pCmd, int pnum); +int On_ATTACKID(TCmdParam1 *pCmd, int pnum); +int On_ATTACKPID(TCmdParam1 *pCmd, int pnum); +int On_RATTACKID(TCmdParam1 *pCmd, int pnum); +int On_RATTACKPID(TCmdParam1 *pCmd, int pnum); +int On_SPELLID(TCmdParam3 *pCmd, int pnum); +int On_SPELLPID(TCmdParam3 *pCmd, int pnum); +int On_TSPELLID(TCmdParam3 *pCmd, int pnum); +int On_TSPELLPID(TCmdParam3 *pCmd, int pnum); +int On_KNOCKBACK(TCmdParam1 *pCmd, int pnum); +int On_RESURRECT(TCmdParam1 *pCmd, int pnum); +int On_HEALOTHER(TCmdParam1 *pCmd, int pnum); +int On_TALKXY(TCmdLocParam1 *pCmd, int pnum); +int On_NEWLVL(TCmdParam2 *pCmd, int pnum); +int On_WARP(TCmdParam1 *pCmd, int pnum); +int On_MONSTDEATH(TCmdLocParam1 *pCmd, int pnum); +int On_KILLGOLEM(TCmdLocParam1 *pCmd, int pnum); +int On_AWAKEGOLEM(TCmdGolem *pCmd, int pnum); +int On_MONSTDAMAGE(TCmdParam2 *pCmd, int pnum); +int On_PLRDEAD(TCmdParam1 *pCmd, int pnum); +int On_PLRDAMAGE(TCmdDamage *pCmd, int pnum); +int On_OPENDOOR(TCmdParam1 *pCmd, int pnum); +void delta_sync_object(int oi, BYTE bCmd, BYTE bLevel); +int On_CLOSEDOOR(TCmdParam1 *pCmd, int pnum); +int On_OPERATEOBJ(TCmdParam1 *pCmd, int pnum); +int On_PLROPOBJ(TCmdParam2 *pCmd, int pnum); +int On_BREAKOBJ(TCmdParam2 *pCmd, int pnum); +int On_CHANGEPLRITEMS(TCmdChItem *pCmd, int pnum); +int On_DELPLRITEMS(TCmdDelItem *pCmd, int pnum); +int On_PLRLEVEL(TCmdParam1 *pCmd, int pnum); +int On_DROPITEM(TCmdPItem *pCmd, int pnum); +int On_SEND_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum); +int On_ACK_PLRINFO(TCmdPlrInfoHdr *pCmd, int pnum); +int On_PLAYER_JOINLEVEL(TCmdLocParam1 *pCmd, int pnum); +int On_ACTIVATEPORTAL(TCmdLocParam3 *pCmd, int pnum); +void delta_open_portal(int pnum, BYTE x, BYTE y, BYTE bLevel, BYTE bLType, BYTE bSetLvl); +int On_DEACTIVATEPORTAL(TCmd *pCmd, int pnum); +int On_RETOWN(TCmd *pCmd, int pnum); +int On_SETSTR(TCmdParam1 *pCmd, int pnum); +int On_SETDEX(TCmdParam1 *pCmd, int pnum); +int On_SETMAG(TCmdParam1 *pCmd, int pnum); +int On_SETVIT(TCmdParam1 *pCmd, int pnum); +int On_STRING(TCmdString *pCmd, int pnum); +int On_STRING2(int pnum, TCmdString *pCmd); +int On_SYNCQUEST(TCmdQuest *pCmd, int pnum); +int On_ENDSHIELD(TCmd *pCmd, int pnum); +int On_CHEAT_EXPERIENCE(TCmd *pCmd, int pnum); +int On_CHEAT_SPELL_LEVEL(TCmd *pCmd, int pnum); +int On_DEBUG(TCmd *pCmd, int pnum); +int On_NOVA(TCmdLoc *pCmd, int pnum); +int On_SETSHIELD(TCmd *pCmd, int pnum); +int On_REMSHIELD(TCmd *pCmd, int pnum); #endif /* __MSG_H__ */ diff --git a/Source/msgcmd.cpp b/Source/msgcmd.cpp index be64e472..dd0980d6 100644 --- a/Source/msgcmd.cpp +++ b/Source/msgcmd.cpp @@ -20,12 +20,12 @@ msgcmd_c_init(void) SEG_ALLOCATE(SEGMENT_C_INIT) _PVFV msgcmd_c_init_funcs[] = { &msgcmd_c_init }; -void __cdecl msgcmd_init_event() +void msgcmd_init_event() { msgcmd_init_chatcmd(&sgChat_Cmd); } -void __cdecl msgcmd_cleanup_chatcmd_atexit() +void msgcmd_cleanup_chatcmd_atexit() { atexit(msgcmd_cleanup_chatcmd); } @@ -36,12 +36,12 @@ void __cdecl msgcmd_cleanup_chatcmd(void) msgcmd_cleanup_extern_msg(sgChat_Cmd.extern_msgs); } -void __cdecl msgcmd_cmd_cleanup() +void msgcmd_cmd_cleanup() { msgcmd_free_event(&sgChat_Cmd); } -void __cdecl msgcmd_send_chat() +void msgcmd_send_chat() { ServerCommand *v0; // esi int v1; // eax @@ -57,7 +57,7 @@ void __cdecl msgcmd_send_chat() } } -BOOLEAN __fastcall msgcmd_add_server_cmd_W(char *chat_message) +BOOLEAN msgcmd_add_server_cmd_W(char *chat_message) { if (*chat_message != '/') return 0; @@ -65,7 +65,7 @@ BOOLEAN __fastcall msgcmd_add_server_cmd_W(char *chat_message) return 1; } -void __fastcall msgcmd_add_server_cmd(char *command) +void msgcmd_add_server_cmd(char *command) { char *v1; // edi size_t v2; // eax @@ -84,7 +84,7 @@ void __fastcall msgcmd_add_server_cmd(char *command) } } -void __fastcall msgcmd_init_chatcmd(ChatCmd *chat_cmd) +void msgcmd_init_chatcmd(ChatCmd *chat_cmd) { ServerCommand **v1; // edx @@ -96,7 +96,7 @@ void __fastcall msgcmd_init_chatcmd(ChatCmd *chat_cmd) chat_cmd->extern_msgs[1] = (ServerCommand *)~(unsigned int)chat_cmd->extern_msgs; } -void __fastcall msgcmd_free_event(ChatCmd *a1) +void msgcmd_free_event(ChatCmd *a1) { int v1; // edx ChatCmd *v2; // edi @@ -112,7 +112,7 @@ void __fastcall msgcmd_free_event(ChatCmd *a1) } } -BOOLEAN __fastcall msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *extern_msg) +BOOLEAN msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *extern_msg) { char *v2; // eax ServerCommand *v3; // eax @@ -132,7 +132,7 @@ BOOLEAN __fastcall msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *exter return v4; } -ChatCmd *__fastcall msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int a5) +ChatCmd *msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int a5) { int v5; // eax ChatCmd *v6; // edi @@ -156,7 +156,7 @@ ChatCmd *__fastcall msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int return v9; } -void __fastcall msgcmd_remove_event(ChatCmd *a1, int a2) +void msgcmd_remove_event(ChatCmd *a1, int a2) { ServerCommand **v2; // esi @@ -169,7 +169,7 @@ void __fastcall msgcmd_remove_event(ChatCmd *a1, int a2) } } -void __fastcall msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5) +void msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5) { ChatCmd *v5; // edi int *v6; // esi @@ -211,7 +211,7 @@ void __fastcall msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5) } } -void __fastcall msgcmd_cleanup_chatcmd_1(ChatCmd *a1) +void msgcmd_cleanup_chatcmd_1(ChatCmd *a1) { ChatCmd *v1; // esi ServerCommand **v2; // ecx @@ -225,7 +225,7 @@ void __fastcall msgcmd_cleanup_chatcmd_1(ChatCmd *a1) } } -void __fastcall msgcmd_cleanup_extern_msg(ServerCommand **extern_msgs) +void msgcmd_cleanup_extern_msg(ServerCommand **extern_msgs) { ServerCommand *v1; // esi signed int v2; // edx diff --git a/Source/msgcmd.h b/Source/msgcmd.h index 9f2b7173..fcb92132 100644 --- a/Source/msgcmd.h +++ b/Source/msgcmd.h @@ -2,21 +2,21 @@ #ifndef __MSGCMD_H__ #define __MSGCMD_H__ -void __cdecl msgcmd_init_event(); -void __cdecl msgcmd_cleanup_chatcmd_atexit(); +void msgcmd_init_event(); +void msgcmd_cleanup_chatcmd_atexit(); void __cdecl msgcmd_cleanup_chatcmd(void); -void __cdecl msgcmd_cmd_cleanup(); -void __cdecl msgcmd_send_chat(); -BOOLEAN __fastcall msgcmd_add_server_cmd_W(char *chat_message); -void __fastcall msgcmd_add_server_cmd(char *command); -void __fastcall msgcmd_init_chatcmd(ChatCmd *chat_cmd); -void __fastcall msgcmd_free_event(ChatCmd *a1); -BOOLEAN __fastcall msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *extern_msg); -ChatCmd *__fastcall msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int a5); -void __fastcall msgcmd_remove_event(ChatCmd *a1, int a2); -void __fastcall msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5); -void __fastcall msgcmd_cleanup_chatcmd_1(ChatCmd *a1); -void __fastcall msgcmd_cleanup_extern_msg(ServerCommand **extern_msgs); +void msgcmd_cmd_cleanup(); +void msgcmd_send_chat(); +BOOLEAN msgcmd_add_server_cmd_W(char *chat_message); +void msgcmd_add_server_cmd(char *command); +void msgcmd_init_chatcmd(ChatCmd *chat_cmd); +void msgcmd_free_event(ChatCmd *a1); +BOOLEAN msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *extern_msg); +ChatCmd *msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int a5); +void msgcmd_remove_event(ChatCmd *a1, int a2); +void msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5); +void msgcmd_cleanup_chatcmd_1(ChatCmd *a1); +void msgcmd_cleanup_extern_msg(ServerCommand **extern_msgs); /* rdata */ diff --git a/Source/multi.cpp b/Source/multi.cpp index 27f13dc7..7bd5a47e 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -33,7 +33,7 @@ const int event_types[3] = { EVENT_TYPE_PLAYER_MESSAGE }; -void __fastcall multi_msg_add(BYTE *a1, unsigned char a2) +void multi_msg_add(BYTE *a1, unsigned char a2) { if (a1) { if (a2) @@ -41,7 +41,7 @@ void __fastcall multi_msg_add(BYTE *a1, unsigned char a2) } } -void __fastcall NetSendLoPri(BYTE *pbMsg, BYTE bLen) +void NetSendLoPri(BYTE *pbMsg, BYTE bLen) { if (pbMsg) { if (bLen) { @@ -51,7 +51,7 @@ void __fastcall NetSendLoPri(BYTE *pbMsg, BYTE bLen) } } -void __fastcall multi_copy_packet(TBuffer *a1, void *packet, BYTE size) +void multi_copy_packet(TBuffer *a1, void *packet, BYTE size) { DWORD v3; // eax DWORD v4; // ebx @@ -68,7 +68,7 @@ void __fastcall multi_copy_packet(TBuffer *a1, void *packet, BYTE size) } } -void __fastcall multi_send_packet(void *packet, BYTE dwSize) +void multi_send_packet(void *packet, BYTE dwSize) { TPkt pkt; @@ -79,7 +79,7 @@ void __fastcall multi_send_packet(void *packet, BYTE dwSize) nthread_terminate_game("SNetSendMessage0"); } -void __fastcall NetRecvPlrData(TPkt *pkt) +void NetRecvPlrData(TPkt *pkt) { pkt->hdr.wCheck = 'ip'; pkt->hdr.px = plr[myplr].WorldX; @@ -93,7 +93,7 @@ void __fastcall NetRecvPlrData(TPkt *pkt) pkt->hdr.bdex = plr[myplr]._pBaseDex; } -void __fastcall NetSendHiPri(BYTE *pbMsg, BYTE bLen) +void NetSendHiPri(BYTE *pbMsg, BYTE bLen) { unsigned char *v5; // eax BYTE *v6; // eax @@ -122,7 +122,7 @@ void __fastcall NetSendHiPri(BYTE *pbMsg, BYTE bLen) // 678628: using guessed type int dword_678628; // 679760: using guessed type int gdwNormalMsgSize; -unsigned char *__fastcall multi_recv_packet(TBuffer *packet, unsigned char *a2, int *a3) +unsigned char *multi_recv_packet(TBuffer *packet, unsigned char *a2, int *a3) { TBuffer *v3; // esi unsigned char *result; // eax @@ -153,7 +153,7 @@ unsigned char *__fastcall multi_recv_packet(TBuffer *packet, unsigned char *a2, return result; } -void __fastcall multi_send_msg_packet(int a1, BYTE *a2, BYTE len) +void multi_send_msg_packet(int a1, BYTE *a2, BYTE len) { //const void *v3; // edx signed int v4; // ebx @@ -180,7 +180,7 @@ void __fastcall multi_send_msg_packet(int a1, BYTE *a2, BYTE len) nthread_terminate_game("SNetSendMessage"); } -void __cdecl multi_msg_countdown() +void multi_msg_countdown() { int v0; // esi @@ -194,7 +194,7 @@ void __cdecl multi_msg_countdown() } while (v0 < MAX_PLRS); } -void __fastcall multi_parse_turn(int pnum, int turn) +void multi_parse_turn(int pnum, int turn) { int v2; // esi unsigned int v3; // esi @@ -213,7 +213,7 @@ void __fastcall multi_parse_turn(int pnum, int turn) // 679704: using guessed type char byte_679704; // 679738: using guessed type int gdwTurnsInTransit; -void __fastcall multi_handle_turn_upper_bit(int pnum) +void multi_handle_turn_upper_bit(int pnum) { signed int v1; // eax @@ -231,14 +231,14 @@ void __fastcall multi_handle_turn_upper_bit(int pnum) } // 6796E4: using guessed type char gbDeltaSender; -void __fastcall multi_player_left(int pnum, int reason) +void multi_player_left(int pnum, int reason) { sgbPlayerLeftGameTbl[pnum] = 1; sgdwPlayerLeftReasonTbl[pnum] = reason; multi_clear_left_tbl(); } -void __cdecl multi_clear_left_tbl() +void multi_clear_left_tbl() { int v0; // esi @@ -257,7 +257,7 @@ void __cdecl multi_clear_left_tbl() } // 676194: using guessed type char gbBufferMsgs; -void __fastcall multi_player_left_msg(int pnum, int left) +void multi_player_left_msg(int pnum, int left) { int v2; // edi int v3; // ebx @@ -293,7 +293,7 @@ void __fastcall multi_player_left_msg(int pnum, int left) } // 6761B8: using guessed type char gbSomebodyWonGameKludge; -void __cdecl multi_net_ping() +void multi_net_ping() { sgbTimeout = 1; sglTimeoutStart = GetTickCount(); @@ -301,7 +301,7 @@ void __cdecl multi_net_ping() // 678644: using guessed type int sglTimeoutStart; // 679661: using guessed type char sgbTimeout; -int __cdecl multi_handle_delta() +int multi_handle_delta() { int v0; // esi int recieved; // [esp+4h] [ebp-4h] @@ -342,12 +342,12 @@ int __cdecl multi_handle_delta() // 679661: using guessed type char sgbTimeout; // Microsoft VisualC 2-11/net runtime -int __fastcall multi_check_pkt_valid(TBuffer *a1) +int multi_check_pkt_valid(TBuffer *a1) { return a1->dwNextWriteOffset == 0; } -void __cdecl multi_mon_seeds() +void multi_mon_seeds() { int i; DWORD l; @@ -358,7 +358,7 @@ void __cdecl multi_mon_seeds() monster[i]._mAISeed = l + i; } -void __cdecl multi_begin_timeout() +void multi_begin_timeout() { unsigned char bGroupPlayers; // bl signed int v1; // eax @@ -413,7 +413,7 @@ void __cdecl multi_begin_timeout() // 678644: using guessed type int sglTimeoutStart; // 679661: using guessed type char sgbTimeout; -void __cdecl multi_check_drop_player() +void multi_check_drop_player() { int v0; // esi int v1; // eax @@ -429,7 +429,7 @@ void __cdecl multi_check_drop_player() } while (v0 < MAX_PLRS); } -void __cdecl multi_process_network_packets() +void multi_process_network_packets() { //int v0; // eax TPktHdr *v1; // ecx @@ -524,7 +524,7 @@ void __cdecl multi_process_network_packets() // 676194: using guessed type char gbBufferMsgs; // 676198: using guessed type int pkt_counter; -void __fastcall multi_handle_all_packets(int players, TPkt *packet, int a3) +void multi_handle_all_packets(int players, TPkt *packet, int a3) { TCmd *v3; // esi int i; // edi @@ -539,7 +539,7 @@ void __fastcall multi_handle_all_packets(int players, TPkt *packet, int a3) } } -void __cdecl multi_process_tmsgs() +void multi_process_tmsgs() { int v0; // eax TPkt pkt; // [esp+0h] [ebp-200h] @@ -552,7 +552,7 @@ void __cdecl multi_process_tmsgs() } } -void __fastcall multi_send_zero_packet(int pnum, char a2, void *pbSrc, int dwLen) +void multi_send_zero_packet(int pnum, char a2, void *pbSrc, int dwLen) { unsigned int v4; // edi short v5; // si @@ -595,7 +595,7 @@ void __fastcall multi_send_zero_packet(int pnum, char a2, void *pbSrc, int dwLen } // 67975C: using guessed type int gdwLargestMsgSize; -void __cdecl NetClose() +void NetClose() { if (sgbNetInited) { sgbNetInited = 0; @@ -612,7 +612,7 @@ void __cdecl NetClose() // 679660: using guessed type char gbMaxPlayers; // 6796E8: using guessed type int sgbNetInited; -char __fastcall multi_event_handler(int a1) +char multi_event_handler(int a1) { int v1; // edi void *(__stdcall * v2)(int, void(__stdcall *)(_SNETEVENT *)); // ebx @@ -672,7 +672,7 @@ void __stdcall multi_handle_events(_SNETEVENT *pEvt) // 6761B8: using guessed type char gbSomebodyWonGameKludge; // 6796E4: using guessed type char gbDeltaSender; -int __fastcall NetInit(int bSinglePlayer, int *pfExitProgram) +int NetInit(int bSinglePlayer, int *pfExitProgram) { int v2; // ebx int v4; // eax @@ -711,18 +711,18 @@ int __fastcall NetInit(int bSinglePlayer, int *pfExitProgram) memset(&UiData, 0, 0x50u); UiData.size = 80; UiData.parentwindow = SDrawGetFrameWindow(NULL); - UiData.artcallback = (void(__cdecl *)())UiArtCallback; - UiData.createcallback = (void(__cdecl *)())UiCreateGameCallback; - UiData.drawdesccallback = (void(__cdecl *)())UiDrawDescCallback; - UiData.messageboxcallback = (void(__cdecl *)())UiMessageBoxCallback; - UiData.soundcallback = (void(__cdecl *)())UiSoundCallback; - UiData.authcallback = (void(__cdecl *)())UiAuthCallback; - UiData.getdatacallback = (void(__cdecl *)())UiGetDataCallback; - UiData.categorycallback = (void(__cdecl *)())UiCategoryCallback; + UiData.artcallback = (void(*)())UiArtCallback; + UiData.createcallback = (void(*)())UiCreateGameCallback; + UiData.drawdesccallback = (void(*)())UiDrawDescCallback; + UiData.messageboxcallback = (void(*)())UiMessageBoxCallback; + UiData.soundcallback = (void(*)())UiSoundCallback; + UiData.authcallback = (void(*)())UiAuthCallback; + UiData.getdatacallback = (void(*)())UiGetDataCallback; + UiData.categorycallback = (void(*)())UiCategoryCallback; UiData.selectnamecallback = mainmenu_select_hero_dialog; - UiData.changenamecallback = (void(__cdecl *)())mainmenu_create_hero; - UiData.profilebitmapcallback = UiProfileDraw; - UiData.profilecallback = UiProfileCallback; + UiData.changenamecallback = (void(*)())mainmenu_create_hero; + UiData.profilebitmapcallback = (void(*)())UiProfileDraw; + UiData.profilecallback = (void(*)())UiProfileCallback; UiData.profilefields = UiProfileGetString(); memset(sgbPlayerTurnBitTbl, 0, 4u); gbGameDestroyed = 0; @@ -787,13 +787,13 @@ int __fastcall NetInit(int bSinglePlayer, int *pfExitProgram) // 6796E4: using guessed type char gbDeltaSender; // 6796E8: using guessed type int sgbNetInited; -void __fastcall buffer_init(TBuffer *pBuf) +void buffer_init(TBuffer *pBuf) { pBuf->dwNextWriteOffset = 0; pBuf->bData[0] = 0; } -void __fastcall multi_send_pinfo(int pnum, char cmd) +void multi_send_pinfo(int pnum, char cmd) { char v2; // bl int v3; // esi @@ -805,7 +805,7 @@ void __fastcall multi_send_pinfo(int pnum, char cmd) dthread_send_delta(v3, v2, &pkplr, 1266); } -int __fastcall InitNewSeed(int newseed) +int InitNewSeed(int newseed) { int result; // eax @@ -826,7 +826,7 @@ int __fastcall InitNewSeed(int newseed) return result; } -void __cdecl SetupLocalCoords() +void SetupLocalCoords() { int x; // ecx int y; // edx @@ -862,7 +862,7 @@ void __cdecl SetupLocalCoords() // 5CF31D: using guessed type char setlevel; // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall multi_init_single(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info) +BOOL multi_init_single(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info) { int unused; @@ -883,7 +883,7 @@ BOOL __fastcall multi_init_single(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA } // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, int *pfExitProgram) +BOOL multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, int *pfExitProgram) { BOOL first; int playerId; @@ -924,7 +924,7 @@ BOOL __fastcall multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA // 678640: using guessed type char byte_678640; // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall multi_upgrade(int *pfExitProgram) +BOOL multi_upgrade(int *pfExitProgram) { BOOL result; int status; @@ -946,7 +946,7 @@ BOOL __fastcall multi_upgrade(int *pfExitProgram) return result; } -void __fastcall multi_player_joins(int pnum, TCmdPlrInfoHdr *cmd, int a3) +void multi_player_joins(int pnum, TCmdPlrInfoHdr *cmd, int a3) { int v3; // ebx TCmdPlrInfoHdr *v4; // edi diff --git a/Source/multi.h b/Source/multi.h index 6348f1a1..db4f024c 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -15,42 +15,42 @@ extern char szPlayerName[128]; extern BYTE gbDeltaSender; // weak extern int player_state[MAX_PLRS]; -void __fastcall multi_msg_add(BYTE *a1, unsigned char a2); -void __fastcall NetSendLoPri(BYTE *pbMsg, BYTE bLen); -void __fastcall multi_copy_packet(TBuffer *a1, void *packet, BYTE size); -void __fastcall multi_send_packet(void *packet, BYTE dwSize); -void __fastcall NetRecvPlrData(TPkt *pkt); -void __fastcall NetSendHiPri(BYTE *pbMsg, BYTE bLen); -unsigned char *__fastcall multi_recv_packet(TBuffer *packet, unsigned char *a2, int *a3); -void __fastcall multi_send_msg_packet(int a1, BYTE *a2, BYTE len); -void __cdecl multi_msg_countdown(); -void __fastcall multi_parse_turn(int pnum, int turn); -void __fastcall multi_handle_turn_upper_bit(int pnum); -void __fastcall multi_player_left(int pnum, int reason); -void __cdecl multi_clear_left_tbl(); -void __fastcall multi_player_left_msg(int pnum, int left); -void __cdecl multi_net_ping(); -int __cdecl multi_handle_delta(); -int __fastcall multi_check_pkt_valid(TBuffer *a1); -void __cdecl multi_mon_seeds(); -void __cdecl multi_begin_timeout(); -void __cdecl multi_check_drop_player(); -void __cdecl multi_process_network_packets(); -void __fastcall multi_handle_all_packets(int players, TPkt *packet, int a3); -void __cdecl multi_process_tmsgs(); -void __fastcall multi_send_zero_packet(int pnum, char a2, void *pbSrc, int dwLen); -void __cdecl NetClose(); -char __fastcall multi_event_handler(int a1); +void multi_msg_add(BYTE *a1, unsigned char a2); +void NetSendLoPri(BYTE *pbMsg, BYTE bLen); +void multi_copy_packet(TBuffer *a1, void *packet, BYTE size); +void multi_send_packet(void *packet, BYTE dwSize); +void NetRecvPlrData(TPkt *pkt); +void NetSendHiPri(BYTE *pbMsg, BYTE bLen); +unsigned char *multi_recv_packet(TBuffer *packet, unsigned char *a2, int *a3); +void multi_send_msg_packet(int a1, BYTE *a2, BYTE len); +void multi_msg_countdown(); +void multi_parse_turn(int pnum, int turn); +void multi_handle_turn_upper_bit(int pnum); +void multi_player_left(int pnum, int reason); +void multi_clear_left_tbl(); +void multi_player_left_msg(int pnum, int left); +void multi_net_ping(); +int multi_handle_delta(); +int multi_check_pkt_valid(TBuffer *a1); +void multi_mon_seeds(); +void multi_begin_timeout(); +void multi_check_drop_player(); +void multi_process_network_packets(); +void multi_handle_all_packets(int players, TPkt *packet, int a3); +void multi_process_tmsgs(); +void multi_send_zero_packet(int pnum, char a2, void *pbSrc, int dwLen); +void NetClose(); +char multi_event_handler(int a1); void __stdcall multi_handle_events(_SNETEVENT *pEvt); -int __fastcall NetInit(int bSinglePlayer, int *pfExitProgram); -void __fastcall buffer_init(TBuffer *pBuf); -void __fastcall multi_send_pinfo(int pnum, char cmd); -int __fastcall InitNewSeed(int newseed); -void __cdecl SetupLocalCoords(); -BOOL __fastcall multi_init_single(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info); -BOOL __fastcall multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, int *pfExitProgram); -BOOL __fastcall multi_upgrade(int *pfExitProgram); -void __fastcall multi_player_joins(int pnum, TCmdPlrInfoHdr *cmd, int a3); +int NetInit(int bSinglePlayer, int *pfExitProgram); +void buffer_init(TBuffer *pBuf); +void multi_send_pinfo(int pnum, char cmd); +int InitNewSeed(int newseed); +void SetupLocalCoords(); +BOOL multi_init_single(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info); +BOOL multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, int *pfExitProgram); +BOOL multi_upgrade(int *pfExitProgram); +void multi_player_joins(int pnum, TCmdPlrInfoHdr *cmd, int a3); /* rdata */ diff --git a/Source/nthread.cpp b/Source/nthread.cpp index 0f77efff..ed07094b 100644 --- a/Source/nthread.cpp +++ b/Source/nthread.cpp @@ -35,12 +35,12 @@ nthread_c_init(void) SEG_ALLOCATE(SEGMENT_C_INIT) _PVFV nthread_c_init_funcs[] = { &nthread_c_init }; -void __cdecl nthread_init_mutex() +void nthread_init_mutex() { InitializeCriticalSection(&sgMemCrit); } -void __cdecl nthread_cleanup_mutex_atexit() +void nthread_cleanup_mutex_atexit() { atexit(nthread_cleanup_mutex); } @@ -50,7 +50,7 @@ void __cdecl nthread_cleanup_mutex(void) DeleteCriticalSection(&sgMemCrit); } -void __fastcall nthread_terminate_game(const char *pszFcn) +void nthread_terminate_game(const char *pszFcn) { DWORD sErr; // eax @@ -65,7 +65,7 @@ void __fastcall nthread_terminate_game(const char *pszFcn) } // 67862D: using guessed type char gbGameDestroyed; -int __fastcall nthread_send_and_recv_turn(int cur_turn, int turn_delta) +int nthread_send_and_recv_turn(int cur_turn, int turn_delta) { unsigned int new_cur_turn; // edi const char *lastStormFn; // ecx @@ -103,7 +103,7 @@ int __fastcall nthread_send_and_recv_turn(int cur_turn, int turn_delta) // 679738: using guessed type int gdwTurnsInTransit; // 679754: using guessed type int turn_upper_bit; -int __fastcall nthread_recv_turns(int *pfSendAsync) +int nthread_recv_turns(int *pfSendAsync) { BOOLEAN hasCountedDown; // zf @@ -141,13 +141,13 @@ int __fastcall nthread_recv_turns(int *pfSendAsync) // 679759: using guessed type char sgbPacketCountdown; // 679764: using guessed type int last_tick; -void __cdecl nthread_set_turn_upper_bit() +void nthread_set_turn_upper_bit() { turn_upper_bit = 0x80000000; } // 679754: using guessed type int turn_upper_bit; -void __fastcall nthread_start(BOOL set_turn_upper_bit) +void nthread_start(BOOL set_turn_upper_bit) { char *err; // eax unsigned int largestMsgSize; // esi @@ -247,7 +247,7 @@ unsigned int __stdcall nthread_handler(void *a1) // 679734: using guessed type char nthread_should_run; // 679764: using guessed type int last_tick; -void __cdecl nthread_cleanup() +void nthread_cleanup() { nthread_should_run = 0; gdwTurnsInTransit = 0; @@ -269,7 +269,7 @@ void __cdecl nthread_cleanup() // 67975C: using guessed type int gdwLargestMsgSize; // 679760: using guessed type int gdwNormalMsgSize; -void __fastcall nthread_ignore_mutex(BOOL bStart) +void nthread_ignore_mutex(BOOL bStart) { if (sghThread != (HANDLE)-1) { if (bStart) @@ -281,7 +281,7 @@ void __fastcall nthread_ignore_mutex(BOOL bStart) } // 67975A: using guessed type char sgbThreadIsRunning; -BOOL __fastcall nthread_has_500ms_passed(BOOL unused) +BOOL nthread_has_500ms_passed(BOOL unused) { DWORD currentTickCount; // eax int ticksElapsed; // ecx diff --git a/Source/nthread.h b/Source/nthread.h index 331bbfc3..c374059d 100644 --- a/Source/nthread.h +++ b/Source/nthread.h @@ -15,18 +15,18 @@ extern int gdwLargestMsgSize; // weak extern int gdwNormalMsgSize; // weak extern int last_tick; // weak -void __cdecl nthread_init_mutex(); -void __cdecl nthread_cleanup_mutex_atexit(); +void nthread_init_mutex(); +void nthread_cleanup_mutex_atexit(); void __cdecl nthread_cleanup_mutex(void); -void __fastcall nthread_terminate_game(const char *pszFcn); -int __fastcall nthread_send_and_recv_turn(int cur_turn, int turn_delta); -int __fastcall nthread_recv_turns(int *pfSendAsync); -void __cdecl nthread_set_turn_upper_bit(); -void __fastcall nthread_start(BOOL set_turn_upper_bit); +void nthread_terminate_game(const char *pszFcn); +int nthread_send_and_recv_turn(int cur_turn, int turn_delta); +int nthread_recv_turns(int *pfSendAsync); +void nthread_set_turn_upper_bit(); +void nthread_start(BOOL set_turn_upper_bit); unsigned int __stdcall nthread_handler(void *a1); -void __cdecl nthread_cleanup(); -void __fastcall nthread_ignore_mutex(BOOL bStart); -BOOL __fastcall nthread_has_500ms_passed(BOOL unused); +void nthread_cleanup(); +void nthread_ignore_mutex(BOOL bStart); +BOOL nthread_has_500ms_passed(BOOL unused); /* rdata */ diff --git a/Source/objects.cpp b/Source/objects.cpp index 6345172d..54f0b90e 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -354,7 +354,7 @@ int StoryText[3][3] = { { QUEST_BOOK31, QUEST_BOOK32, QUEST_BOOK33 } }; -void __cdecl InitObjectGFX() +void InitObjectGFX() { BOOLEAN fileload[56]; char filestr[32]; @@ -393,7 +393,7 @@ void __cdecl InitObjectGFX() // 67D7C4: using guessed type int numobjfiles; // 44121D: using guessed type char fileload[56]; -void __cdecl FreeObjectGFX() +void FreeObjectGFX() { int i; void *ptr; @@ -407,7 +407,7 @@ void __cdecl FreeObjectGFX() } // 67D7C4: using guessed type int numobjfiles; -BOOL __fastcall RndLocOk(int xp, int yp) +BOOL RndLocOk(int xp, int yp) { if (dMonster[xp][yp]) return FALSE; @@ -424,7 +424,7 @@ BOOL __fastcall RndLocOk(int xp, int yp) return FALSE; } -void __fastcall InitRndLocObj(int min, int max, int objtype) +void InitRndLocObj(int min, int max, int objtype) { int i, xp, yp, numobjs; @@ -450,7 +450,7 @@ void __fastcall InitRndLocObj(int min, int max, int objtype) } } -void __fastcall InitRndLocBigObj(int min, int max, int objtype) +void InitRndLocBigObj(int min, int max, int objtype) { int i, xp, yp, numobjs; @@ -478,7 +478,7 @@ void __fastcall InitRndLocBigObj(int min, int max, int objtype) } } -void __fastcall InitRndLocObj5x5(int min, int max, int objtype) +void InitRndLocObj5x5(int min, int max, int objtype) { BOOL exit; int xp, yp, numobjs, i, k, m, n; @@ -506,7 +506,7 @@ void __fastcall InitRndLocObj5x5(int min, int max, int objtype) } } -void __cdecl ClrAllObjects() +void ClrAllObjects() { int i; @@ -536,7 +536,7 @@ void __cdecl ClrAllObjects() // 679768: using guessed type int trapid; // 67976C: using guessed type int trapdir; -void __cdecl AddTortures() +void AddTortures() { int ox, oy; @@ -559,7 +559,7 @@ void __cdecl AddTortures() } } } -void __cdecl AddCandles() +void AddCandles() { int tx, ty; @@ -571,7 +571,7 @@ void __cdecl AddCandles() AddObject(OBJ_STORYCANDLE, tx + 2, ty + 2); } -void __fastcall AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg) +void AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg) { BOOL exit; int xp, yp, ob, k, m, n; @@ -610,7 +610,7 @@ void __fastcall AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, object[ob]._oVar6 = object[ob]._oAnimFrame + 1; } -void __cdecl InitRndBarrels() +void InitRndBarrels() { int v0; // ebp int v1; // esi @@ -661,7 +661,7 @@ void __cdecl InitRndBarrels() } } -void __fastcall AddL1Objs(int x1, int y1, int x2, int y2) +void AddL1Objs(int x1, int y1, int x2, int y2) { int i, j, pn; @@ -678,7 +678,7 @@ void __fastcall AddL1Objs(int x1, int y1, int x2, int y2) } } -void __fastcall AddL2Objs(int x1, int y1, int x2, int y2) +void AddL2Objs(int x1, int y1, int x2, int y2) { int i, j, pn; @@ -693,7 +693,7 @@ void __fastcall AddL2Objs(int x1, int y1, int x2, int y2) } } -void __fastcall AddL3Objs(int x1, int y1, int x2, int y2) +void AddL3Objs(int x1, int y1, int x2, int y2) { int i, j, pn; @@ -708,14 +708,14 @@ void __fastcall AddL3Objs(int x1, int y1, int x2, int y2) } } -BOOL __fastcall WallTrapLocOk(int xp, int yp) +BOOL WallTrapLocOk(int xp, int yp) { if (dFlags[xp][yp] & DFLAG_POPULATED) return FALSE; return TRUE; } -void __cdecl AddL2Torches() +void AddL2Torches() { int v0; // esi int v1; // edi @@ -765,7 +765,7 @@ void __cdecl AddL2Torches() } while ((signed int)v7 < (signed int)dPiece[1]); } -BOOL __fastcall TorchLocOK(int xp, int yp) +BOOL TorchLocOK(int xp, int yp) { if (dFlags[xp][yp] & DFLAG_POPULATED) return FALSE; @@ -773,7 +773,7 @@ BOOL __fastcall TorchLocOK(int xp, int yp) return nTrapTable[dPiece[xp][yp]] != FALSE; } -void __cdecl AddObjTraps() +void AddObjTraps() { int v0; // esi int *v1; // eax @@ -856,7 +856,7 @@ void __cdecl AddObjTraps() } while ((signed int)v12 < (signed int)dPiece); } -void __cdecl AddChestTraps() +void AddChestTraps() { int i, j; char oi; @@ -879,7 +879,7 @@ void __cdecl AddChestTraps() } } -void __fastcall LoadMapObjects(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx) +void LoadMapObjects(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx) { unsigned char *v8; // ebx int v9; // esi @@ -929,7 +929,7 @@ void __fastcall LoadMapObjects(unsigned char *pMap, int startx, int starty, int InitObjFlag = FALSE; } -void __fastcall LoadMapObjs(unsigned char *pMap, int startx, int starty) +void LoadMapObjs(unsigned char *pMap, int startx, int starty) { unsigned char *v3; // esi int v4; // eax @@ -970,7 +970,7 @@ void __fastcall LoadMapObjs(unsigned char *pMap, int startx, int starty) InitObjFlag = FALSE; } -void __cdecl AddDiabObjs() +void AddDiabObjs() { unsigned char *v0; // esi unsigned char *v1; // esi @@ -989,7 +989,7 @@ void __cdecl AddDiabObjs() // 5289C4: using guessed type int diabquad1x; // 5289C8: using guessed type int diabquad1y; -void __cdecl AddStoryBooks() +void AddStoryBooks() { int v0; // esi int v1; // edi @@ -1031,7 +1031,7 @@ void __cdecl AddStoryBooks() AddObject(OBJ_STORYCANDLE, v4, v1 + 1); } -void __fastcall AddHookedBodies(int freq) +void AddHookedBodies(int freq) { int v1; // ebx char *v2; // esi @@ -1099,7 +1099,7 @@ void __fastcall AddHookedBodies(int freq) } while (v1 < 96); } -void __cdecl AddL4Goodies() +void AddL4Goodies() { AddHookedBodies(6); InitRndLocObj(2, 6, OBJ_TNUDEM1); @@ -1113,7 +1113,7 @@ void __cdecl AddL4Goodies() InitRndLocObj(1, 3, OBJ_CAULDRON); } -void __cdecl AddLazStand() +void AddLazStand() { int v0; // edi int v1; // esi @@ -1160,7 +1160,7 @@ void __cdecl AddLazStand() AddObject(OBJ_STORYCANDLE, v4, v1 + 1); } -void __cdecl InitObjects() +void InitObjects() { //int v1; // eax //int v2; // eax @@ -1285,7 +1285,7 @@ void __cdecl InitObjects() // 5CF334: using guessed type int setpc_w; // 679660: using guessed type char gbMaxPlayers; -void __fastcall SetMapObjects(unsigned char *pMap, int startx, int starty) +void SetMapObjects(unsigned char *pMap, int startx, int starty) { unsigned char *v3; // esi int v6; // edi @@ -1376,7 +1376,7 @@ void __fastcall SetMapObjects(unsigned char *pMap, int startx, int starty) // 67D7C4: using guessed type int numobjfiles; // 4427C5: using guessed type int var_10C[56]; -void __fastcall DeleteObject_(int oi, int i) +void DeleteObject_(int oi, int i) { int ox, oy; @@ -1389,7 +1389,7 @@ void __fastcall DeleteObject_(int oi, int i) objectactive[i] = objectactive[nobjects]; } -void __fastcall SetupObject(int i, int x, int y, int ot) +void SetupObject(int i, int x, int y, int ot) { int v4; // esi int v5; // edi @@ -1442,7 +1442,7 @@ void __fastcall SetupObject(int i, int x, int y, int ot) object[v4]._oDoorFlag = FALSE; } -void __fastcall SetObjMapRange(int i, int x1, int y1, int x2, int y2, int v) +void SetObjMapRange(int i, int x1, int y1, int x2, int y2, int v) { object[i]._oVar1 = x1; object[i]._oVar2 = y1; @@ -1451,12 +1451,12 @@ void __fastcall SetObjMapRange(int i, int x1, int y1, int x2, int y2, int v) object[i]._oVar8 = v; } -void __fastcall SetBookMsg(int i, int msg) +void SetBookMsg(int i, int msg) { object[i]._oVar7 = msg; } -void __fastcall AddL1Door(int i, int x, int y, int ot) +void AddL1Door(int i, int x, int y, int ot) { int p1, p2; @@ -1473,7 +1473,7 @@ void __fastcall AddL1Door(int i, int x, int y, int ot) object[i]._oVar4 = 0; } -void __fastcall AddSCambBook(int i) +void AddSCambBook(int i) { object[i]._oVar1 = setpc_x; object[i]._oVar2 = setpc_y; @@ -1484,7 +1484,7 @@ void __fastcall AddSCambBook(int i) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall AddChest(int i, int t) +void AddChest(int i, int t) { if (!random(147, 2)) object[i]._oAnimFrame += 3; @@ -1519,7 +1519,7 @@ void __fastcall AddChest(int i, int t) } // 5CF31D: using guessed type char setlevel; -void __fastcall AddL2Door(int i, int x, int y, int ot) +void AddL2Door(int i, int x, int y, int ot) { int v4; // esi @@ -1532,7 +1532,7 @@ void __fastcall AddL2Door(int i, int x, int y, int ot) object[v4]._oVar4 = 0; } -void __fastcall AddL3Door(int i, int x, int y, int ot) +void AddL3Door(int i, int x, int y, int ot) { int v4; // esi @@ -1545,7 +1545,7 @@ void __fastcall AddL3Door(int i, int x, int y, int ot) object[v4]._oVar4 = 0; } -void __fastcall AddSarc(int i) +void AddSarc(int i) { dObject[object[i]._ox][object[i]._oy - 1] = -(i + 1); object[i]._oVar1 = random(153, 10); @@ -1554,7 +1554,7 @@ void __fastcall AddSarc(int i) object[i]._oVar2 = PreSpawnSkeleton(); } -void __fastcall AddFlameTrap(int i) +void AddFlameTrap(int i) { object[i]._oVar1 = trapid; object[i]._oVar2 = 0; @@ -1564,14 +1564,14 @@ void __fastcall AddFlameTrap(int i) // 679768: using guessed type int trapid; // 67976C: using guessed type int trapdir; -void __fastcall AddFlameLvr(int i) +void AddFlameLvr(int i) { object[i]._oVar1 = trapid; object[i]._oVar2 = 49; } // 679768: using guessed type int trapid; -void __fastcall AddTrap(int i) +void AddTrap(int i) { int mt; @@ -1585,7 +1585,7 @@ void __fastcall AddTrap(int i) object[i]._oVar4 = 0; } -void __fastcall AddObjLight(int i, int r) +void AddObjLight(int i, int r) { if (InitObjFlag) { DoLighting(object[i]._ox, object[i]._oy, r, -1); @@ -1595,7 +1595,7 @@ void __fastcall AddObjLight(int i, int r) } } -void __fastcall AddBarrel(int i) +void AddBarrel(int i) { object[i]._oVar1 = 0; object[i]._oRndSeed = GetRndSeed(); @@ -1606,7 +1606,7 @@ void __fastcall AddBarrel(int i) object[i]._oVar4 = PreSpawnSkeleton(); } -void __fastcall AddShrine(int i) +void AddShrine(int i) { int val, j, slist[26]; @@ -1643,7 +1643,7 @@ void __fastcall AddShrine(int i) // 679660: using guessed type char gbMaxPlayers; // 442E0F: using guessed type int var_68[26]; -void __fastcall AddBookcase(int i) +void AddBookcase(int i) { int v1; // esi @@ -1652,7 +1652,7 @@ void __fastcall AddBookcase(int i) object[v1]._oPreFlag = TRUE; } -void __fastcall AddPurifyingFountain(int i) +void AddPurifyingFountain(int i) { int ox, oy; @@ -1664,7 +1664,7 @@ void __fastcall AddPurifyingFountain(int i) object[i]._oRndSeed = GetRndSeed(); } -void __fastcall AddArmorStand(int i) +void AddArmorStand(int i) { if (!armorFlag) { object[i]._oSelFlag = 0; @@ -1674,14 +1674,14 @@ void __fastcall AddArmorStand(int i) object[i]._oRndSeed = GetRndSeed(); } -void __fastcall AddDecap(int i) +void AddDecap(int i) { object[i]._oRndSeed = GetRndSeed(); object[i]._oAnimFrame = random(151, 8) + 1; object[i]._oPreFlag = TRUE; } -void __fastcall AddVilebook(int i) +void AddVilebook(int i) { if (setlevel) { if (setlvlnum == SL_VILEBETRAYER) @@ -1690,7 +1690,7 @@ void __fastcall AddVilebook(int i) } // 5CF31D: using guessed type char setlevel; -void __fastcall AddMagicCircle(int i) +void AddMagicCircle(int i) { object[i]._oRndSeed = GetRndSeed(); object[i]._oPreFlag = TRUE; @@ -1698,12 +1698,12 @@ void __fastcall AddMagicCircle(int i) object[i]._oVar6 = 0; } -void __fastcall AddBookstand(int i) +void AddBookstand(int i) { object[i]._oRndSeed = GetRndSeed(); } -void __fastcall AddPedistal(int i) +void AddPedistal(int i) { object[i]._oVar1 = setpc_x; object[i]._oVar2 = setpc_y; @@ -1711,7 +1711,7 @@ void __fastcall AddPedistal(int i) object[i]._oVar4 = setpc_y + setpc_h; } -void __fastcall AddStoryBook(int i) +void AddStoryBook(int i) { int bookframe; @@ -1730,7 +1730,7 @@ void __fastcall AddStoryBook(int i) object[i]._oVar4 = object[i]._oAnimFrame + 1; } -void __fastcall AddWeaponRack(int i) +void AddWeaponRack(int i) { if (!weaponFlag) { object[i]._oSelFlag = 0; @@ -1739,14 +1739,14 @@ void __fastcall AddWeaponRack(int i) object[i]._oRndSeed = GetRndSeed(); } -void __fastcall AddTorturedBody(int i) +void AddTorturedBody(int i) { object[i]._oRndSeed = GetRndSeed(); object[i]._oPreFlag = TRUE; object[i]._oAnimFrame = random(0, 4) + 1; } -void __fastcall GetRndObjLoc(int randarea, int *xx, int *yy) +void GetRndObjLoc(int randarea, int *xx, int *yy) { BOOL failed; int i, j, tries; @@ -1772,7 +1772,7 @@ void __fastcall GetRndObjLoc(int randarea, int *xx, int *yy) } } -void __cdecl AddMushPatch() +void AddMushPatch() { int i; // bl int y; // [esp+0h] [ebp-8h] @@ -1788,7 +1788,7 @@ void __cdecl AddMushPatch() } } -void __cdecl AddSlainHero() +void AddSlainHero() { int x; // [esp+0h] [ebp-8h] int y; // [esp+4h] [ebp-4h] @@ -1797,7 +1797,7 @@ void __cdecl AddSlainHero() AddObject(OBJ_SLAINHERO, x + 2, y + 2); } -void __fastcall AddObject(int ot, int ox, int oy) +void AddObject(int ot, int ox, int oy) { int v3; // ebp int v4; // esi @@ -1945,7 +1945,7 @@ void __fastcall AddObject(int ot, int ox, int oy) } } -void __fastcall Obj_Light(int i, int lr) +void Obj_Light(int i, int lr) { int v2; // esi int v3; // ebx @@ -1995,7 +1995,7 @@ void __fastcall Obj_Light(int i, int lr) } // 646A28: using guessed type int lightflag; -void __fastcall Obj_Circle(int i) +void Obj_Circle(int i) { int v1; // ecx int v2; // edx @@ -2049,7 +2049,7 @@ void __fastcall Obj_Circle(int i) } // 525748: using guessed type char sgbMouseDown; -void __fastcall Obj_StopAnim(int i) +void Obj_StopAnim(int i) { if (object[i]._oAnimFrame == object[i]._oAnimLen) { object[i]._oAnimCnt = 0; @@ -2057,7 +2057,7 @@ void __fastcall Obj_StopAnim(int i) } } -void __fastcall Obj_Door(int i) +void Obj_Door(int i) { int dy; // edx int dx; // eax @@ -2079,13 +2079,13 @@ void __fastcall Obj_Door(int i) } } -void __fastcall Obj_Sarc(int i) +void Obj_Sarc(int i) { if (object[i]._oAnimFrame == object[i]._oAnimLen) object[i]._oAnimFlag = 0; } -void __fastcall ActivateTrapLine(int ttype, int tid) +void ActivateTrapLine(int ttype, int tid) { int i, oi; @@ -2100,7 +2100,7 @@ void __fastcall ActivateTrapLine(int ttype, int tid) } } -void __fastcall Obj_FlameTrap(int i) +void Obj_FlameTrap(int i) { int x, y; int j, k; @@ -2143,7 +2143,7 @@ void __fastcall Obj_FlameTrap(int i) } } -void __fastcall Obj_Trap(int i) +void Obj_Trap(int i) { int oti, dir; BOOL otrig; @@ -2197,7 +2197,7 @@ void __fastcall Obj_Trap(int i) } // 676190: using guessed type int deltaload; -void __fastcall Obj_BCrossDamage(int i) +void Obj_BCrossDamage(int i) { int v1; // esi BOOLEAN v2; // zf @@ -2240,7 +2240,7 @@ void __fastcall Obj_BCrossDamage(int i) } } -void __cdecl ProcessObjects() +void ProcessObjects() { int v0; // ebx int v1; // edi @@ -2359,7 +2359,7 @@ LABEL_45: } } -void __fastcall ObjSetMicro(int dx, int dy, int pn) +void ObjSetMicro(int dx, int dy, int pn) { int v3; // esi char *v4; // eax @@ -2388,7 +2388,7 @@ void __fastcall ObjSetMicro(int dx, int dy, int pn) } } -void __fastcall objects_set_door_piece(int x, int y) +void objects_set_door_piece(int x, int y) { int v2; // edi int v3; // ST10_4 @@ -2405,7 +2405,7 @@ void __fastcall objects_set_door_piece(int x, int y) dpiece_defs_map_1[0][16 * IsometricCoord(v3, v2) + 1] = v6; } -void __fastcall ObjSetMini(int x, int y, int v) +void ObjSetMini(int x, int y, int v) { int xx, yy; long v1, v2, v3, v4; @@ -2447,7 +2447,7 @@ void __fastcall ObjSetMini(int x, int y, int v) ObjSetMicro(xx + 1, yy + 1, v4); } -void __fastcall ObjL1Special(int x1, int y1, int x2, int y2) +void ObjL1Special(int x1, int y1, int x2, int y2) { int i; // ebx int v5; // edx @@ -2501,7 +2501,7 @@ void __fastcall ObjL1Special(int x1, int y1, int x2, int y2) } } -void __fastcall ObjL2Special(int x1, int y1, int x2, int y2) +void ObjL2Special(int x1, int y1, int x2, int y2) { int v4; // edi int v5; // esi @@ -2575,7 +2575,7 @@ void __fastcall ObjL2Special(int x1, int y1, int x2, int y2) } } -void __fastcall DoorSet(int oi, int dx, int dy) +void DoorSet(int oi, int dx, int dy) { int v3; // esi int v4; // ebp @@ -2626,7 +2626,7 @@ void __fastcall DoorSet(int oi, int dx, int dy) } } -void __cdecl RedoPlayerVision() +void RedoPlayerVision() { int p; @@ -2637,7 +2637,7 @@ void __cdecl RedoPlayerVision() } } -void __fastcall OperateL1RDoor(int pnum, int oi, unsigned char sendflag) +void OperateL1RDoor(int pnum, int oi, unsigned char sendflag) { int v3; // esi int v4; // eax @@ -2701,7 +2701,7 @@ void __fastcall OperateL1RDoor(int pnum, int oi, unsigned char sendflag) } // 676190: using guessed type int deltaload; -void __fastcall OperateL1LDoor(int pnum, int oi, unsigned char sendflag) +void OperateL1LDoor(int pnum, int oi, unsigned char sendflag) { int v3; // esi int v4; // eax @@ -2768,7 +2768,7 @@ void __fastcall OperateL1LDoor(int pnum, int oi, unsigned char sendflag) } // 676190: using guessed type int deltaload; -void __fastcall OperateL2RDoor(int pnum, int oi, unsigned char sendflag) +void OperateL2RDoor(int pnum, int oi, unsigned char sendflag) { int v3; // esi int v4; // eax @@ -2817,7 +2817,7 @@ void __fastcall OperateL2RDoor(int pnum, int oi, unsigned char sendflag) } // 676190: using guessed type int deltaload; -void __fastcall OperateL2LDoor(int pnum, int oi, unsigned char sendflag) +void OperateL2LDoor(int pnum, int oi, unsigned char sendflag) { int v3; // esi int v4; // eax @@ -2866,7 +2866,7 @@ void __fastcall OperateL2LDoor(int pnum, int oi, unsigned char sendflag) } // 676190: using guessed type int deltaload; -void __fastcall OperateL3RDoor(int pnum, int oi, unsigned char sendflag) +void OperateL3RDoor(int pnum, int oi, unsigned char sendflag) { int v3; // esi int v4; // eax @@ -2915,7 +2915,7 @@ void __fastcall OperateL3RDoor(int pnum, int oi, unsigned char sendflag) } // 676190: using guessed type int deltaload; -void __fastcall OperateL3LDoor(int pnum, int oi, unsigned char sendflag) +void OperateL3LDoor(int pnum, int oi, unsigned char sendflag) { int v3; // esi int v4; // eax @@ -2964,7 +2964,7 @@ void __fastcall OperateL3LDoor(int pnum, int oi, unsigned char sendflag) } // 676190: using guessed type int deltaload; -void __fastcall MonstCheckDoors(int m) +void MonstCheckDoors(int m) { int i, oi; int dpx, dpy, mx, my; @@ -3009,7 +3009,7 @@ void __fastcall MonstCheckDoors(int m) } } -void __fastcall ObjChangeMap(int x1, int y1, int x2, int y2) +void ObjChangeMap(int x1, int y1, int x2, int y2) { int v4; // ebx int v5; // edi @@ -3050,7 +3050,7 @@ void __fastcall ObjChangeMap(int x1, int y1, int x2, int y2) } } -void __fastcall ObjChangeMapResync(int x1, int y1, int x2, int y2) +void ObjChangeMapResync(int x1, int y1, int x2, int y2) { int v4; // edi int v5; // esi @@ -3083,7 +3083,7 @@ void __fastcall ObjChangeMapResync(int x1, int y1, int x2, int y2) ObjL2Special(2 * v6 + 16, 2 * v5 + 16, 2 * x2 + 17, 2 * v4 + 17); } -void __fastcall OperateL1Door(int pnum, int i, unsigned char sendflag) +void OperateL1Door(int pnum, int i, unsigned char sendflag) { int dpx, dpy; @@ -3095,7 +3095,7 @@ void __fastcall OperateL1Door(int pnum, int i, unsigned char sendflag) OperateL1RDoor(pnum, i, sendflag); } -void __fastcall OperateLever(int pnum, int i) +void OperateLever(int pnum, int i) { int v2; // esi int *v3; // edi @@ -3138,7 +3138,7 @@ void __fastcall OperateLever(int pnum, int i) } // 676190: using guessed type int deltaload; -void __fastcall OperateBook(int pnum, int i) +void OperateBook(int pnum, int i) { signed int v4; // ecx int v5; // eax @@ -3227,7 +3227,7 @@ void __fastcall OperateBook(int pnum, int i) // 5CF31D: using guessed type char setlevel; // 676190: using guessed type int deltaload; -void __fastcall OperateBookLever(int pnum, int i) +void OperateBookLever(int pnum, int i) { int x, y, tren; @@ -3271,7 +3271,7 @@ void __fastcall OperateBookLever(int pnum, int i) } } -void __fastcall OperateSChambBk(int pnum, int i) +void OperateSChambBk(int pnum, int i) { int j, textdef; @@ -3298,7 +3298,7 @@ void __fastcall OperateSChambBk(int pnum, int i) } } -void __fastcall OperateChest(int pnum, int i, unsigned char sendmsg) +void OperateChest(int pnum, int i, unsigned char sendmsg) { int v3; // esi BOOLEAN v4; // zf @@ -3375,7 +3375,7 @@ void __fastcall OperateChest(int pnum, int i, unsigned char sendmsg) // 5CF31D: using guessed type char setlevel; // 676190: using guessed type int deltaload; -void __fastcall OperateMushPatch(int pnum, int i) +void OperateMushPatch(int pnum, int i) { int x, y; @@ -3404,7 +3404,7 @@ void __fastcall OperateMushPatch(int pnum, int i) } } -void __fastcall OperateInnSignChest(int pnum, int i) +void OperateInnSignChest(int pnum, int i) { int x, y; @@ -3433,7 +3433,7 @@ void __fastcall OperateInnSignChest(int pnum, int i) } // 676190: using guessed type int deltaload; -void __fastcall OperateSlainHero(int pnum, int i, unsigned char sendmsg) +void OperateSlainHero(int pnum, int i, unsigned char sendmsg) { if (object[i]._oSelFlag) { object[i]._oSelFlag = 0; @@ -3455,7 +3455,7 @@ void __fastcall OperateSlainHero(int pnum, int i, unsigned char sendmsg) } // 676190: using guessed type int deltaload; -void __fastcall OperateTrapLvr(int i) +void OperateTrapLvr(int i) { int v1; // ecx int v2; // eax @@ -3496,7 +3496,7 @@ void __fastcall OperateTrapLvr(int i) } } -void __fastcall OperateSarc(int pnum, int i, unsigned char sendmsg) +void OperateSarc(int pnum, int i, unsigned char sendmsg) { if (object[i]._oSelFlag) { if (!deltaload) @@ -3519,7 +3519,7 @@ void __fastcall OperateSarc(int pnum, int i, unsigned char sendmsg) } // 676190: using guessed type int deltaload; -void __fastcall OperateL2Door(int pnum, int i, unsigned char sendflag) +void OperateL2Door(int pnum, int i, unsigned char sendflag) { int dpx, dpy; @@ -3531,7 +3531,7 @@ void __fastcall OperateL2Door(int pnum, int i, unsigned char sendflag) OperateL2RDoor(pnum, i, sendflag); } -void __fastcall OperateL3Door(int pnum, int i, unsigned char sendflag) +void OperateL3Door(int pnum, int i, unsigned char sendflag) { int dpx, dpy; @@ -3543,7 +3543,7 @@ void __fastcall OperateL3Door(int pnum, int i, unsigned char sendflag) OperateL3LDoor(pnum, i, sendflag); } -void __fastcall OperatePedistal(int pnum, int i) +void OperatePedistal(int pnum, int i) { int v2; // esi int v3; // edi @@ -3583,7 +3583,7 @@ void __fastcall OperatePedistal(int pnum, int i) // 5CF334: using guessed type int setpc_w; // 676190: using guessed type int deltaload; -void __fastcall TryDisarm(int pnum, int i) +void TryDisarm(int pnum, int i) { int j, oi, oti, trapdisper; BOOL checkflag; @@ -3613,7 +3613,7 @@ void __fastcall TryDisarm(int pnum, int i) } } -int __fastcall ItemMiscIdIdx(int imiscid) +int ItemMiscIdIdx(int imiscid) { int i; @@ -3623,7 +3623,7 @@ int __fastcall ItemMiscIdIdx(int imiscid) return i; } -void __fastcall OperateShrine(int pnum, int i, int sType) +void OperateShrine(int pnum, int i, int sType) { int v1; int v12; // edx @@ -4160,7 +4160,7 @@ void __fastcall OperateShrine(int pnum, int i, int sType) // 52571C: using guessed type int drawpanflag; // 676190: using guessed type int deltaload; -void __fastcall OperateSkelBook(int pnum, int i, BOOL sendmsg) +void OperateSkelBook(int pnum, int i, BOOL sendmsg) { if (object[i]._oSelFlag) { if (!deltaload) @@ -4179,7 +4179,7 @@ void __fastcall OperateSkelBook(int pnum, int i, BOOL sendmsg) } } -void __fastcall OperateBookCase(int pnum, int i, BOOL sendmsg) +void OperateBookCase(int pnum, int i, BOOL sendmsg) { if (object[i]._oSelFlag) { if (!deltaload) @@ -4205,7 +4205,7 @@ void __fastcall OperateBookCase(int pnum, int i, BOOL sendmsg) } // 676190: using guessed type int deltaload; -void __fastcall OperateDecap(int pnum, int i, unsigned char sendmsg) +void OperateDecap(int pnum, int i, unsigned char sendmsg) { if (object[i]._oSelFlag) { object[i]._oSelFlag = 0; @@ -4218,7 +4218,7 @@ void __fastcall OperateDecap(int pnum, int i, unsigned char sendmsg) } } -void __fastcall OperateArmorStand(int pnum, int i, unsigned char sendmsg) +void OperateArmorStand(int pnum, int i, unsigned char sendmsg) { unsigned short v3; // di int v4; // esi @@ -4267,7 +4267,7 @@ void __fastcall OperateArmorStand(int pnum, int i, unsigned char sendmsg) } // 676190: using guessed type int deltaload; -int __fastcall FindValidShrine(int i) +int FindValidShrine(int i) { BOOL done; int rv; @@ -4295,7 +4295,7 @@ int __fastcall FindValidShrine(int i) } // 679660: using guessed type char gbMaxPlayers; -void __fastcall OperateGoatShrine(int pnum, int i, int sType) +void OperateGoatShrine(int pnum, int i, int sType) { SetRndSeed(object[i]._oRndSeed); object[i]._oVar1 = FindValidShrine(i); @@ -4305,7 +4305,7 @@ void __fastcall OperateGoatShrine(int pnum, int i, int sType) } // 52571C: using guessed type int drawpanflag; -void __fastcall OperateCauldron(int pnum, int i, int sType) +void OperateCauldron(int pnum, int i, int sType) { SetRndSeed(object[i]._oRndSeed); object[i]._oVar1 = FindValidShrine(i); @@ -4316,7 +4316,7 @@ void __fastcall OperateCauldron(int pnum, int i, int sType) } // 52571C: using guessed type int drawpanflag; -BOOLEAN __fastcall OperateFountains(int pnum, int i) +BOOLEAN OperateFountains(int pnum, int i) { unsigned short v2; // bx int v3; // esi @@ -4472,7 +4472,7 @@ BOOLEAN __fastcall OperateFountains(int pnum, int i) // 52571C: using guessed type int drawpanflag; // 676190: using guessed type int deltaload; -void __fastcall OperateWeaponRack(int pnum, int i, BOOL sendmsg) +void OperateWeaponRack(int pnum, int i, BOOL sendmsg) { int weaponType; @@ -4508,7 +4508,7 @@ void __fastcall OperateWeaponRack(int pnum, int i, BOOL sendmsg) } // 676190: using guessed type int deltaload; -void __fastcall OperateStoryBook(int pnum, int i) +void OperateStoryBook(int pnum, int i) { if (object[i]._oSelFlag && !deltaload && !qtextflag && pnum == myplr) { object[i]._oAnimFrame = object[i]._oVar4; @@ -4520,7 +4520,7 @@ void __fastcall OperateStoryBook(int pnum, int i) // 646D00: using guessed type char qtextflag; // 676190: using guessed type int deltaload; -void __fastcall OperateLazStand(int pnum, int i) +void OperateLazStand(int pnum, int i) { int xx, yy; @@ -4534,7 +4534,7 @@ void __fastcall OperateLazStand(int pnum, int i) // 646D00: using guessed type char qtextflag; // 676190: using guessed type int deltaload; -void __fastcall OperateObject(int pnum, int i, BOOL TeleFlag) +void OperateObject(int pnum, int i, BOOL TeleFlag) { int v3; // esi int v4; // edi @@ -4666,7 +4666,7 @@ void __fastcall OperateObject(int pnum, int i, BOOL TeleFlag) } } -void __fastcall SyncOpL1Door(int pnum, int cmd, int i) +void SyncOpL1Door(int pnum, int cmd, int i) { signed int v3; // eax ObjectStruct *v4; // esi @@ -4690,7 +4690,7 @@ void __fastcall SyncOpL1Door(int pnum, int cmd, int i) } } -void __fastcall SyncOpL2Door(int pnum, int cmd, int i) +void SyncOpL2Door(int pnum, int cmd, int i) { signed int v3; // eax ObjectStruct *v4; // esi @@ -4714,7 +4714,7 @@ void __fastcall SyncOpL2Door(int pnum, int cmd, int i) } } -void __fastcall SyncOpL3Door(int pnum, int cmd, int i) +void SyncOpL3Door(int pnum, int cmd, int i) { signed int v3; // eax ObjectStruct *v4; // esi @@ -4738,7 +4738,7 @@ void __fastcall SyncOpL3Door(int pnum, int cmd, int i) } } -void __fastcall SyncOpObject(int pnum, int cmd, int i) +void SyncOpObject(int pnum, int cmd, int i) { switch (object[i]._otype) { case OBJ_L1LDOOR: @@ -4824,7 +4824,7 @@ void __fastcall SyncOpObject(int pnum, int cmd, int i) } } -void __fastcall BreakCrux(int i) +void BreakCrux(int i) { int v1; // esi int v2; // edi @@ -4865,7 +4865,7 @@ void __fastcall BreakCrux(int i) } // 676190: using guessed type int deltaload; -void __fastcall BreakBarrel(int pnum, int i, int dam, unsigned char forcebreak, int sendmsg) +void BreakBarrel(int pnum, int i, int dam, unsigned char forcebreak, int sendmsg) { int v5; // esi BOOLEAN v6; // zf @@ -4969,7 +4969,7 @@ void __fastcall BreakBarrel(int pnum, int i, int dam, unsigned char forcebreak, } // 676190: using guessed type int deltaload; -void __fastcall BreakObject(int pnum, int oi) +void BreakObject(int pnum, int oi) { int v2; // ebx int v3; // ebp @@ -4999,7 +4999,7 @@ void __fastcall BreakObject(int pnum, int oi) } } -void __fastcall SyncBreakObj(int pnum, int oi) +void SyncBreakObj(int pnum, int oi) { int v2; // eax @@ -5008,7 +5008,7 @@ void __fastcall SyncBreakObj(int pnum, int oi) BreakBarrel(pnum, oi, 0, 1u, 0); } -void __fastcall SyncL1Doors(int i) +void SyncL1Doors(int i) { int v1; // ebx int v2; // eax @@ -5042,7 +5042,7 @@ void __fastcall SyncL1Doors(int i) } } -void __fastcall SyncCrux(int i) +void SyncCrux(int i) { signed int v1; // ebx int v2; // edx @@ -5068,7 +5068,7 @@ void __fastcall SyncCrux(int i) ObjChangeMap(object[i]._oVar1, object[i]._oVar2, object[i]._oVar3, object[i]._oVar4); } -void __fastcall SyncLever(int i) +void SyncLever(int i) { int v1; // ecx @@ -5077,7 +5077,7 @@ void __fastcall SyncLever(int i) ObjChangeMap(object[v1]._oVar1, object[v1]._oVar2, object[v1]._oVar3, object[v1]._oVar4); } -void __fastcall SyncQSTLever(int i) +void SyncQSTLever(int i) { int tren; @@ -5092,7 +5092,7 @@ void __fastcall SyncQSTLever(int i) } } -void __fastcall SyncPedistal(int i) +void SyncPedistal(int i) { int v1; // esi unsigned char *v2; // esi @@ -5113,7 +5113,7 @@ void __fastcall SyncPedistal(int i) } // 5CF334: using guessed type int setpc_w; -void __fastcall SyncL2Doors(int i) +void SyncL2Doors(int i) { int v1; // eax int v2; // esi @@ -5152,7 +5152,7 @@ void __fastcall SyncL2Doors(int i) } } -void __fastcall SyncL3Doors(int i) +void SyncL3Doors(int i) { int v1; // eax int v2; // esi @@ -5190,7 +5190,7 @@ void __fastcall SyncL3Doors(int i) } } -void __fastcall SyncObjectAnim(int o) +void SyncObjectAnim(int o) { int v1; // edx int v2; // ebx @@ -5249,7 +5249,7 @@ void __fastcall SyncObjectAnim(int o) } } -void __fastcall GetObjectStr(int i) +void GetObjectStr(int i) { switch (object[i]._otype) { case OBJ_LEVER: diff --git a/Source/objects.h b/Source/objects.h index 66c6e7bb..583d8074 100644 --- a/Source/objects.h +++ b/Source/objects.h @@ -14,137 +14,137 @@ extern ObjectStruct object[MAXOBJECTS]; extern BOOL InitObjFlag; extern int numobjfiles; // weak -void __cdecl InitObjectGFX(); -void __cdecl FreeObjectGFX(); -BOOL __fastcall RndLocOk(int xp, int yp); -void __fastcall InitRndLocObj(int min, int max, int objtype); -void __fastcall InitRndLocBigObj(int min, int max, int objtype); -void __fastcall InitRndLocObj5x5(int min, int max, int objtype); -void __cdecl ClrAllObjects(); -void __cdecl AddTortures(); -void __cdecl AddCandles(); -void __fastcall AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg); -void __cdecl InitRndBarrels(); -void __fastcall AddL1Objs(int x1, int y1, int x2, int y2); -void __fastcall AddL2Objs(int x1, int y1, int x2, int y2); -void __fastcall AddL3Objs(int x1, int y1, int x2, int y2); -BOOL __fastcall WallTrapLocOk(int xp, int yp); -void __cdecl AddL2Torches(); -BOOL __fastcall TorchLocOK(int xp, int yp); -void __cdecl AddObjTraps(); -void __cdecl AddChestTraps(); -void __fastcall LoadMapObjects(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx); -void __fastcall LoadMapObjs(unsigned char *pMap, int startx, int starty); -void __cdecl AddDiabObjs(); -void __cdecl AddStoryBooks(); -void __fastcall AddHookedBodies(int freq); -void __cdecl AddL4Goodies(); -void __cdecl AddLazStand(); -void __cdecl InitObjects(); -void __fastcall SetMapObjects(unsigned char *pMap, int startx, int starty); -void __fastcall DeleteObject_(int oi, int i); -void __fastcall SetupObject(int i, int x, int y, int ot); -void __fastcall SetObjMapRange(int i, int x1, int y1, int x2, int y2, int v); -void __fastcall SetBookMsg(int i, int msg); -void __fastcall AddL1Door(int i, int x, int y, int ot); -void __fastcall AddSCambBook(int i); -void __fastcall AddChest(int i, int t); -void __fastcall AddL2Door(int i, int x, int y, int ot); -void __fastcall AddL3Door(int i, int x, int y, int ot); -void __fastcall AddSarc(int i); -void __fastcall AddFlameTrap(int i); -void __fastcall AddFlameLvr(int i); -void __fastcall AddTrap(int i); -void __fastcall AddObjLight(int i, int r); -void __fastcall AddBarrel(int i); -void __fastcall AddShrine(int i); -void __fastcall AddBookcase(int i); -void __fastcall AddPurifyingFountain(int i); -void __fastcall AddArmorStand(int i); -void __fastcall AddDecap(int i); -void __fastcall AddVilebook(int i); -void __fastcall AddMagicCircle(int i); -void __fastcall AddBookstand(int i); -void __fastcall AddPedistal(int i); -void __fastcall AddStoryBook(int i); -void __fastcall AddWeaponRack(int i); -void __fastcall AddTorturedBody(int i); -void __fastcall GetRndObjLoc(int randarea, int *xx, int *yy); -void __cdecl AddMushPatch(); -void __cdecl AddSlainHero(); -void __fastcall AddObject(int ot, int ox, int oy); -void __fastcall Obj_Light(int i, int lr); -void __fastcall Obj_Circle(int i); -void __fastcall Obj_StopAnim(int i); -void __fastcall Obj_Door(int i); -void __fastcall Obj_Sarc(int i); -void __fastcall ActivateTrapLine(int ttype, int tid); -void __fastcall Obj_FlameTrap(int i); -void __fastcall Obj_Trap(int i); -void __fastcall Obj_BCrossDamage(int i); -void __cdecl ProcessObjects(); -void __fastcall ObjSetMicro(int dx, int dy, int pn); -void __fastcall objects_set_door_piece(int x, int y); -void __fastcall ObjSetMini(int x, int y, int v); -void __fastcall ObjL1Special(int x1, int y1, int x2, int y2); -void __fastcall ObjL2Special(int x1, int y1, int x2, int y2); -void __fastcall DoorSet(int oi, int dx, int dy); -void __cdecl RedoPlayerVision(); -void __fastcall OperateL1RDoor(int pnum, int oi, unsigned char sendflag); -void __fastcall OperateL1LDoor(int pnum, int oi, unsigned char sendflag); -void __fastcall OperateL2RDoor(int pnum, int oi, unsigned char sendflag); -void __fastcall OperateL2LDoor(int pnum, int oi, unsigned char sendflag); -void __fastcall OperateL3RDoor(int pnum, int oi, unsigned char sendflag); -void __fastcall OperateL3LDoor(int pnum, int oi, unsigned char sendflag); -void __fastcall MonstCheckDoors(int m); -void __fastcall ObjChangeMap(int x1, int y1, int x2, int y2); -void __fastcall ObjChangeMapResync(int x1, int y1, int x2, int y2); -void __fastcall OperateL1Door(int pnum, int i, unsigned char sendflag); -void __fastcall OperateLever(int pnum, int i); -void __fastcall OperateBook(int pnum, int i); -void __fastcall OperateBookLever(int pnum, int i); -void __fastcall OperateSChambBk(int pnum, int i); -void __fastcall OperateChest(int pnum, int i, unsigned char sendmsg); -void __fastcall OperateMushPatch(int pnum, int i); -void __fastcall OperateInnSignChest(int pnum, int i); -void __fastcall OperateSlainHero(int pnum, int i, unsigned char sendmsg); -void __fastcall OperateTrapLvr(int i); -void __fastcall OperateSarc(int pnum, int i, unsigned char sendmsg); -void __fastcall OperateL2Door(int pnum, int i, unsigned char sendflag); -void __fastcall OperateL3Door(int pnum, int i, unsigned char sendflag); -void __fastcall OperatePedistal(int pnum, int i); -void __fastcall TryDisarm(int pnum, int i); -int __fastcall ItemMiscIdIdx(int imiscid); -void __fastcall OperateShrine(int pnum, int i, int sType); -void __fastcall OperateSkelBook(int pnum, int i, BOOL sendmsg); -void __fastcall OperateBookCase(int pnum, int i, BOOL sendmsg); -void __fastcall OperateDecap(int pnum, int i, unsigned char sendmsg); -void __fastcall OperateArmorStand(int pnum, int i, unsigned char sendmsg); -int __fastcall FindValidShrine(int i); -void __fastcall OperateGoatShrine(int pnum, int i, int sType); -void __fastcall OperateCauldron(int pnum, int i, int sType); -BOOLEAN __fastcall OperateFountains(int pnum, int i); -void __fastcall OperateWeaponRack(int pnum, int i, BOOL sendmsg); -void __fastcall OperateStoryBook(int pnum, int i); -void __fastcall OperateLazStand(int pnum, int i); -void __fastcall OperateObject(int pnum, int i, BOOL TeleFlag); -void __fastcall SyncOpL1Door(int pnum, int cmd, int i); -void __fastcall SyncOpL2Door(int pnum, int cmd, int i); -void __fastcall SyncOpL3Door(int pnum, int cmd, int i); -void __fastcall SyncOpObject(int pnum, int cmd, int i); -void __fastcall BreakCrux(int i); -void __fastcall BreakBarrel(int pnum, int i, int dam, unsigned char forcebreak, int sendmsg); -void __fastcall BreakObject(int pnum, int oi); -void __fastcall SyncBreakObj(int pnum, int oi); -void __fastcall SyncL1Doors(int i); -void __fastcall SyncCrux(int i); -void __fastcall SyncLever(int i); -void __fastcall SyncQSTLever(int i); -void __fastcall SyncPedistal(int i); -void __fastcall SyncL2Doors(int i); -void __fastcall SyncL3Doors(int i); -void __fastcall SyncObjectAnim(int o); -void __fastcall GetObjectStr(int i); +void InitObjectGFX(); +void FreeObjectGFX(); +BOOL RndLocOk(int xp, int yp); +void InitRndLocObj(int min, int max, int objtype); +void InitRndLocBigObj(int min, int max, int objtype); +void InitRndLocObj5x5(int min, int max, int objtype); +void ClrAllObjects(); +void AddTortures(); +void AddCandles(); +void AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg); +void InitRndBarrels(); +void AddL1Objs(int x1, int y1, int x2, int y2); +void AddL2Objs(int x1, int y1, int x2, int y2); +void AddL3Objs(int x1, int y1, int x2, int y2); +BOOL WallTrapLocOk(int xp, int yp); +void AddL2Torches(); +BOOL TorchLocOK(int xp, int yp); +void AddObjTraps(); +void AddChestTraps(); +void LoadMapObjects(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx); +void LoadMapObjs(unsigned char *pMap, int startx, int starty); +void AddDiabObjs(); +void AddStoryBooks(); +void AddHookedBodies(int freq); +void AddL4Goodies(); +void AddLazStand(); +void InitObjects(); +void SetMapObjects(unsigned char *pMap, int startx, int starty); +void DeleteObject_(int oi, int i); +void SetupObject(int i, int x, int y, int ot); +void SetObjMapRange(int i, int x1, int y1, int x2, int y2, int v); +void SetBookMsg(int i, int msg); +void AddL1Door(int i, int x, int y, int ot); +void AddSCambBook(int i); +void AddChest(int i, int t); +void AddL2Door(int i, int x, int y, int ot); +void AddL3Door(int i, int x, int y, int ot); +void AddSarc(int i); +void AddFlameTrap(int i); +void AddFlameLvr(int i); +void AddTrap(int i); +void AddObjLight(int i, int r); +void AddBarrel(int i); +void AddShrine(int i); +void AddBookcase(int i); +void AddPurifyingFountain(int i); +void AddArmorStand(int i); +void AddDecap(int i); +void AddVilebook(int i); +void AddMagicCircle(int i); +void AddBookstand(int i); +void AddPedistal(int i); +void AddStoryBook(int i); +void AddWeaponRack(int i); +void AddTorturedBody(int i); +void GetRndObjLoc(int randarea, int *xx, int *yy); +void AddMushPatch(); +void AddSlainHero(); +void AddObject(int ot, int ox, int oy); +void Obj_Light(int i, int lr); +void Obj_Circle(int i); +void Obj_StopAnim(int i); +void Obj_Door(int i); +void Obj_Sarc(int i); +void ActivateTrapLine(int ttype, int tid); +void Obj_FlameTrap(int i); +void Obj_Trap(int i); +void Obj_BCrossDamage(int i); +void ProcessObjects(); +void ObjSetMicro(int dx, int dy, int pn); +void objects_set_door_piece(int x, int y); +void ObjSetMini(int x, int y, int v); +void ObjL1Special(int x1, int y1, int x2, int y2); +void ObjL2Special(int x1, int y1, int x2, int y2); +void DoorSet(int oi, int dx, int dy); +void RedoPlayerVision(); +void OperateL1RDoor(int pnum, int oi, unsigned char sendflag); +void OperateL1LDoor(int pnum, int oi, unsigned char sendflag); +void OperateL2RDoor(int pnum, int oi, unsigned char sendflag); +void OperateL2LDoor(int pnum, int oi, unsigned char sendflag); +void OperateL3RDoor(int pnum, int oi, unsigned char sendflag); +void OperateL3LDoor(int pnum, int oi, unsigned char sendflag); +void MonstCheckDoors(int m); +void ObjChangeMap(int x1, int y1, int x2, int y2); +void ObjChangeMapResync(int x1, int y1, int x2, int y2); +void OperateL1Door(int pnum, int i, unsigned char sendflag); +void OperateLever(int pnum, int i); +void OperateBook(int pnum, int i); +void OperateBookLever(int pnum, int i); +void OperateSChambBk(int pnum, int i); +void OperateChest(int pnum, int i, unsigned char sendmsg); +void OperateMushPatch(int pnum, int i); +void OperateInnSignChest(int pnum, int i); +void OperateSlainHero(int pnum, int i, unsigned char sendmsg); +void OperateTrapLvr(int i); +void OperateSarc(int pnum, int i, unsigned char sendmsg); +void OperateL2Door(int pnum, int i, unsigned char sendflag); +void OperateL3Door(int pnum, int i, unsigned char sendflag); +void OperatePedistal(int pnum, int i); +void TryDisarm(int pnum, int i); +int ItemMiscIdIdx(int imiscid); +void OperateShrine(int pnum, int i, int sType); +void OperateSkelBook(int pnum, int i, BOOL sendmsg); +void OperateBookCase(int pnum, int i, BOOL sendmsg); +void OperateDecap(int pnum, int i, unsigned char sendmsg); +void OperateArmorStand(int pnum, int i, unsigned char sendmsg); +int FindValidShrine(int i); +void OperateGoatShrine(int pnum, int i, int sType); +void OperateCauldron(int pnum, int i, int sType); +BOOLEAN OperateFountains(int pnum, int i); +void OperateWeaponRack(int pnum, int i, BOOL sendmsg); +void OperateStoryBook(int pnum, int i); +void OperateLazStand(int pnum, int i); +void OperateObject(int pnum, int i, BOOL TeleFlag); +void SyncOpL1Door(int pnum, int cmd, int i); +void SyncOpL2Door(int pnum, int cmd, int i); +void SyncOpL3Door(int pnum, int cmd, int i); +void SyncOpObject(int pnum, int cmd, int i); +void BreakCrux(int i); +void BreakBarrel(int pnum, int i, int dam, unsigned char forcebreak, int sendmsg); +void BreakObject(int pnum, int oi); +void SyncBreakObj(int pnum, int oi); +void SyncL1Doors(int i); +void SyncCrux(int i); +void SyncLever(int i); +void SyncQSTLever(int i); +void SyncPedistal(int i); +void SyncL2Doors(int i); +void SyncL3Doors(int i); +void SyncObjectAnim(int o); +void GetObjectStr(int i); /* rdata */ diff --git a/Source/pack.cpp b/Source/pack.cpp index ebb1d6d2..5478da58 100644 --- a/Source/pack.cpp +++ b/Source/pack.cpp @@ -2,7 +2,7 @@ #include "../types.h" -void __fastcall PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield) +void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield) { PlayerStruct *pPlayer; int i; @@ -77,7 +77,7 @@ void __fastcall PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield) pPack->pManaShield = FALSE; } -void __fastcall PackItem(PkItemStruct *id, ItemStruct *is) +void PackItem(PkItemStruct *id, ItemStruct *is) { if (is->_itype == -1) { id->idx = 0xFFFF; @@ -107,7 +107,7 @@ void __fastcall PackItem(PkItemStruct *id, ItemStruct *is) } } -void __fastcall VerifyGoldSeeds(PlayerStruct *pPlayer) +void VerifyGoldSeeds(PlayerStruct *pPlayer) { int i, j; @@ -125,7 +125,7 @@ void __fastcall VerifyGoldSeeds(PlayerStruct *pPlayer) } } -void __fastcall UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok) +void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok) { PlayerStruct *pPlayer; int i; @@ -220,7 +220,7 @@ void __fastcall UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok) // Note: last slot of item[MAXITEMS+1] used as temporary buffer // find real name reference below, possibly [sizeof(item[])/sizeof(ItemStruct)] -void __fastcall UnPackItem(PkItemStruct *is, ItemStruct *id) +void UnPackItem(PkItemStruct *is, ItemStruct *id) { if (is->idx == 0xFFFF) { id->_itype = -1; diff --git a/Source/pack.h b/Source/pack.h index fde4d5c2..7fd3c435 100644 --- a/Source/pack.h +++ b/Source/pack.h @@ -2,11 +2,11 @@ #ifndef __PACK_H__ #define __PACK_H__ -void __fastcall PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield); -void __fastcall PackItem(PkItemStruct *id, ItemStruct *is); -void __fastcall VerifyGoldSeeds(PlayerStruct *pPlayer); -void __fastcall UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok); -void __fastcall UnPackItem(PkItemStruct *is, ItemStruct *id); +void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield); +void PackItem(PkItemStruct *id, ItemStruct *is); +void VerifyGoldSeeds(PlayerStruct *pPlayer); +void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok); +void UnPackItem(PkItemStruct *is, ItemStruct *id); /* rdata */ diff --git a/Source/palette.cpp b/Source/palette.cpp index 16e6c1d7..58df35d4 100644 --- a/Source/palette.cpp +++ b/Source/palette.cpp @@ -13,13 +13,13 @@ int gamma_correction = 100; // idb BOOL color_cycling_enabled = TRUE; BOOLEAN sgbFadedIn = 1; -void __cdecl SaveGamma() +void SaveGamma() { SRegSaveValue("Diablo", "Gamma Correction", 0, gamma_correction); SRegSaveValue("Diablo", "Color Cycling", FALSE, color_cycling_enabled); } -void __cdecl palette_init() +void palette_init() { int v0; // eax int v1; // eax @@ -43,7 +43,7 @@ void __cdecl palette_init() ErrDlg(IDD_DIALOG8, v1, "C:\\Src\\Diablo\\Source\\PALETTE.CPP", 146); } -void __cdecl LoadGamma() +void LoadGamma() { int v3; // eax int value; // [esp+8h] [ebp-4h] @@ -65,7 +65,7 @@ void __cdecl LoadGamma() color_cycling_enabled = v3; } -void __cdecl LoadSysPal() +void LoadSysPal() { HDC hDC; // ebx int i; // ecx @@ -90,7 +90,7 @@ void __cdecl LoadSysPal() } } -void __fastcall LoadPalette(char *pszFileName) +void LoadPalette(char *pszFileName) { int i; void *pBuf; @@ -110,7 +110,7 @@ void __fastcall LoadPalette(char *pszFileName) } } -void __fastcall LoadRndLvlPal(int l) +void LoadRndLvlPal(int l) { char szFileName[MAX_PATH]; @@ -122,7 +122,7 @@ void __fastcall LoadRndLvlPal(int l) } } -void __cdecl ResetPal() +void ResetPal() { if (!lpDDSPrimary #ifdef __cplusplus @@ -136,7 +136,7 @@ void __cdecl ResetPal() } } -void __cdecl IncreaseGamma() +void IncreaseGamma() { if (gamma_correction < 100) { gamma_correction += 5; @@ -147,7 +147,7 @@ void __cdecl IncreaseGamma() } } -void __cdecl palette_update() +void palette_update() { int v0; // ecx int v1; // eax @@ -163,7 +163,7 @@ void __cdecl palette_update() } } -void __fastcall ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n) +void ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n) { int i; double g; @@ -179,7 +179,7 @@ void __fastcall ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n) } } -void __cdecl DecreaseGamma() +void DecreaseGamma() { if (gamma_correction > 30) { gamma_correction -= 5; @@ -190,7 +190,7 @@ void __cdecl DecreaseGamma() } } -int __fastcall UpdateGamma(int gamma) +int UpdateGamma(int gamma) { if (gamma) { gamma_correction = 130 - gamma; @@ -200,12 +200,12 @@ int __fastcall UpdateGamma(int gamma) return 130 - gamma_correction; } -void __cdecl BlackPalette() +void BlackPalette() { SetFadeLevel(0); } -void __fastcall SetFadeLevel(int fadeval) +void SetFadeLevel(int fadeval) { int i; // eax @@ -225,7 +225,7 @@ void __fastcall SetFadeLevel(int fadeval) } } -void __fastcall PaletteFadeIn(int fr) +void PaletteFadeIn(int fr) { int i; // ebp @@ -239,7 +239,7 @@ void __fastcall PaletteFadeIn(int fr) sgbFadedIn = 1; } -void __fastcall PaletteFadeOut(int fr) +void PaletteFadeOut(int fr) { int i; // esi @@ -252,7 +252,7 @@ void __fastcall PaletteFadeOut(int fr) } } -void __cdecl palette_update_caves() +void palette_update_caves() { int i; PALETTEENTRY col; @@ -270,7 +270,7 @@ void __cdecl palette_update_caves() palette_update(); } -void __fastcall palette_update_quest_palette(int n) +void palette_update_quest_palette(int n) { int i; // eax @@ -280,12 +280,12 @@ void __fastcall palette_update_quest_palette(int n) palette_update(); } -BOOLEAN __cdecl palette_get_colour_cycling() +BOOLEAN palette_get_colour_cycling() { return color_cycling_enabled; } -void __fastcall palette_set_color_cycling(BOOLEAN enabled) +void palette_set_color_cycling(BOOLEAN enabled) { color_cycling_enabled = enabled; } diff --git a/Source/palette.h b/Source/palette.h index 35c5157a..d8e6e62d 100644 --- a/Source/palette.h +++ b/Source/palette.h @@ -7,26 +7,26 @@ extern PALETTEENTRY system_palette[256]; extern PALETTEENTRY orig_palette[256]; extern UINT gdwPalEntries; -void __cdecl SaveGamma(); -void __cdecl palette_init(); -void __cdecl LoadGamma(); -void __cdecl LoadSysPal(); -void __fastcall LoadPalette(char *pszFileName); -void __fastcall LoadRndLvlPal(int l); -void __cdecl ResetPal(); -void __cdecl IncreaseGamma(); -void __cdecl palette_update(); -void __fastcall ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n); -void __cdecl DecreaseGamma(); -int __fastcall UpdateGamma(int gamma); -void __cdecl BlackPalette(); -void __fastcall SetFadeLevel(int fadeval); -void __fastcall PaletteFadeIn(int fr); -void __fastcall PaletteFadeOut(int fr); -void __cdecl palette_update_caves(); -void __fastcall palette_update_quest_palette(int n); -BOOLEAN __cdecl palette_get_colour_cycling(); -void __fastcall palette_set_color_cycling(BOOLEAN enabled); +void SaveGamma(); +void palette_init(); +void LoadGamma(); +void LoadSysPal(); +void LoadPalette(char *pszFileName); +void LoadRndLvlPal(int l); +void ResetPal(); +void IncreaseGamma(); +void palette_update(); +void ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n); +void DecreaseGamma(); +int UpdateGamma(int gamma); +void BlackPalette(); +void SetFadeLevel(int fadeval); +void PaletteFadeIn(int fr); +void PaletteFadeOut(int fr); +void palette_update_caves(); +void palette_update_quest_palette(int n); +BOOLEAN palette_get_colour_cycling(); +void palette_set_color_cycling(BOOLEAN enabled); /* rdata */ diff --git a/Source/path.cpp b/Source/path.cpp index 5ce8858f..c2060712 100644 --- a/Source/path.cpp +++ b/Source/path.cpp @@ -39,7 +39,7 @@ char path_directions[9] = { 5, 1, 6, 2, 0, 3, 8, 4, 7 }; * check that each step is a valid position. Store the step directions (see * path_directions) in path, which must have room for 24 steps */ -int __fastcall FindPath(BOOL(__fastcall *PosOk)(int, int, int), int PosOkArg, int sx, int sy, int dx, int dy, char *path) +int FindPath(BOOL(*PosOk)(int, int, int), int PosOkArg, int sx, int sy, int dx, int dy, char *path) { PATHNODE *path_start; // esi char initial_h; // al @@ -110,7 +110,7 @@ int __fastcall FindPath(BOOL(__fastcall *PosOk)(int, int, int), int PosOkArg, in } /* heuristic, estimated cost from (sx,sy) to (dx,dy) */ -int __fastcall path_get_h_cost(int sx, int sy, int dx, int dy) +int path_get_h_cost(int sx, int sy, int dx, int dy) { int delta_x = abs(sx - dx); int delta_y = abs(sy - dy); @@ -128,7 +128,7 @@ int __fastcall path_get_h_cost(int sx, int sy, int dx, int dy) * of sqrt(2). That's approximately 1.5, so they multiply all step costs by 2, * except diagonal steps which are times 3 */ -int __fastcall path_check_equal(PATHNODE *pPath, int dx, int dy) +int path_check_equal(PATHNODE *pPath, int dx, int dy) { if (pPath->x == dx || pPath->y == dy) return 2; @@ -139,7 +139,7 @@ int __fastcall path_check_equal(PATHNODE *pPath, int dx, int dy) /* get the next node on the A* frontier to explore (estimated to be closest to * the goal), mark it as visited, and return it */ -PATHNODE *__cdecl GetNextPath() +PATHNODE *GetNextPath() { PATHNODE *result; @@ -162,7 +162,7 @@ PATHNODE *__cdecl GetNextPath() * * return true if step is allowed */ -BOOL __fastcall path_solid_pieces(PATHNODE *pPath, int dx, int dy) +BOOL path_solid_pieces(PATHNODE *pPath, int dx, int dy) { BOOL rv = TRUE; switch (path_directions[3 * (dy - pPath->y) + 3 - pPath->x + 1 + dx]) { @@ -187,7 +187,7 @@ BOOL __fastcall path_solid_pieces(PATHNODE *pPath, int dx, int dy) * * return 0 if we ran out of preallocated nodes to use, else 1 */ -BOOL __fastcall path_get_path(BOOL(__fastcall *PosOk)(int, int, int), int PosOkArg, PATHNODE *pPath, int x, int y) +BOOL path_get_path(BOOL(*PosOk)(int, int, int), int PosOkArg, PATHNODE *pPath, int x, int y) { int dx, dy; int i; @@ -211,7 +211,7 @@ BOOL __fastcall path_get_path(BOOL(__fastcall *PosOk)(int, int, int), int PosOkA * * return 1 if step successfully added, 0 if we ran out of nodes to use */ -BOOL __fastcall path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy) +BOOL path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy) { int next_g; PATHNODE *dxdy; @@ -278,7 +278,7 @@ BOOL __fastcall path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy } /* return a node for (dx,dy) on the frontier, or NULL if not found */ -PATHNODE *__fastcall path_get_node1(int dx, int dy) +PATHNODE *path_get_node1(int dx, int dy) { PATHNODE *result = path_2_nodes; while (result != NULL && (result->x != dx || result->y != dy)) @@ -287,7 +287,7 @@ PATHNODE *__fastcall path_get_node1(int dx, int dy) } /* return a node for (dx,dy) if it was visited, or NULL if not found */ -PATHNODE *__fastcall path_get_node2(int dx, int dy) +PATHNODE *path_get_node2(int dx, int dy) { PATHNODE *result = pnode_ptr; while (result != NULL && (result->x != dx || result->y != dy)) @@ -297,7 +297,7 @@ PATHNODE *__fastcall path_get_node2(int dx, int dy) /* insert pPath into the frontier (keeping the frontier sorted by total * distance) */ -void __fastcall path_next_node(PATHNODE *pPath) +void path_next_node(PATHNODE *pPath) { PATHNODE *current; // edx PATHNODE *next; // eax @@ -317,7 +317,7 @@ void __fastcall path_next_node(PATHNODE *pPath) } /* update all path costs using depth-first search starting at pPath */ -void __fastcall path_set_coords(PATHNODE *pPath) +void path_set_coords(PATHNODE *pPath) { PATHNODE *PathOld; PATHNODE *PathAct; @@ -344,7 +344,7 @@ void __fastcall path_set_coords(PATHNODE *pPath) } /* push pPath onto the pnode_tblptr stack */ -void __fastcall path_push_active_step(PATHNODE *pPath) +void path_push_active_step(PATHNODE *pPath) { int stack_index = gdwCurPathStep; gdwCurPathStep++; @@ -352,7 +352,7 @@ void __fastcall path_push_active_step(PATHNODE *pPath) } /* pop and return a node from the pnode_tblptr stack */ -PATHNODE *__cdecl path_pop_active_step() +PATHNODE *path_pop_active_step() { gdwCurPathStep--; return pnode_tblptr[gdwCurPathStep]; @@ -360,7 +360,7 @@ PATHNODE *__cdecl path_pop_active_step() /* zero one of the preallocated nodes and return a pointer to it, or NULL if * none are available */ -PATHNODE *__cdecl path_new_step() +PATHNODE *path_new_step() { PATHNODE *new_node; diff --git a/Source/path.h b/Source/path.h index 7e0a8e38..0abb8c42 100644 --- a/Source/path.h +++ b/Source/path.h @@ -10,20 +10,20 @@ extern PATHNODE *pnode_ptr; extern PATHNODE *pnode_tblptr[300]; extern PATHNODE *path_2_nodes; -int __fastcall FindPath(BOOL(__fastcall *PosOk)(int, int, int), int PosOkArg, int sx, int sy, int dx, int dy, char *path); -int __fastcall path_get_h_cost(int sx, int sy, int dx, int dy); -int __fastcall path_check_equal(PATHNODE *pPath, int dx, int dy); -PATHNODE *__cdecl GetNextPath(); -BOOL __fastcall path_solid_pieces(PATHNODE *pPath, int dx, int dy); -BOOL __fastcall path_get_path(BOOL(__fastcall *PosOk)(int, int, int), int PosOkArg, PATHNODE *pPath, int x, int y); -BOOL __fastcall path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy); -PATHNODE *__fastcall path_get_node1(int dx, int dy); -PATHNODE *__fastcall path_get_node2(int dx, int dy); -void __fastcall path_next_node(PATHNODE *pPath); -void __fastcall path_set_coords(PATHNODE *pPath); -void __fastcall path_push_active_step(PATHNODE *pPath); -PATHNODE *__cdecl path_pop_active_step(); -PATHNODE *__cdecl path_new_step(); +int FindPath(BOOL(*PosOk)(int, int, int), int PosOkArg, int sx, int sy, int dx, int dy, char *path); +int path_get_h_cost(int sx, int sy, int dx, int dy); +int path_check_equal(PATHNODE *pPath, int dx, int dy); +PATHNODE *GetNextPath(); +BOOL path_solid_pieces(PATHNODE *pPath, int dx, int dy); +BOOL path_get_path(BOOL(*PosOk)(int, int, int), int PosOkArg, PATHNODE *pPath, int x, int y); +BOOL path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy); +PATHNODE *path_get_node1(int dx, int dy); +PATHNODE *path_get_node2(int dx, int dy); +void path_next_node(PATHNODE *pPath); +void path_set_coords(PATHNODE *pPath); +void path_push_active_step(PATHNODE *pPath); +PATHNODE *path_pop_active_step(); +PATHNODE *path_new_step(); /* rdata */ diff --git a/Source/pfile.cpp b/Source/pfile.cpp index 5f1b1016..ea888c30 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -8,7 +8,7 @@ static char hero_names[MAX_CHARACTERS][PLR_NAME_LEN]; BOOL gbValidSaveFile; -void __cdecl pfile_init_save_directory() +void pfile_init_save_directory() { DWORD len; char Buffer[MAX_PATH]; @@ -25,7 +25,7 @@ void __cdecl pfile_init_save_directory() pfile_check_available_space(Buffer); } -void __fastcall pfile_check_available_space(char *pszDir) +void pfile_check_available_space(char *pszDir) { char *s; BOOL hasSpace; @@ -53,7 +53,7 @@ void __fastcall pfile_check_available_space(char *pszDir) DiskFreeDlg(pszDir); } -void __cdecl pfile_write_hero() +void pfile_write_hero() { unsigned int save_num; PkPlayerStruct pkplr; @@ -66,7 +66,7 @@ void __cdecl pfile_write_hero() } } -unsigned int __fastcall pfile_get_save_num_from_name(const char *name) +unsigned int pfile_get_save_num_from_name(const char *name) { unsigned int i; @@ -78,7 +78,7 @@ unsigned int __fastcall pfile_get_save_num_from_name(const char *name) return i; } -void __fastcall pfile_encode_hero(const PkPlayerStruct *pPack) +void pfile_encode_hero(const PkPlayerStruct *pPack) { BYTE *packed; DWORD packed_len; @@ -95,7 +95,7 @@ void __fastcall pfile_encode_hero(const PkPlayerStruct *pPack) mem_free_dbg(packed); } -BOOL __fastcall pfile_open_archive(BOOL a1, unsigned int save_num) +BOOL pfile_open_archive(BOOL a1, unsigned int save_num) { char FileName[MAX_PATH]; @@ -108,7 +108,7 @@ BOOL __fastcall pfile_open_archive(BOOL a1, unsigned int save_num) return FALSE; } -void __fastcall pfile_get_save_path(char *pszBuf, DWORD dwBufSize, unsigned int save_num) +void pfile_get_save_path(char *pszBuf, DWORD dwBufSize, unsigned int save_num) { DWORD plen; char *s; @@ -132,7 +132,7 @@ void __fastcall pfile_get_save_path(char *pszBuf, DWORD dwBufSize, unsigned int _strlwr(pszBuf); } -void __fastcall pfile_flush(BOOL is_single_player, unsigned int save_num) +void pfile_flush(BOOL is_single_player, unsigned int save_num) { char FileName[MAX_PATH]; @@ -140,7 +140,7 @@ void __fastcall pfile_flush(BOOL is_single_player, unsigned int save_num) mpqapi_flush_and_close(FileName, is_single_player, save_num); } -BOOL __fastcall pfile_create_player_description(char *dst, unsigned int len) +BOOL pfile_create_player_description(char *dst, unsigned int len) { char desc[128]; _uiheroinfo uihero; @@ -158,7 +158,7 @@ BOOL __fastcall pfile_create_player_description(char *dst, unsigned int len) return TRUE; } -BOOL __fastcall pfile_create_save_file(const char *name_1, const char *name_2) +BOOL pfile_create_save_file(const char *name_1, const char *name_2) { int i; unsigned int save_num; @@ -190,12 +190,12 @@ BOOL __fastcall pfile_create_save_file(const char *name_1, const char *name_2) return TRUE; } -void __cdecl pfile_flush_W() +void pfile_flush_W() { pfile_flush(TRUE, pfile_get_save_num_from_name(plr[myplr]._pName)); } -void __fastcall game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile) +void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile) { memset(heroinfo, 0, sizeof(*heroinfo)); strncpy(heroinfo->name, p->_pName, sizeof(heroinfo->name) - 1); @@ -212,7 +212,7 @@ void __fastcall game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, B heroinfo->spawned = 0; } -unsigned char __fastcall game_2_ui_class(const PlayerStruct *p) +unsigned char game_2_ui_class(const PlayerStruct *p) { unsigned char uiclass; if (p->_pClass == PC_WARRIOR) @@ -283,7 +283,7 @@ BOOL __stdcall pfile_ui_set_hero_infos(BOOL(__stdcall *ui_add_hero_info)(_uihero return TRUE; } -char *__fastcall GetSaveDirectory(char *dst, int dst_size, unsigned int save_num) +char *GetSaveDirectory(char *dst, int dst_size, unsigned int save_num) { DWORD dirLen; char FileName[MAX_PATH]; @@ -310,7 +310,7 @@ char *__fastcall GetSaveDirectory(char *dst, int dst_size, unsigned int save_num return _strlwr(dst); } -BOOL __fastcall pfile_read_hero(HANDLE archive, PkPlayerStruct *pPack) +BOOL pfile_read_hero(HANDLE archive, PkPlayerStruct *pPack) { HANDLE file; BOOL decoded; @@ -354,7 +354,7 @@ BOOL __fastcall pfile_read_hero(HANDLE archive, PkPlayerStruct *pPack) } } -HANDLE __fastcall pfile_open_save_archive(int *unused, unsigned int save_num) +HANDLE pfile_open_save_archive(int *unused, unsigned int save_num) { char SrcStr[MAX_PATH]; HANDLE archive; @@ -365,12 +365,12 @@ HANDLE __fastcall pfile_open_save_archive(int *unused, unsigned int save_num) return NULL; } -void __fastcall pfile_SFileCloseArchive(HANDLE hsArchive) +void pfile_SFileCloseArchive(HANDLE hsArchive) { SFileCloseArchive(hsArchive); } -BOOL __fastcall pfile_archive_contains_game(HANDLE hsArchive, unsigned int save_num) +BOOL pfile_archive_contains_game(HANDLE hsArchive, unsigned int save_num) { HANDLE file; @@ -396,7 +396,7 @@ BOOL __stdcall pfile_ui_set_class_stats(unsigned int player_class_nr, _uidefault return TRUE; } -char __fastcall pfile_get_player_class(unsigned int player_class_nr) +char pfile_get_player_class(unsigned int player_class_nr) { char pc_class; @@ -479,7 +479,7 @@ BOOL __stdcall pfile_delete_save(_uiheroinfo *hero_info) return TRUE; } -void __cdecl pfile_read_player_from_save() +void pfile_read_player_from_save() { HANDLE archive; unsigned int save_num; @@ -497,7 +497,7 @@ void __cdecl pfile_read_player_from_save() pfile_SFileCloseArchive(archive); } -void __fastcall GetTempLevelNames(char *szTemp) +void GetTempLevelNames(char *szTemp) { // BUGFIX: function call has no purpose pfile_get_save_num_from_name(plr[myplr]._pName); @@ -507,7 +507,7 @@ void __fastcall GetTempLevelNames(char *szTemp) sprintf(szTemp, "templ%02d", currlevel); } -void __fastcall GetPermLevelNames(char *szPerm) +void GetPermLevelNames(char *szPerm) { unsigned int save_num; BOOL has_file; @@ -527,14 +527,14 @@ void __fastcall GetPermLevelNames(char *szPerm) } } -void __fastcall pfile_get_game_name(char *dst) +void pfile_get_game_name(char *dst) { // BUGFIX: function call with no purpose pfile_get_save_num_from_name(plr[myplr]._pName); strcpy(dst, "game"); } -void __cdecl pfile_remove_temp_files() +void pfile_remove_temp_files() { if (gbMaxPlayers <= 1) { unsigned int save_num = pfile_get_save_num_from_name(plr[myplr]._pName); @@ -561,7 +561,7 @@ BOOL __stdcall GetTempSaveNames(DWORD dwIndex, char *szTemp) return TRUE; } -void __cdecl pfile_rename_temp_to_perm() +void pfile_rename_temp_to_perm() { unsigned int save_num; unsigned int i; @@ -602,7 +602,7 @@ BOOL __stdcall GetPermSaveNames(DWORD dwIndex, char *szPerm) return TRUE; } -void __fastcall pfile_write_save_file(const char *pszName, BYTE *pbData, DWORD dwLen, DWORD qwLen) +void pfile_write_save_file(const char *pszName, BYTE *pbData, DWORD dwLen, DWORD qwLen) { unsigned int save_num; char FileName[MAX_PATH]; @@ -622,12 +622,12 @@ void __fastcall pfile_write_save_file(const char *pszName, BYTE *pbData, DWORD d pfile_flush(TRUE, save_num); } -void __fastcall pfile_strcpy(char *dst, const char *src) +void pfile_strcpy(char *dst, const char *src) { strcpy(dst, src); } -BYTE *__fastcall pfile_read(const char *pszName, DWORD *pdwLen) +BYTE *pfile_read(const char *pszName, DWORD *pdwLen) { unsigned int save_num; char FileName[MAX_PATH]; @@ -681,7 +681,7 @@ BYTE *__fastcall pfile_read(const char *pszName, DWORD *pdwLen) return buf; } -void __fastcall pfile_update(BOOL force_save) +void pfile_update(BOOL force_save) { // BUGFIX: these tick values should be treated as unsigned to handle overflows correctly static int save_prev_tc; diff --git a/Source/pfile.h b/Source/pfile.h index 9434d0dc..8d316a2a 100644 --- a/Source/pfile.h +++ b/Source/pfile.h @@ -4,42 +4,42 @@ extern BOOL gbValidSaveFile; // idb -void __cdecl pfile_init_save_directory(); -void __fastcall pfile_check_available_space(char *pszDir); -void __cdecl pfile_write_hero(); -unsigned int __fastcall pfile_get_save_num_from_name(const char *name); -void __fastcall pfile_encode_hero(const PkPlayerStruct *pPack); -BOOL __fastcall pfile_open_archive(BOOL a1, unsigned int save_num); -void __fastcall pfile_get_save_path(char *pszBuf, DWORD dwBufSize, unsigned int save_num); -void __fastcall pfile_flush(BOOL is_single_player, unsigned int save_num); -BOOL __fastcall pfile_create_player_description(char *dst, unsigned int len); -BOOL __fastcall pfile_create_save_file(const char *name_1, const char *name_2); -void __cdecl pfile_flush_W(); -void __fastcall game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile); -unsigned char __fastcall game_2_ui_class(const PlayerStruct *p); +void pfile_init_save_directory(); +void pfile_check_available_space(char *pszDir); +void pfile_write_hero(); +unsigned int pfile_get_save_num_from_name(const char *name); +void pfile_encode_hero(const PkPlayerStruct *pPack); +BOOL pfile_open_archive(BOOL a1, unsigned int save_num); +void pfile_get_save_path(char *pszBuf, DWORD dwBufSize, unsigned int save_num); +void pfile_flush(BOOL is_single_player, unsigned int save_num); +BOOL pfile_create_player_description(char *dst, unsigned int len); +BOOL pfile_create_save_file(const char *name_1, const char *name_2); +void pfile_flush_W(); +void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile); +unsigned char game_2_ui_class(const PlayerStruct *p); BOOL __stdcall pfile_ui_set_hero_infos(BOOL(__stdcall *ui_add_hero_info)(_uiheroinfo *)); -char *__fastcall GetSaveDirectory(char *dst, int dst_size, unsigned int save_num); -BOOL __fastcall pfile_read_hero(HANDLE archive, PkPlayerStruct *pPack); -HANDLE __fastcall pfile_open_save_archive(int *unused, unsigned int save_num); -void __fastcall pfile_SFileCloseArchive(HANDLE hsArchive); -BOOL __fastcall pfile_archive_contains_game(HANDLE hsArchive, unsigned int save_num); +char *GetSaveDirectory(char *dst, int dst_size, unsigned int save_num); +BOOL pfile_read_hero(HANDLE archive, PkPlayerStruct *pPack); +HANDLE pfile_open_save_archive(int *unused, unsigned int save_num); +void pfile_SFileCloseArchive(HANDLE hsArchive); +BOOL pfile_archive_contains_game(HANDLE hsArchive, unsigned int save_num); BOOL __stdcall pfile_ui_set_class_stats(unsigned int player_class_nr, _uidefaultstats *class_stats); -char __fastcall pfile_get_player_class(unsigned int player_class_nr); +char pfile_get_player_class(unsigned int player_class_nr); BOOL __stdcall pfile_ui_save_create(_uiheroinfo *heroinfo); BOOL __stdcall pfile_get_file_name(DWORD lvl, char *dst); BOOL __stdcall pfile_delete_save(_uiheroinfo *hero_info); -void __cdecl pfile_read_player_from_save(); -void __fastcall GetTempLevelNames(char *szTemp); -void __fastcall GetPermLevelNames(char *szPerm); -void __fastcall pfile_get_game_name(char *dst); -void __cdecl pfile_remove_temp_files(); +void pfile_read_player_from_save(); +void GetTempLevelNames(char *szTemp); +void GetPermLevelNames(char *szPerm); +void pfile_get_game_name(char *dst); +void pfile_remove_temp_files(); BOOL __stdcall GetTempSaveNames(DWORD dwIndex, char *szTemp); -void __cdecl pfile_rename_temp_to_perm(); +void pfile_rename_temp_to_perm(); BOOL __stdcall GetPermSaveNames(DWORD dwIndex, char *szPerm); -void __fastcall pfile_write_save_file(const char *pszName, BYTE *pbData, DWORD dwLen, DWORD qwLen); -void __fastcall pfile_strcpy(char *dst, const char *src); -BYTE *__fastcall pfile_read(const char *pszName, DWORD *pdwLen); -void __fastcall pfile_update(BOOL force_save); +void pfile_write_save_file(const char *pszName, BYTE *pbData, DWORD dwLen, DWORD qwLen); +void pfile_strcpy(char *dst, const char *src); +BYTE *pfile_read(const char *pszName, DWORD *pdwLen); +void pfile_update(BOOL force_save); /* rdata */ diff --git a/Source/player.cpp b/Source/player.cpp index 1d136739..ed220abc 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -106,7 +106,7 @@ int ExpLvlsTbl[MAXCHARLEVEL] = { char *ClassStrTbl[3] = { "Warrior", "Rogue", "Sorceror" }; unsigned char fix[9] = { 0u, 0u, 3u, 3u, 3u, 6u, 6u, 6u, 8u }; /* PM_ChangeLightOff local type */ -void __fastcall SetPlayerGPtrs(UCHAR *pData, UCHAR **pAnim) +void SetPlayerGPtrs(UCHAR *pData, UCHAR **pAnim) { int i; @@ -115,7 +115,7 @@ void __fastcall SetPlayerGPtrs(UCHAR *pData, UCHAR **pAnim) } } -void __fastcall LoadPlrGFX(int pnum, player_graphic gfxflag) +void LoadPlrGFX(int pnum, player_graphic gfxflag) { char prefix[16]; char pszName[256]; @@ -227,7 +227,7 @@ void __fastcall LoadPlrGFX(int pnum, player_graphic gfxflag) } } -void __fastcall InitPlayerGFX(int pnum) +void InitPlayerGFX(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("InitPlayerGFX: illegal player %d", pnum); @@ -241,7 +241,7 @@ void __fastcall InitPlayerGFX(int pnum) } } -void __fastcall InitPlrGFXMem(int pnum) +void InitPlrGFXMem(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("InitPlrGFXMem: illegal player %d", pnum); @@ -312,7 +312,7 @@ void __fastcall InitPlrGFXMem(int pnum) plr[pnum]._pGFXLoad = 0; } -DWORD __fastcall GetPlrGFXSize(char *szCel) +DWORD GetPlrGFXSize(char *szCel) { char prefix[16]; char pszName[256]; @@ -344,7 +344,7 @@ DWORD __fastcall GetPlrGFXSize(char *szCel) return result; } -void __fastcall FreePlayerGFX(int pnum) +void FreePlayerGFX(int pnum) { void *ptr; @@ -382,7 +382,7 @@ void __fastcall FreePlayerGFX(int pnum) plr[pnum]._pGFXLoad = 0; } -void __fastcall NewPlrAnim(int pnum, unsigned char *Peq, int numFrames, int Delay, int width) +void NewPlrAnim(int pnum, unsigned char *Peq, int numFrames, int Delay, int width) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("NewPlrAnim: illegal player %d", pnum); @@ -397,7 +397,7 @@ void __fastcall NewPlrAnim(int pnum, unsigned char *Peq, int numFrames, int Dela plr[pnum]._pAnimWidth2 = (width - 64) >> 1; } -void __fastcall ClearPlrPVars(int pnum) +void ClearPlrPVars(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("ClearPlrPVars: illegal player %d", pnum); @@ -413,7 +413,7 @@ void __fastcall ClearPlrPVars(int pnum) plr[pnum]._pVar8 = 0; } -void __fastcall SetPlrAnims(int pnum) +void SetPlrAnims(int pnum) { int pc, gn; @@ -490,7 +490,7 @@ void __fastcall SetPlrAnims(int pnum) } } -void __fastcall ClearPlrRVars(PlayerStruct *p) +void ClearPlrRVars(PlayerStruct *p) { // TODO: Missing debug assert p != NULL p->bReserved[0] = 0; @@ -514,7 +514,7 @@ void __fastcall ClearPlrRVars(PlayerStruct *p) } // c: plr_classes value -void __fastcall CreatePlayer(int pnum, char c) +void CreatePlayer(int pnum, char c) { char val; int hp, mana; @@ -665,7 +665,7 @@ void __fastcall CreatePlayer(int pnum, char c) SetRndSeed(0); } -int __fastcall CalcStatDiff(int pnum) +int CalcStatDiff(int pnum) { int c; @@ -680,7 +680,7 @@ int __fastcall CalcStatDiff(int pnum) - plr[pnum]._pBaseVit; } -void __fastcall NextPlrLevel(int pnum) +void NextPlrLevel(int pnum) { char l, c; int hp, mana; @@ -734,7 +734,7 @@ void __fastcall NextPlrLevel(int pnum) } } -void __fastcall AddPlrExperience(int pnum, int lvl, int exp) +void AddPlrExperience(int pnum, int lvl, int exp) { int powerLvlCap, expCap, newLvl, i; @@ -797,7 +797,7 @@ void __fastcall AddPlrExperience(int pnum, int lvl, int exp) NetSendCmdParam1(FALSE, CMD_PLRLEVEL, plr[myplr]._pLevel); } -void __fastcall AddPlrMonstExper(int lvl, int exp, char pmask) +void AddPlrMonstExper(int lvl, int exp, char pmask) { int totplrs, i; @@ -813,7 +813,7 @@ void __fastcall AddPlrMonstExper(int lvl, int exp, char pmask) } } -void __fastcall InitPlayer(int pnum, BOOL FirstTime) +void InitPlayer(int pnum, BOOL FirstTime) { DWORD i; @@ -925,7 +925,7 @@ void __fastcall InitPlayer(int pnum, BOOL FirstTime) } // 52572C: using guessed type int leveldebug; -void __cdecl InitMultiView() +void InitMultiView() { if ((DWORD)myplr >= MAX_PLRS) { app_fatal("InitPlayer: illegal player %d", myplr); @@ -935,7 +935,7 @@ void __cdecl InitMultiView() ViewY = plr[myplr].WorldY; } -void __fastcall CheckEFlag(int pnum, BOOL flag) +void CheckEFlag(int pnum, BOOL flag) { int x, y, i; int bitflags; @@ -991,7 +991,7 @@ void __fastcall CheckEFlag(int pnum, BOOL flag) } } -BOOL __fastcall SolidLoc(int x, int y) +BOOL SolidLoc(int x, int y) { if (x < 0 || y < 0 || x >= MAXDUNX || y >= MAXDUNY) { return FALSE; @@ -1000,7 +1000,7 @@ BOOL __fastcall SolidLoc(int x, int y) return nSolidTable[dPiece[x][y]]; } -BOOL __fastcall PlrDirOK(int pnum, int dir) +BOOL PlrDirOK(int pnum, int dir) { int px, py; BOOL isOk; @@ -1028,7 +1028,7 @@ BOOL __fastcall PlrDirOK(int pnum, int dir) return isOk; } -void __fastcall PlrClrTrans(int x, int y) +void PlrClrTrans(int x, int y) { int i, j; @@ -1039,7 +1039,7 @@ void __fastcall PlrClrTrans(int x, int y) } } -void __fastcall PlrDoTrans(int x, int y) +void PlrDoTrans(int x, int y) { int i, j; @@ -1056,7 +1056,7 @@ void __fastcall PlrDoTrans(int x, int y) } } -void __fastcall SetPlayerOld(int pnum) +void SetPlayerOld(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("SetPlayerOld: illegal player %d", pnum); @@ -1066,7 +1066,7 @@ void __fastcall SetPlayerOld(int pnum) plr[pnum]._poldy = plr[pnum].WorldY; } -void __fastcall FixPlayerLocation(int pnum, int dir) +void FixPlayerLocation(int pnum, int dir) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("FixPlayerLocation: illegal player %d", pnum); @@ -1089,7 +1089,7 @@ void __fastcall FixPlayerLocation(int pnum, int dir) } } -void __fastcall StartStand(int pnum, int dir) +void StartStand(int pnum, int dir) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("StartStand: illegal player %d", pnum); @@ -1111,7 +1111,7 @@ void __fastcall StartStand(int pnum, int dir) } } -void __fastcall StartWalkStand(int pnum) +void StartWalkStand(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("StartWalkStand: illegal player %d", pnum); @@ -1134,7 +1134,7 @@ void __fastcall StartWalkStand(int pnum) } } -void __fastcall PM_ChangeLightOff(int pnum) +void PM_ChangeLightOff(int pnum) { int x, y; int xmul, ymul; @@ -1175,7 +1175,7 @@ void __fastcall PM_ChangeLightOff(int pnum) ChangeLightOff(plr[pnum]._plid, x, y); } -void __fastcall PM_ChangeOffset(int pnum) +void PM_ChangeOffset(int pnum) { int px, py; @@ -1200,7 +1200,7 @@ void __fastcall PM_ChangeOffset(int pnum) PM_ChangeLightOff(pnum); } -void __fastcall StartWalk(int pnum, int xvel, int yvel, int xadd, int yadd, int EndDir, int sdir) +void StartWalk(int pnum, int xvel, int yvel, int xadd, int yadd, int EndDir, int sdir) { int px, py; @@ -1271,7 +1271,7 @@ void __fastcall StartWalk(int pnum, int xvel, int yvel, int xadd, int yadd, int } // 52569C: using guessed type int zoomflag; -void __fastcall StartWalk2(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir, int sdir) +void StartWalk2(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir, int sdir) { int px, py; @@ -1351,7 +1351,7 @@ void __fastcall StartWalk2(int pnum, int xvel, int yvel, int xoff, int yoff, int } // 52569C: using guessed type int zoomflag; -void __fastcall StartWalk3(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir, int sdir) +void StartWalk3(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir, int sdir) { int px, py, x, y; @@ -1432,7 +1432,7 @@ void __fastcall StartWalk3(int pnum, int xvel, int yvel, int xoff, int yoff, int } // 52569C: using guessed type int zoomflag; -void __fastcall StartAttack(int pnum, int d) +void StartAttack(int pnum, int d) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("StartAttack: illegal player %d", pnum); @@ -1453,7 +1453,7 @@ void __fastcall StartAttack(int pnum, int d) SetPlayerOld(pnum); } -void __fastcall StartRangeAttack(int pnum, int d, int cx, int cy) +void StartRangeAttack(int pnum, int d, int cx, int cy) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("StartRangeAttack: illegal player %d", pnum); @@ -1476,7 +1476,7 @@ void __fastcall StartRangeAttack(int pnum, int d, int cx, int cy) plr[pnum]._pVar2 = cy; } -void __fastcall StartPlrBlock(int pnum, int dir) +void StartPlrBlock(int pnum, int dir) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("StartPlrBlock: illegal player %d", pnum); @@ -1499,7 +1499,7 @@ void __fastcall StartPlrBlock(int pnum, int dir) SetPlayerOld(pnum); } -void __fastcall StartSpell(int pnum, int d, int cx, int cy) +void StartSpell(int pnum, int d, int cx, int cy) { if ((DWORD)pnum >= MAX_PLRS) app_fatal("StartSpell: illegal player %d", pnum); @@ -1545,7 +1545,7 @@ void __fastcall StartSpell(int pnum, int d, int cx, int cy) plr[pnum]._pVar8 = 1; } -void __fastcall FixPlrWalkTags(int pnum) +void FixPlrWalkTags(int pnum) { int pp, pn; int dx, dy, y, x; @@ -1572,7 +1572,7 @@ void __fastcall FixPlrWalkTags(int pnum) } } -void __fastcall RemovePlrFromMap(int pnum) +void RemovePlrFromMap(int pnum) { int x, y; int pp, pn; @@ -1592,7 +1592,7 @@ void __fastcall RemovePlrFromMap(int pnum) dPlayer[x][y] = 0; } -void __fastcall StartPlrHit(int pnum, int dam, BOOL forcehit) +void StartPlrHit(int pnum, int dam, BOOL forcehit) { int pd; @@ -1631,7 +1631,7 @@ void __fastcall StartPlrHit(int pnum, int dam, BOOL forcehit) } } -void __fastcall RespawnDeadItem(ItemStruct *itm, int x, int y) +void RespawnDeadItem(ItemStruct *itm, int x, int y) { int ii; @@ -1656,7 +1656,7 @@ void __fastcall RespawnDeadItem(ItemStruct *itm, int x, int y) itm->_itype = ITYPE_NONE; } -void __fastcall StartPlayerKill(int pnum, int earflag) +void StartPlayerKill(int pnum, int earflag) { BOOL diablolevel; int i, pdd; @@ -1767,7 +1767,7 @@ void __fastcall StartPlayerKill(int pnum, int earflag) SetPlayerHitPoints(pnum, 0); } -void __fastcall PlrDeadItem(int pnum, ItemStruct *itm, int xx, int yy) +void PlrDeadItem(int pnum, ItemStruct *itm, int xx, int yy) { int x, y; int i, j, k; @@ -1804,7 +1804,7 @@ void __fastcall PlrDeadItem(int pnum, ItemStruct *itm, int xx, int yy) } } -void __fastcall DropHalfPlayersGold(int pnum) +void DropHalfPlayersGold(int pnum) { int i, hGold; @@ -1916,7 +1916,7 @@ void __fastcall DropHalfPlayersGold(int pnum) } // 52571C: using guessed type int drawpanflag; -void __fastcall SyncPlrKill(int pnum, int earflag) +void SyncPlrKill(int pnum, int earflag) { int ma, i; @@ -1940,7 +1940,7 @@ void __fastcall SyncPlrKill(int pnum, int earflag) StartPlayerKill(pnum, earflag); } -void __fastcall RemovePlrMissiles(int pnum) +void RemovePlrMissiles(int pnum) { int mi, am; @@ -1968,7 +1968,7 @@ void __fastcall RemovePlrMissiles(int pnum) } } -void __fastcall InitLevelChange(int pnum) +void InitLevelChange(int pnum) { RemovePlrMissiles(pnum); if (pnum == myplr && qtextflag) { @@ -1994,7 +1994,7 @@ void __fastcall InitLevelChange(int pnum) } // 646D00: using guessed type char qtextflag; -void __fastcall StartNewLvl(int pnum, int fom, int lvl) +void StartNewLvl(int pnum, int fom, int lvl) { InitLevelChange(pnum); @@ -2034,7 +2034,7 @@ void __fastcall StartNewLvl(int pnum, int fom, int lvl) } } } -void __fastcall RestartTownLvl(int pnum) +void RestartTownLvl(int pnum) { InitLevelChange(pnum); if ((DWORD)pnum >= MAX_PLRS) { @@ -2058,7 +2058,7 @@ void __fastcall RestartTownLvl(int pnum) } } -void __fastcall StartWarpLvl(int pnum, int pidx) +void StartWarpLvl(int pnum, int pidx) { InitLevelChange(pnum); @@ -2078,12 +2078,12 @@ void __fastcall StartWarpLvl(int pnum, int pidx) } } -BOOL __fastcall PM_DoStand(int pnum) +BOOL PM_DoStand(int pnum) { return FALSE; } -BOOL __fastcall PM_DoWalk(int pnum) +BOOL PM_DoWalk(int pnum) { int vel; @@ -2136,7 +2136,7 @@ BOOL __fastcall PM_DoWalk(int pnum) return FALSE; } -BOOL __fastcall PM_DoWalk2(int pnum) +BOOL PM_DoWalk2(int pnum) { int vel; @@ -2186,7 +2186,7 @@ BOOL __fastcall PM_DoWalk2(int pnum) return FALSE; } -BOOL __fastcall PM_DoWalk3(int pnum) +BOOL PM_DoWalk3(int pnum) { int vel; @@ -2241,7 +2241,7 @@ BOOL __fastcall PM_DoWalk3(int pnum) return FALSE; } -BOOL __fastcall WeaponDur(int pnum, int durrnd) +BOOL WeaponDur(int pnum, int durrnd) { if (pnum != myplr) { return FALSE; @@ -2314,7 +2314,7 @@ BOOL __fastcall WeaponDur(int pnum, int durrnd) return FALSE; } -BOOL __fastcall PlrHitMonst(int pnum, int m) +BOOL PlrHitMonst(int pnum, int m) { BOOL rv, ret; int hit, hper, mind, maxd, dam, lvl, phanditype, mClass, skdam, tac; @@ -2492,7 +2492,7 @@ BOOL __fastcall PlrHitMonst(int pnum, int m) return rv; } -BOOL __fastcall PlrHitPlr(int pnum, char p) +BOOL PlrHitPlr(int pnum, char p) { BOOL rv; int hit, hper, blk, blkper, dir, mind, maxd, dam, lvl, skdam, tac; @@ -2585,7 +2585,7 @@ BOOL __fastcall PlrHitPlr(int pnum, char p) return rv; } -BOOL __fastcall PlrHitObj(int pnum, int mx, int my) +BOOL PlrHitObj(int pnum, int mx, int my) { int oi; @@ -2603,7 +2603,7 @@ BOOL __fastcall PlrHitObj(int pnum, int mx, int my) return FALSE; } -BOOL __fastcall PM_DoAttack(int pnum) +BOOL PM_DoAttack(int pnum) { int frame, dir, dx, dy, m; BOOL didhit; @@ -2690,7 +2690,7 @@ BOOL __fastcall PM_DoAttack(int pnum) } } -BOOL __fastcall PM_DoRangeAttack(int pnum) +BOOL PM_DoRangeAttack(int pnum) { int origFrame, mistype; @@ -2744,7 +2744,7 @@ BOOL __fastcall PM_DoRangeAttack(int pnum) } } -void __fastcall ShieldDur(int pnum) +void ShieldDur(int pnum) { if (pnum != myplr) { return; @@ -2779,7 +2779,7 @@ void __fastcall ShieldDur(int pnum) } } -BOOL __fastcall PM_DoBlock(int pnum) +BOOL PM_DoBlock(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("PM_DoBlock: illegal player %d", pnum); @@ -2802,7 +2802,7 @@ BOOL __fastcall PM_DoBlock(int pnum) return FALSE; } -BOOL __fastcall PM_DoSpell(int pnum) +BOOL PM_DoSpell(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("PM_DoSpell: illegal player %d", pnum); @@ -2858,7 +2858,7 @@ BOOL __fastcall PM_DoSpell(int pnum) } // 52571C: using guessed type int drawpanflag; -BOOL __fastcall PM_DoGotHit(int pnum) +BOOL PM_DoGotHit(int pnum) { int frame; @@ -2890,7 +2890,7 @@ BOOL __fastcall PM_DoGotHit(int pnum) return FALSE; } -void __fastcall ArmorDur(int pnum) +void ArmorDur(int pnum) { int a; ItemStruct *pi; @@ -2940,7 +2940,7 @@ void __fastcall ArmorDur(int pnum) CalcPlrInv(pnum, TRUE); } -BOOL __fastcall PM_DoDeath(int pnum) +BOOL PM_DoDeath(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("PM_DoDeath: illegal player %d", pnum); @@ -2970,12 +2970,12 @@ BOOL __fastcall PM_DoDeath(int pnum) } // 69B7C4: using guessed type int deathdelay; -BOOL __fastcall PM_DoNewLvl(int pnum) +BOOL PM_DoNewLvl(int pnum) { return FALSE; } -void __fastcall CheckNewPath(int pnum) +void CheckNewPath(int pnum) { int i, x, y, d; int xvel3, xvel, yvel; @@ -3294,7 +3294,7 @@ void __fastcall CheckNewPath(int pnum) } } -BOOL __fastcall PlrDeathModeOK(int pnum) +BOOL PlrDeathModeOK(int pnum) { if (pnum != myplr) { return TRUE; @@ -3315,7 +3315,7 @@ BOOL __fastcall PlrDeathModeOK(int pnum) return FALSE; } -void __cdecl ValidatePlayer() +void ValidatePlayer() { __int64 msk; int gt, pc, i, b; @@ -3367,7 +3367,7 @@ void __cdecl ValidatePlayer() plr[myplr]._pMemSpells &= msk; } -void __cdecl ProcessPlayers() +void ProcessPlayers() { int pnum; BOOL tplayer; @@ -3466,7 +3466,7 @@ void __cdecl ProcessPlayers() } // 52A554: using guessed type int sfxdelay; -void __fastcall CheckCheatStats(int pnum) +void CheckCheatStats(int pnum) { if (plr[pnum]._pStrength > 750) { plr[pnum]._pStrength = 750; @@ -3493,7 +3493,7 @@ void __fastcall CheckCheatStats(int pnum) } } -void __fastcall ClrPlrPath(int pnum) +void ClrPlrPath(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("ClrPlrPath: illegal player %d", pnum); @@ -3502,7 +3502,7 @@ void __fastcall ClrPlrPath(int pnum) memset(plr[pnum].walkpath, WALK_NONE, sizeof(plr[pnum].walkpath)); } -BOOL __fastcall PosOkPlayer(int pnum, int px, int py) +BOOL PosOkPlayer(int pnum, int px, int py) { BOOL PosOK; DWORD p; @@ -3553,7 +3553,7 @@ BOOL __fastcall PosOkPlayer(int pnum, int px, int py) return TRUE; } -void __fastcall MakePlrPath(int pnum, int xx, int yy, BOOL endspace) +void MakePlrPath(int pnum, int xx, int yy, BOOL endspace) { int path; @@ -3613,7 +3613,7 @@ void __fastcall MakePlrPath(int pnum, int xx, int yy, BOOL endspace) plr[pnum].walkpath[path] = WALK_NONE; } -void __fastcall CheckPlrSpell() +void CheckPlrSpell() { BOOL addflag; int rspell, sd, sl; @@ -3700,7 +3700,7 @@ void __fastcall CheckPlrSpell() } // 4B8CC2: using guessed type char pcursplr; -void __fastcall SyncPlrAnim(int pnum) +void SyncPlrAnim(int pnum) { int dir, sType; @@ -3753,7 +3753,7 @@ void __fastcall SyncPlrAnim(int pnum) } } -void __fastcall SyncInitPlrPos(int pnum) +void SyncInitPlrPos(int pnum) { int x, y, xx, yy, range; DWORD i; @@ -3803,7 +3803,7 @@ void __fastcall SyncInitPlrPos(int pnum) } } -void __fastcall SyncInitPlr(int pnum) +void SyncInitPlr(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("SyncInitPlr: illegal player %d", pnum); @@ -3813,7 +3813,7 @@ void __fastcall SyncInitPlr(int pnum) SyncInitPlrPos(pnum); } -void __fastcall CheckStats(int pnum) +void CheckStats(int pnum) { int c, i; @@ -3863,7 +3863,7 @@ void __fastcall CheckStats(int pnum) } } -void __fastcall ModifyPlrStr(int pnum, int l) +void ModifyPlrStr(int pnum, int l) { int max; @@ -3892,7 +3892,7 @@ void __fastcall ModifyPlrStr(int pnum, int l) } } -void __fastcall ModifyPlrMag(int pnum, int l) +void ModifyPlrMag(int pnum, int l) { int max, ms; @@ -3927,7 +3927,7 @@ void __fastcall ModifyPlrMag(int pnum, int l) } } -void __fastcall ModifyPlrDex(int pnum, int l) +void ModifyPlrDex(int pnum, int l) { int max; @@ -3953,7 +3953,7 @@ void __fastcall ModifyPlrDex(int pnum, int l) } } -void __fastcall ModifyPlrVit(int pnum, int l) +void ModifyPlrVit(int pnum, int l) { int max, ms; @@ -3986,7 +3986,7 @@ void __fastcall ModifyPlrVit(int pnum, int l) } } -void __fastcall SetPlayerHitPoints(int pnum, int newhp) +void SetPlayerHitPoints(int pnum, int newhp) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("SetPlayerHitPoints: illegal player %d", pnum); @@ -4000,7 +4000,7 @@ void __fastcall SetPlayerHitPoints(int pnum, int newhp) } } -void __fastcall SetPlrStr(int pnum, int v) +void SetPlrStr(int pnum, int v) { int dm; @@ -4020,7 +4020,7 @@ void __fastcall SetPlrStr(int pnum, int v) plr[pnum]._pDamageMod = dm; } -void __fastcall SetPlrMag(int pnum, int v) +void SetPlrMag(int pnum, int v) { int m; @@ -4040,7 +4040,7 @@ void __fastcall SetPlrMag(int pnum, int v) CalcPlrInv(pnum, TRUE); } -void __fastcall SetPlrDex(int pnum, int v) +void SetPlrDex(int pnum, int v) { int dm; @@ -4060,7 +4060,7 @@ void __fastcall SetPlrDex(int pnum, int v) plr[pnum]._pDamageMod = dm; } -void __fastcall SetPlrVit(int pnum, int v) +void SetPlrVit(int pnum, int v) { int hp; @@ -4080,7 +4080,7 @@ void __fastcall SetPlrVit(int pnum, int v) CalcPlrInv(pnum, TRUE); } -void __fastcall InitDungMsgs(int pnum) +void InitDungMsgs(int pnum) { if ((DWORD)pnum >= MAX_PLRS) { app_fatal("InitDungMsgs: illegal player %d", pnum); @@ -4089,7 +4089,7 @@ void __fastcall InitDungMsgs(int pnum) plr[pnum].pDungMsgs = 0; } -void __cdecl PlayDungMsgs() +void PlayDungMsgs() { if ((DWORD)myplr >= MAX_PLRS) { app_fatal("PlayDungMsgs: illegal player %d", myplr); diff --git a/Source/player.h b/Source/player.h index 53221af2..7513b24d 100644 --- a/Source/player.h +++ b/Source/player.h @@ -18,96 +18,96 @@ extern int plr_sframe_size; // idb extern int deathdelay; // weak extern int plr_dframe_size; // idb -void __fastcall SetPlayerGPtrs(UCHAR *pData, UCHAR **pAnim); /* unsigned char *+** */ -void __fastcall LoadPlrGFX(int pnum, player_graphic gfxflag); -void __fastcall InitPlayerGFX(int pnum); -void __fastcall InitPlrGFXMem(int pnum); -DWORD __fastcall GetPlrGFXSize(char *szCel); -void __fastcall FreePlayerGFX(int pnum); -void __fastcall NewPlrAnim(int pnum, unsigned char *Peq, int numFrames, int Delay, int width); -void __fastcall ClearPlrPVars(int pnum); -void __fastcall SetPlrAnims(int pnum); -void __fastcall ClearPlrRVars(PlayerStruct *p); -void __fastcall CreatePlayer(int pnum, char c); -int __fastcall CalcStatDiff(int pnum); -void __fastcall NextPlrLevel(int pnum); -void __fastcall AddPlrExperience(int pnum, int lvl, int exp); -void __fastcall AddPlrMonstExper(int lvl, int exp, char pmask); -void __fastcall InitPlayer(int pnum, BOOL FirstTime); -void __cdecl InitMultiView(); -void __fastcall CheckEFlag(int pnum, BOOL flag); -BOOL __fastcall SolidLoc(int x, int y); -BOOL __fastcall PlrDirOK(int pnum, int dir); -void __fastcall PlrClrTrans(int x, int y); -void __fastcall PlrDoTrans(int x, int y); -void __fastcall SetPlayerOld(int pnum); -void __fastcall FixPlayerLocation(int pnum, int dir); -void __fastcall StartStand(int pnum, int dir); -void __fastcall StartWalkStand(int pnum); -void __fastcall PM_ChangeLightOff(int pnum); -void __fastcall PM_ChangeOffset(int pnum); -void __fastcall StartWalk(int pnum, int xvel, int yvel, int xadd, int yadd, int EndDir, int sdir); -void __fastcall StartWalk2(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir, int sdir); -void __fastcall StartWalk3(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir, int sdir); -void __fastcall StartAttack(int pnum, int d); -void __fastcall StartRangeAttack(int pnum, int d, int cx, int cy); -void __fastcall StartPlrBlock(int pnum, int dir); -void __fastcall StartSpell(int pnum, int d, int cx, int cy); -void __fastcall FixPlrWalkTags(int pnum); -void __fastcall RemovePlrFromMap(int pnum); -void __fastcall StartPlrHit(int pnum, int dam, BOOL forcehit); -void __fastcall RespawnDeadItem(ItemStruct *itm, int x, int y); -void __fastcall StartPlayerKill(int pnum, int earflag); -void __fastcall PlrDeadItem(int pnum, ItemStruct *itm, int xx, int yy); -void __fastcall DropHalfPlayersGold(int pnum); -void __fastcall SyncPlrKill(int pnum, int earflag); -void __fastcall j_StartPlayerKill(int pnum, int earflag); -void __fastcall RemovePlrMissiles(int pnum); -void __fastcall InitLevelChange(int pnum); -void __fastcall StartNewLvl(int pnum, int fom, int lvl); -void __fastcall RestartTownLvl(int pnum); -void __fastcall StartWarpLvl(int pnum, int pidx); -BOOL __fastcall PM_DoStand(int pnum); -BOOL __fastcall PM_DoNewLvl(int pnum); -BOOL __fastcall PM_DoWalk(int pnum); -BOOL __fastcall PM_DoWalk2(int pnum); -BOOL __fastcall PM_DoWalk3(int pnum); -BOOL __fastcall WeaponDur(int pnum, int durrnd); -BOOL __fastcall PlrHitMonst(int pnum, int m); -BOOL __fastcall PlrHitPlr(int pnum, char p); -BOOL __fastcall PlrHitObj(int pnum, int mx, int my); -BOOL __fastcall PM_DoAttack(int pnum); -BOOL __fastcall PM_DoRangeAttack(int pnum); -void __fastcall ShieldDur(int pnum); -BOOL __fastcall PM_DoBlock(int pnum); -BOOL __fastcall PM_DoSpell(int pnum); -BOOL __fastcall PM_DoGotHit(int pnum); -void __fastcall ArmorDur(int pnum); -BOOL __fastcall PM_DoDeath(int pnum); -void __fastcall CheckNewPath(int pnum); -BOOL __fastcall PlrDeathModeOK(int pnum); -void __cdecl ValidatePlayer(); -void __cdecl ProcessPlayers(); -void __fastcall CheckCheatStats(int pnum); -void __fastcall ClrPlrPath(int pnum); -BOOL __fastcall PosOkPlayer(int pnum, int px, int py); -void __fastcall MakePlrPath(int pnum, int xx, int yy, BOOL endspace); -void __fastcall CheckPlrSpell(); -void __fastcall SyncPlrAnim(int pnum); -void __fastcall SyncInitPlrPos(int pnum); -void __fastcall SyncInitPlr(int pnum); -void __fastcall CheckStats(int pnum); -void __fastcall ModifyPlrStr(int pnum, int l); -void __fastcall ModifyPlrMag(int pnum, int l); -void __fastcall ModifyPlrDex(int pnum, int l); -void __fastcall ModifyPlrVit(int pnum, int l); -void __fastcall SetPlayerHitPoints(int pnum, int newhp); -void __fastcall SetPlrStr(int pnum, int v); -void __fastcall SetPlrMag(int pnum, int v); -void __fastcall SetPlrDex(int pnum, int v); -void __fastcall SetPlrVit(int pnum, int v); -void __fastcall InitDungMsgs(int pnum); -void __cdecl PlayDungMsgs(); +void SetPlayerGPtrs(UCHAR *pData, UCHAR **pAnim); /* unsigned char *+** */ +void LoadPlrGFX(int pnum, player_graphic gfxflag); +void InitPlayerGFX(int pnum); +void InitPlrGFXMem(int pnum); +DWORD GetPlrGFXSize(char *szCel); +void FreePlayerGFX(int pnum); +void NewPlrAnim(int pnum, unsigned char *Peq, int numFrames, int Delay, int width); +void ClearPlrPVars(int pnum); +void SetPlrAnims(int pnum); +void ClearPlrRVars(PlayerStruct *p); +void CreatePlayer(int pnum, char c); +int CalcStatDiff(int pnum); +void NextPlrLevel(int pnum); +void AddPlrExperience(int pnum, int lvl, int exp); +void AddPlrMonstExper(int lvl, int exp, char pmask); +void InitPlayer(int pnum, BOOL FirstTime); +void InitMultiView(); +void CheckEFlag(int pnum, BOOL flag); +BOOL SolidLoc(int x, int y); +BOOL PlrDirOK(int pnum, int dir); +void PlrClrTrans(int x, int y); +void PlrDoTrans(int x, int y); +void SetPlayerOld(int pnum); +void FixPlayerLocation(int pnum, int dir); +void StartStand(int pnum, int dir); +void StartWalkStand(int pnum); +void PM_ChangeLightOff(int pnum); +void PM_ChangeOffset(int pnum); +void StartWalk(int pnum, int xvel, int yvel, int xadd, int yadd, int EndDir, int sdir); +void StartWalk2(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir, int sdir); +void StartWalk3(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir, int sdir); +void StartAttack(int pnum, int d); +void StartRangeAttack(int pnum, int d, int cx, int cy); +void StartPlrBlock(int pnum, int dir); +void StartSpell(int pnum, int d, int cx, int cy); +void FixPlrWalkTags(int pnum); +void RemovePlrFromMap(int pnum); +void StartPlrHit(int pnum, int dam, BOOL forcehit); +void RespawnDeadItem(ItemStruct *itm, int x, int y); +void StartPlayerKill(int pnum, int earflag); +void PlrDeadItem(int pnum, ItemStruct *itm, int xx, int yy); +void DropHalfPlayersGold(int pnum); +void SyncPlrKill(int pnum, int earflag); +void j_StartPlayerKill(int pnum, int earflag); +void RemovePlrMissiles(int pnum); +void InitLevelChange(int pnum); +void StartNewLvl(int pnum, int fom, int lvl); +void RestartTownLvl(int pnum); +void StartWarpLvl(int pnum, int pidx); +BOOL PM_DoStand(int pnum); +BOOL PM_DoNewLvl(int pnum); +BOOL PM_DoWalk(int pnum); +BOOL PM_DoWalk2(int pnum); +BOOL PM_DoWalk3(int pnum); +BOOL WeaponDur(int pnum, int durrnd); +BOOL PlrHitMonst(int pnum, int m); +BOOL PlrHitPlr(int pnum, char p); +BOOL PlrHitObj(int pnum, int mx, int my); +BOOL PM_DoAttack(int pnum); +BOOL PM_DoRangeAttack(int pnum); +void ShieldDur(int pnum); +BOOL PM_DoBlock(int pnum); +BOOL PM_DoSpell(int pnum); +BOOL PM_DoGotHit(int pnum); +void ArmorDur(int pnum); +BOOL PM_DoDeath(int pnum); +void CheckNewPath(int pnum); +BOOL PlrDeathModeOK(int pnum); +void ValidatePlayer(); +void ProcessPlayers(); +void CheckCheatStats(int pnum); +void ClrPlrPath(int pnum); +BOOL PosOkPlayer(int pnum, int px, int py); +void MakePlrPath(int pnum, int xx, int yy, BOOL endspace); +void CheckPlrSpell(); +void SyncPlrAnim(int pnum); +void SyncInitPlrPos(int pnum); +void SyncInitPlr(int pnum); +void CheckStats(int pnum); +void ModifyPlrStr(int pnum, int l); +void ModifyPlrMag(int pnum, int l); +void ModifyPlrDex(int pnum, int l); +void ModifyPlrVit(int pnum, int l); +void SetPlayerHitPoints(int pnum, int newhp); +void SetPlrStr(int pnum, int v); +void SetPlrMag(int pnum, int v); +void SetPlrDex(int pnum, int v); +void SetPlrVit(int pnum, int v); +void InitDungMsgs(int pnum); +void PlayDungMsgs(); /* rdata */ diff --git a/Source/plrmsg.cpp b/Source/plrmsg.cpp index 8e80425a..da6e9a95 100644 --- a/Source/plrmsg.cpp +++ b/Source/plrmsg.cpp @@ -7,7 +7,7 @@ _plrmsg plr_msgs[PMSG_COUNT]; const char text_color_from_player_num[MAX_PLRS + 1] = { COL_WHITE, COL_WHITE, COL_WHITE, COL_WHITE, COL_GOLD }; -void __fastcall plrmsg_delay(BOOL delay) +void plrmsg_delay(BOOL delay) { int i; _plrmsg *pMsg; @@ -24,7 +24,7 @@ void __fastcall plrmsg_delay(BOOL delay) pMsg->time += plrmsg_ticks; } -char *__fastcall ErrorPlrMsg(const char *pszMsg) +char *ErrorPlrMsg(const char *pszMsg) { char *result; _plrmsg *pMsg = &plr_msgs[plr_msg_slot]; @@ -36,7 +36,7 @@ char *__fastcall ErrorPlrMsg(const char *pszMsg) return result; } -size_t EventPlrMsg(const char *pszFmt, ...) +size_t __cdecl EventPlrMsg(const char *pszFmt, ...) { _plrmsg *pMsg; va_list va; @@ -51,7 +51,7 @@ size_t EventPlrMsg(const char *pszFmt, ...) return strlen(pMsg->str); } -void __fastcall SendPlrMsg(int pnum, const char *pszStr) +void SendPlrMsg(int pnum, const char *pszStr) { _plrmsg *pMsg = &plr_msgs[plr_msg_slot]; plr_msg_slot = (plr_msg_slot + 1) & (PMSG_COUNT - 1); @@ -62,7 +62,7 @@ void __fastcall SendPlrMsg(int pnum, const char *pszStr) sprintf(pMsg->str, "%s (lvl %d): %s", plr[pnum]._pName, plr[pnum]._pLevel, pszStr); } -void __cdecl ClearPlrMsg() +void ClearPlrMsg() { int i; _plrmsg *pMsg = plr_msgs; @@ -74,13 +74,13 @@ void __cdecl ClearPlrMsg() } } -void __cdecl InitPlrMsg() +void InitPlrMsg() { memset(plr_msgs, 0, sizeof(plr_msgs)); plr_msg_slot = 0; } -void __cdecl DrawPlrMsg() +void DrawPlrMsg() { int i; int x = 74; @@ -105,7 +105,7 @@ void __cdecl DrawPlrMsg() } } -void __fastcall PrintPlrMsg(unsigned int x, unsigned int y, unsigned int width, const char *str, unsigned char col) +void PrintPlrMsg(unsigned int x, unsigned int y, unsigned int width, const char *str, unsigned char col) { int line = 0; diff --git a/Source/plrmsg.h b/Source/plrmsg.h index c5fb59c0..233ee80f 100644 --- a/Source/plrmsg.h +++ b/Source/plrmsg.h @@ -4,14 +4,14 @@ extern _plrmsg plr_msgs[PMSG_COUNT]; -void __fastcall plrmsg_delay(BOOL delay); -char *__fastcall ErrorPlrMsg(const char *pszMsg); -size_t EventPlrMsg(const char *pszFmt, ...); -void __fastcall SendPlrMsg(int pnum, const char *pszStr); -void __cdecl ClearPlrMsg(); -void __cdecl InitPlrMsg(); -void __cdecl DrawPlrMsg(); -void __fastcall PrintPlrMsg(unsigned int x, unsigned int y, unsigned int width, const char *str, unsigned char just); +void plrmsg_delay(BOOL delay); +char *ErrorPlrMsg(const char *pszMsg); +size_t __cdecl EventPlrMsg(const char *pszFmt, ...); +void SendPlrMsg(int pnum, const char *pszStr); +void ClearPlrMsg(); +void InitPlrMsg(); +void DrawPlrMsg(); +void PrintPlrMsg(unsigned int x, unsigned int y, unsigned int width, const char *str, unsigned char just); /* rdata */ diff --git a/Source/portal.cpp b/Source/portal.cpp index 8ebc0d06..b0d5dc19 100644 --- a/Source/portal.cpp +++ b/Source/portal.cpp @@ -8,7 +8,7 @@ int portalindex; int WarpDropX[MAXPORTAL] = { 57, 59, 61, 63 }; int WarpDropY[MAXPORTAL] = { 40, 40, 40, 40 }; -void __cdecl InitPortals() +void InitPortals() { int i; @@ -18,7 +18,7 @@ void __cdecl InitPortals() } } -void __fastcall SetPortalStats(int i, BOOL o, int x, int y, int lvl, int lvltype) +void SetPortalStats(int i, BOOL o, int x, int y, int lvl, int lvltype) { portal[i].setlvl = FALSE; portal[i].x = x; @@ -28,7 +28,7 @@ void __fastcall SetPortalStats(int i, BOOL o, int x, int y, int lvl, int lvltype portal[i].ltype = lvltype; } -void __fastcall AddWarpMissile(int i, int x, int y) +void AddWarpMissile(int i, int x, int y) { int mi; @@ -46,7 +46,7 @@ void __fastcall AddWarpMissile(int i, int x, int y) } } -void __cdecl SyncPortals() +void SyncPortals() { int i; @@ -66,12 +66,12 @@ void __cdecl SyncPortals() } // 5CF31D: using guessed type char setlevel; -void __fastcall AddInTownPortal(int i) +void AddInTownPortal(int i) { AddWarpMissile(i, WarpDropX[i], WarpDropY[i]); } -void __fastcall ActivatePortal(int i, int x, int y, int lvl, int lvltype, BOOL sp) +void ActivatePortal(int i, int x, int y, int lvl, int lvltype, BOOL sp) { portal[i].open = TRUE; @@ -84,12 +84,12 @@ void __fastcall ActivatePortal(int i, int x, int y, int lvl, int lvltype, BOOL s } } -void __fastcall DeactivatePortal(int i) +void DeactivatePortal(int i) { portal[i].open = FALSE; } -BOOL __fastcall PortalOnLevel(int i) +BOOL PortalOnLevel(int i) { if (portal[i].level == currlevel) return TRUE; @@ -97,7 +97,7 @@ BOOL __fastcall PortalOnLevel(int i) return currlevel == 0; } -void __fastcall RemovePortalMissile(int id) +void RemovePortalMissile(int id) { int i; int mi; @@ -116,12 +116,12 @@ void __fastcall RemovePortalMissile(int id) } } -void __fastcall SetCurrentPortal(int p) +void SetCurrentPortal(int p) { portalindex = p; } -void __cdecl GetPortalLevel() +void GetPortalLevel() { if (currlevel) { setlevel = 0; @@ -149,7 +149,7 @@ void __cdecl GetPortalLevel() } // 5CF31D: using guessed type char setlevel; -void __cdecl GetPortalLvlPos() +void GetPortalLvlPos() { if (currlevel == 0) { ViewX = WarpDropX[portalindex] + 1; @@ -165,7 +165,7 @@ void __cdecl GetPortalLvlPos() } } -BOOL __fastcall PosOkPortal(int lvl, int x, int y) +BOOL PosOkPortal(int lvl, int x, int y) { int i; diff --git a/Source/portal.h b/Source/portal.h index fdf96fc8..1690180d 100644 --- a/Source/portal.h +++ b/Source/portal.h @@ -5,19 +5,19 @@ extern PortalStruct portal[MAXPORTAL]; extern int portalindex; -void __cdecl InitPortals(); -void __fastcall SetPortalStats(int i, BOOL o, int x, int y, int lvl, int lvltype); -void __fastcall AddWarpMissile(int i, int x, int y); -void __cdecl SyncPortals(); -void __fastcall AddInTownPortal(int i); -void __fastcall ActivatePortal(int i, int x, int y, int lvl, int lvltype, BOOL sp); -void __fastcall DeactivatePortal(int i); -BOOL __fastcall PortalOnLevel(int i); -void __fastcall RemovePortalMissile(int id); -void __fastcall SetCurrentPortal(int p); -void __cdecl GetPortalLevel(); -void __cdecl GetPortalLvlPos(); -BOOL __fastcall PosOkPortal(int lvl, int x, int y); +void InitPortals(); +void SetPortalStats(int i, BOOL o, int x, int y, int lvl, int lvltype); +void AddWarpMissile(int i, int x, int y); +void SyncPortals(); +void AddInTownPortal(int i); +void ActivatePortal(int i, int x, int y, int lvl, int lvltype, BOOL sp); +void DeactivatePortal(int i); +BOOL PortalOnLevel(int i); +void RemovePortalMissile(int id); +void SetCurrentPortal(int p); +void GetPortalLevel(); +void GetPortalLvlPos(); +BOOL PosOkPortal(int lvl, int x, int y); /* rdata */ extern int WarpDropX[MAXPORTAL]; diff --git a/Source/quests.cpp b/Source/quests.cpp index e9b6b0a4..02838c6a 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -51,7 +51,7 @@ int QuestGroup2[3] = { QTYPE_BLIND, QTYPE_INFRA, QTYPE_BLOOD }; int QuestGroup3[3] = { QTYPE_BLKM, QTYPE_ZHAR, QTYPE_ANVIL }; int QuestGroup4[2] = { QTYPE_VEIL, QTYPE_WARLRD }; -void __cdecl InitQuests() +void InitQuests() { int initiatedQuests; int i; @@ -130,7 +130,7 @@ void __cdecl InitQuests() // 69BD04: using guessed type int questlog; // 69BE90: using guessed type int qline; -void __cdecl CheckQuests() +void CheckQuests() { //int v0; // eax unsigned char *v1; // esi @@ -210,7 +210,7 @@ LABEL_29: // 679660: using guessed type char gbMaxPlayers; // 69BE90: using guessed type int qline; -BOOL __cdecl ForceQuests() +BOOL ForceQuests() { int i, j, qx, qy, ql; @@ -240,7 +240,7 @@ BOOL __cdecl ForceQuests() } // 679660: using guessed type char gbMaxPlayers; -BOOL __fastcall QuestStatus(int i) +BOOL QuestStatus(int i) { BOOL result; // al @@ -255,7 +255,7 @@ BOOL __fastcall QuestStatus(int i) // 5CF31D: using guessed type char setlevel; // 679660: using guessed type char gbMaxPlayers; -void __fastcall CheckQuestKill(int m, BOOL sendmsg) +void CheckQuestKill(int m, BOOL sendmsg) { int v2; // ecx char v3; // al @@ -402,12 +402,12 @@ void __fastcall CheckQuestKill(int m, BOOL sendmsg) // 52A554: using guessed type int sfxdelay; // 679660: using guessed type char gbMaxPlayers; -void __cdecl DrawButcher() +void DrawButcher() { DRLG_RectTrans(2 * setpc_x + 19, 2 * setpc_y + 19, 2 * setpc_x + 26, 2 * setpc_y + 26); } -void __fastcall DrawSkelKing(int q, int x, int y) +void DrawSkelKing(int q, int x, int y) { int v3; // eax @@ -416,7 +416,7 @@ void __fastcall DrawSkelKing(int q, int x, int y) quests[v3]._qty = 2 * y + 23; } -void __fastcall DrawWarLord(int x, int y) +void DrawWarLord(int x, int y) { int v2; // esi int v3; // edi @@ -470,7 +470,7 @@ void __fastcall DrawWarLord(int x, int y) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall DrawSChamber(int q, int x, int y) +void DrawSChamber(int q, int x, int y) { int v3; // esi unsigned char *v4; // eax @@ -527,7 +527,7 @@ void __fastcall DrawSChamber(int q, int x, int y) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall DrawLTBanner(int x, int y) +void DrawLTBanner(int x, int y) { int v2; // ebx int v3; // esi @@ -580,7 +580,7 @@ void __fastcall DrawLTBanner(int x, int y) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall DrawBlind(int x, int y) +void DrawBlind(int x, int y) { int v2; // ebx int v3; // esi @@ -633,7 +633,7 @@ void __fastcall DrawBlind(int x, int y) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall DrawBlood(int x, int y) +void DrawBlood(int x, int y) { int v2; // ebx int v3; // esi @@ -686,7 +686,7 @@ void __fastcall DrawBlood(int x, int y) // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall DRLG_CheckQuests(int x, int y) +void DRLG_CheckQuests(int x, int y) { int i; @@ -720,7 +720,7 @@ void __fastcall DRLG_CheckQuests(int x, int y) } // 69BE90: using guessed type int qline; -void __cdecl SetReturnLvlPos() +void SetReturnLvlPos() { int v0; // eax @@ -754,7 +754,7 @@ LABEL_10: ReturnLvl = v0; } -void __cdecl GetReturnLvlPos() +void GetReturnLvlPos() { if (quests[QTYPE_VB]._qactive == 3) quests[QTYPE_VB]._qvar2 = 2; @@ -765,7 +765,7 @@ void __cdecl GetReturnLvlPos() } // 5BB1ED: using guessed type char leveltype; -void __cdecl ResyncMPQuests() +void ResyncMPQuests() { if (quests[QTYPE_KING]._qactive == 1 && currlevel >= (unsigned char)quests[QTYPE_KING]._qlevel - 1 @@ -787,7 +787,7 @@ void __cdecl ResyncMPQuests() AddObject(OBJ_ALTBOY, 2 * setpc_x + 20, 2 * setpc_y + 22); } -void __cdecl ResyncQuests() +void ResyncQuests() { char *v0; // ecx int v1; // esi @@ -883,7 +883,7 @@ void __cdecl ResyncQuests() // 5CF330: using guessed type int setpc_h; // 5CF334: using guessed type int setpc_w; -void __fastcall PrintQLString(int x, int y, unsigned char cjustflag, char *str, int col) +void PrintQLString(int x, int y, unsigned char cjustflag, char *str, int col) { int v5; // ebx int v6; // edi @@ -957,7 +957,7 @@ void __fastcall PrintQLString(int x, int y, unsigned char cjustflag, char *str, } // 69BE90: using guessed type int qline; -void __cdecl DrawQuestLog() +void DrawQuestLog() { int v0; // edi int i; // esi @@ -974,7 +974,7 @@ void __cdecl DrawQuestLog() } // 69BED4: using guessed type int numqlines; -void __cdecl StartQuestlog() +void StartQuestlog() { signed int v0; // eax int v1; // edx @@ -1007,7 +1007,7 @@ void __cdecl StartQuestlog() // 69BE90: using guessed type int qline; // 69BED4: using guessed type int numqlines; -void __cdecl QuestlogUp() +void QuestlogUp() { if (numqlines) { if (qline == qtopline) { @@ -1023,7 +1023,7 @@ void __cdecl QuestlogUp() // 69BE90: using guessed type int qline; // 69BED4: using guessed type int numqlines; -void __cdecl QuestlogDown() +void QuestlogDown() { if (numqlines) { if (qline == 22) { @@ -1039,7 +1039,7 @@ void __cdecl QuestlogDown() // 69BE90: using guessed type int qline; // 69BED4: using guessed type int numqlines; -void __cdecl QuestlogEnter() +void QuestlogEnter() { PlaySFX(IS_TITLSLCT); if (numqlines && qline != 22) @@ -1050,7 +1050,7 @@ void __cdecl QuestlogEnter() // 69BE90: using guessed type int qline; // 69BED4: using guessed type int numqlines; -void __cdecl QuestlogESC() +void QuestlogESC() { int v0; // esi int i; // edi @@ -1072,7 +1072,7 @@ void __cdecl QuestlogESC() // 69BE90: using guessed type int qline; // 69BED4: using guessed type int numqlines; -void __fastcall SetMultiQuest(int q, int s, int l, int v1) +void SetMultiQuest(int q, int s, int l, int v1) { int v4; // eax unsigned char *v5; // ecx diff --git a/Source/quests.h b/Source/quests.h index d043dae9..24605af2 100644 --- a/Source/quests.h +++ b/Source/quests.h @@ -16,31 +16,31 @@ extern int ReturnLvlT; // idb extern int ALLQUESTS; // idb extern int ReturnLvl; // idb -void __cdecl InitQuests(); -void __cdecl CheckQuests(); -BOOL __cdecl ForceQuests(); -BOOL __fastcall QuestStatus(int i); -void __fastcall CheckQuestKill(int m, BOOL sendmsg); -void __cdecl DrawButcher(); -void __fastcall DrawSkelKing(int q, int x, int y); -void __fastcall DrawWarLord(int x, int y); -void __fastcall DrawSChamber(int q, int x, int y); -void __fastcall DrawLTBanner(int x, int y); -void __fastcall DrawBlind(int x, int y); -void __fastcall DrawBlood(int x, int y); -void __fastcall DRLG_CheckQuests(int x, int y); -void __cdecl SetReturnLvlPos(); -void __cdecl GetReturnLvlPos(); -void __cdecl ResyncMPQuests(); -void __cdecl ResyncQuests(); -void __fastcall PrintQLString(int x, int y, unsigned char cjustflag, char *str, int col); -void __cdecl DrawQuestLog(); -void __cdecl StartQuestlog(); -void __cdecl QuestlogUp(); -void __cdecl QuestlogDown(); -void __cdecl QuestlogEnter(); -void __cdecl QuestlogESC(); -void __fastcall SetMultiQuest(int q, int s, int l, int v1); +void InitQuests(); +void CheckQuests(); +BOOL ForceQuests(); +BOOL QuestStatus(int i); +void CheckQuestKill(int m, BOOL sendmsg); +void DrawButcher(); +void DrawSkelKing(int q, int x, int y); +void DrawWarLord(int x, int y); +void DrawSChamber(int q, int x, int y); +void DrawLTBanner(int x, int y); +void DrawBlind(int x, int y); +void DrawBlood(int x, int y); +void DRLG_CheckQuests(int x, int y); +void SetReturnLvlPos(); +void GetReturnLvlPos(); +void ResyncMPQuests(); +void ResyncQuests(); +void PrintQLString(int x, int y, unsigned char cjustflag, char *str, int col); +void DrawQuestLog(); +void StartQuestlog(); +void QuestlogUp(); +void QuestlogDown(); +void QuestlogEnter(); +void QuestlogESC(); +void SetMultiQuest(int q, int s, int l, int v1); /* rdata */ extern QuestData questlist[MAXQUESTS]; diff --git a/Source/render.cpp b/Source/render.cpp index c019d83d..10328397 100644 --- a/Source/render.cpp +++ b/Source/render.cpp @@ -116,7 +116,7 @@ int WorldTbl17_2[17] = { 0, 32, 60, 88, 112, 136, 156, 176, 192, 208, 220, 232, #if (_MSC_VER >= 800) && (_MSC_VER <= 1200) #include "_render.cpp" #else -void __fastcall drawTopArchesUpperScreen(BYTE *pBuff) +void drawTopArchesUpperScreen(BYTE *pBuff) { unsigned char *dst; // edi MAPDST unsigned char *tbl; // ebx @@ -1142,7 +1142,7 @@ void __fastcall drawTopArchesUpperScreen(BYTE *pBuff) } } -void __fastcall drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask) +void drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask) { unsigned char *dst; // edi MAPDST unsigned char *src; // esi MAPDST @@ -1776,7 +1776,7 @@ void __fastcall drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask) } } -void __fastcall drawUpperScreen(BYTE *pBuff) +void drawUpperScreen(BYTE *pBuff) { unsigned char *dst; // edi MAPDST unsigned char *tbl; // ebx @@ -2396,7 +2396,7 @@ void __fastcall drawUpperScreen(BYTE *pBuff) } } -void __fastcall drawTopArchesLowerScreen(BYTE *pBuff) +void drawTopArchesLowerScreen(BYTE *pBuff) { unsigned char *dst; // edi MAPDST unsigned char *tbl; // ebx @@ -3635,7 +3635,7 @@ LABEL_11: } } -void __fastcall drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask) +void drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask) { unsigned char *dst; // edi MAPDST short cel_type_16; // ax MAPDST @@ -4429,7 +4429,7 @@ void __fastcall drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask) } } -void __fastcall drawLowerScreen(BYTE *pBuff) +void drawLowerScreen(BYTE *pBuff) { unsigned char *dst; // edi MAPDST unsigned char *src; // esi MAPDST @@ -5209,7 +5209,7 @@ void __fastcall drawLowerScreen(BYTE *pBuff) } } -void __fastcall world_draw_black_tile(BYTE *pBuff) +void world_draw_black_tile(BYTE *pBuff) { unsigned char *dst; // edi MAPDST signed int xx_32; // edx diff --git a/Source/render.h b/Source/render.h index 4dd70f55..6c5aec94 100644 --- a/Source/render.h +++ b/Source/render.h @@ -2,13 +2,13 @@ #ifndef __RENDER_H__ #define __RENDER_H__ -void __fastcall drawTopArchesUpperScreen(BYTE *pBuff); -void __fastcall drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask); -void __fastcall drawUpperScreen(BYTE *pBuff); -void __fastcall drawTopArchesLowerScreen(BYTE *pBuff); -void __fastcall drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask); -void __fastcall drawLowerScreen(BYTE *pBuff); -void __fastcall world_draw_black_tile(BYTE *pBuff); +void drawTopArchesUpperScreen(BYTE *pBuff); +void drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask); +void drawUpperScreen(BYTE *pBuff); +void drawTopArchesLowerScreen(BYTE *pBuff); +void drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask); +void drawLowerScreen(BYTE *pBuff); +void world_draw_black_tile(BYTE *pBuff); /* rdata */ diff --git a/Source/restrict.cpp b/Source/restrict.cpp index c3aa5203..380c4b8f 100644 --- a/Source/restrict.cpp +++ b/Source/restrict.cpp @@ -2,7 +2,7 @@ #include "../types.h" -BOOL __cdecl SystemSupported() +BOOL SystemSupported() { OSVERSIONINFO VersionInformation; BOOL ret = FALSE; @@ -17,7 +17,7 @@ BOOL __cdecl SystemSupported() return ret; } -BOOL __cdecl RestrictedTest() +BOOL RestrictedTest() { FILE *f; char Buffer[MAX_PATH]; @@ -36,7 +36,7 @@ BOOL __cdecl RestrictedTest() return ret; } -BOOL __cdecl ReadOnlyTest() +BOOL ReadOnlyTest() { char *c; FILE *f; diff --git a/Source/restrict.h b/Source/restrict.h index 631b12bb..8a87a464 100644 --- a/Source/restrict.h +++ b/Source/restrict.h @@ -2,8 +2,8 @@ #ifndef __RESTRICT_H__ #define __RESTRICT_H__ -BOOL __cdecl SystemSupported(); -BOOL __cdecl RestrictedTest(); -BOOL __cdecl ReadOnlyTest(); +BOOL SystemSupported(); +BOOL RestrictedTest(); +BOOL ReadOnlyTest(); #endif /* __RESTRICT_H__ */ diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index 9cf44cfe..9a891364 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -17,7 +17,7 @@ DDSURFACEDESC DDS_desc; int cel_transparency_active; // weak int level_piece_id; // weak DWORD sgdwCursWdt; -void(__fastcall *DrawPlrProc)(int, int, int, int, int, BYTE *, int, int, int, int); +void(*DrawPlrProc)(int, int, int, int, int, BYTE *, int, int, int, int); BYTE sgSaveBack[8192]; int draw_monster_num; // weak DWORD sgdwCursHgtOld; // idb @@ -61,13 +61,13 @@ char *szPlrModeAssert[12] = { "quitting" }; -void __cdecl ClearCursor() // CODE_FIX: this was supposed to be in cursor.cpp +void ClearCursor() // CODE_FIX: this was supposed to be in cursor.cpp { sgdwCursWdt = 0; sgdwCursWdtOld = 0; } -void __fastcall DrawMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL pre) +void DrawMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL pre) { int i, mx, my, nCel; MissileStruct *m; @@ -128,7 +128,7 @@ void __fastcall DrawMissile(int x, int y, int sx, int sy, int CelSkip, int CelCa } } -void __fastcall DrawClippedMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL pre) +void DrawClippedMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL pre) { int i, mx, my, nCel; MissileStruct *m; @@ -189,7 +189,7 @@ void __fastcall DrawClippedMissile(int x, int y, int sx, int sy, int CelSkip, in } } -void __fastcall DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL clipped) +void DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL clipped) { int i, px, py, nCel; PlayerStruct *p; @@ -225,7 +225,7 @@ void __fastcall DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int Ce } } -void __fastcall DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int l; DWORD *pFrameTable; @@ -301,7 +301,7 @@ void __fastcall DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuf // 5CF31D: using guessed type char setlevel; // 69BEF8: using guessed type int light_table_index; -void __fastcall DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) +void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap) { int l; DWORD *pFrameTable; @@ -376,7 +376,7 @@ void __fastcall DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE * // 4B8CC2: using guessed type char pcursplr; // 69BEF8: using guessed type int light_table_index; -void __fastcall DrawView(int StartX, int StartY) +void DrawView(int StartX, int StartY) { if (zoomflag) DrawGame(StartX, StartY); @@ -433,7 +433,7 @@ void __fastcall DrawView(int StartX, int StartY) // 646D00: using guessed type char qtextflag; // 69BD04: using guessed type int questlog; -void __fastcall DrawGame(int x, int y) +void DrawGame(int x, int y) { int i, sx, sy, chunks, blocks; @@ -543,7 +543,7 @@ void __fastcall DrawGame(int x, int y) // 69CF0C: using guessed type int gpBufEnd; // 69CF20: using guessed type char arch_draw_type; -void __fastcall scrollrt_draw_lower(int x, int y, int sx, int sy, int chunks, int eflag) +void scrollrt_draw_lower(int x, int y, int sx, int sy, int chunks, int eflag) { int i, j; BYTE *dst; @@ -697,7 +697,7 @@ void __fastcall scrollrt_draw_lower(int x, int y, int sx, int sy, int chunks, in // 69CF94: using guessed type int cel_transparency_active; // 69CF98: using guessed type int level_piece_id; -void __fastcall scrollrt_draw_clipped_dungeon(char *pBuff, int sx, int sy, int x, int y, int eflag) +void scrollrt_draw_clipped_dungeon(char *pBuff, int sx, int sy, int x, int y, int eflag) { int v6; // eax char v7; // bl @@ -934,7 +934,7 @@ void __fastcall scrollrt_draw_clipped_dungeon(char *pBuff, int sx, int sy, int x // 69CF94: using guessed type int cel_transparency_active; // 69EFA4: using guessed type int draw_monster_num; -void __fastcall DrawClippedMonster(int x, int y, int mx, int my, int m, int CelSkip, int CelCap) +void DrawClippedMonster(int x, int y, int mx, int my, int m, int CelSkip, int CelCap) { int nCel; char trans; @@ -988,7 +988,7 @@ void __fastcall DrawClippedMonster(int x, int y, int mx, int my, int m, int CelS } // 69BEF8: using guessed type int light_table_index; -void __fastcall DrawClippedObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int CelCap) +void DrawClippedObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int CelCap) { int sx, sy, xx, yy, nCel; char bv; @@ -1039,7 +1039,7 @@ void __fastcall DrawClippedObject(int x, int y, int ox, int oy, BOOL pre, int Ce } // 4B8CC1: using guessed type char pcursobj; -void __fastcall scrollrt_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int a4, int a5) +void scrollrt_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int a4, int a5) { int i, lti_old, cta_old, lpi_old; BYTE *dst; @@ -1092,7 +1092,7 @@ void __fastcall scrollrt_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int a4, // 69CF94: using guessed type int cel_transparency_active; // 69CF98: using guessed type int level_piece_id; -void __fastcall scrollrt_draw_lower_2(int x, int y, int sx, int sy, int chunks, int skipChunks, int eflag) +void scrollrt_draw_lower_2(int x, int y, int sx, int sy, int chunks, int skipChunks, int eflag) { int i, j, CelSkip; BYTE *dst; @@ -1195,7 +1195,7 @@ void __fastcall scrollrt_draw_lower_2(int x, int y, int sx, int sy, int chunks, // 69CF94: using guessed type int cel_transparency_active; // 69CF98: using guessed type int level_piece_id; -void __fastcall scrollrt_draw_clipped_dungeon_2(char *buffer, int x, int y, int skipChunks, int CelSkip, int sx, int sy, int eflag) +void scrollrt_draw_clipped_dungeon_2(char *buffer, int x, int y, int skipChunks, int CelSkip, int sx, int sy, int eflag) { int v8; // eax char v9; // bl @@ -1439,7 +1439,7 @@ void __fastcall scrollrt_draw_clipped_dungeon_2(char *buffer, int x, int y, int // 69CF94: using guessed type int cel_transparency_active; // 69EFA4: using guessed type int draw_monster_num; -void __fastcall scrollrt_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int skipChunks, signed int CelSkip, int sx, int sy) +void scrollrt_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int skipChunks, signed int CelSkip, int sx, int sy) { int lti_old, cta_old, lpi_old; BYTE *dst; @@ -1511,7 +1511,7 @@ void __fastcall scrollrt_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int sk // 69CF94: using guessed type int cel_transparency_active; // 69CF98: using guessed type int level_piece_id; -void __fastcall scrollrt_draw_upper(int x, int y, int sx, int sy, int chunks, int capChunks, int eflag) +void scrollrt_draw_upper(int x, int y, int sx, int sy, int chunks, int capChunks, int eflag) { int i, j, CelCap; BYTE *dst; @@ -1662,7 +1662,7 @@ void __fastcall scrollrt_draw_upper(int x, int y, int sx, int sy, int chunks, in // 69CF94: using guessed type int cel_transparency_active; // 69CF98: using guessed type int level_piece_id; -void __fastcall scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, int CelCap, int dx, int dy, int eflag) +void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, int CelCap, int dx, int dy, int eflag) { int px, py, nCel, nMon, negMon, p; char bFlag, bDead, bObj, bItem, bPlr, bArch, bMap, negPlr, dd; @@ -1869,7 +1869,7 @@ void __fastcall scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks // 69CF94: using guessed type int cel_transparency_active; // 69EFA4: using guessed type int draw_monster_num; -void __fastcall DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, int CelCap) +void DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, int CelCap) { int nCel; char trans; @@ -1923,7 +1923,7 @@ void __fastcall DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, in } // 69BEF8: using guessed type int light_table_index; -void __fastcall DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int CelCap) +void DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int CelCap) { int sx, sy, xx, yy, nCel; char bv; @@ -1977,7 +1977,7 @@ void __fastcall DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, } // 4B8CC1: using guessed type char pcursobj; -void __fastcall scrollrt_draw_e_flag(BYTE *pBuff, int x, int y, int capChunks, int CelCap, int sx, int sy) +void scrollrt_draw_e_flag(BYTE *pBuff, int x, int y, int capChunks, int CelCap, int sx, int sy) { int i, lti_old, cta_old, lpi_old; BYTE *dst; @@ -2031,7 +2031,7 @@ void __fastcall scrollrt_draw_e_flag(BYTE *pBuff, int x, int y, int capChunks, i // 69CF94: using guessed type int cel_transparency_active; // 69CF98: using guessed type int level_piece_id; -void __fastcall DrawZoom(int x, int y) +void DrawZoom(int x, int y) { int i, sx, sy, chunks, blocks; int wdt, nSrcOff, nDstOff; @@ -2196,7 +2196,7 @@ void __fastcall DrawZoom(int x, int y) // 69CF0C: using guessed type int gpBufEnd; // 69CF20: using guessed type char arch_draw_type; -void __cdecl ClearScreenBuffer() +void ClearScreenBuffer() { j_lock_buf_priv(3); @@ -2230,7 +2230,7 @@ void __cdecl ClearScreenBuffer() } #ifdef _DEBUG -void __cdecl ScrollView() +void ScrollView() { BOOL scroll; @@ -2308,14 +2308,14 @@ void __cdecl ScrollView() ScrollInfo._sdir = SDIR_NONE; } -void __cdecl EnableFrameCount() +void EnableFrameCount() { frameflag = frameflag == 0; framestart = GetTickCount(); } #endif -void __fastcall scrollrt_draw_game_screen(BOOL draw_cursor) +void scrollrt_draw_game_screen(BOOL draw_cursor) { int hgt; @@ -2342,7 +2342,7 @@ void __fastcall scrollrt_draw_game_screen(BOOL draw_cursor) } // 52571C: using guessed type int drawpanflag; -void __cdecl scrollrt_draw_cursor_back_buffer() +void scrollrt_draw_cursor_back_buffer() { int i; BYTE *src, *dst; @@ -2366,7 +2366,7 @@ void __cdecl scrollrt_draw_cursor_back_buffer() sgdwCursWdt = 0; } -void __cdecl scrollrt_draw_cursor_item() +void scrollrt_draw_cursor_item() { int i, mx, my, col; BYTE *src, *dst; @@ -2442,7 +2442,7 @@ void __cdecl scrollrt_draw_cursor_item() // 4B8C9C: using guessed type int cursH; // 69CF0C: using guessed type int gpBufEnd; -void __fastcall DrawMain(int dwHgt, int draw_desc, int draw_hp, int draw_mana, int draw_sbar, int draw_btn) +void DrawMain(int dwHgt, int draw_desc, int draw_hp, int draw_mana, int draw_sbar, int draw_btn) { int ysize; DWORD dwTicks; @@ -2564,7 +2564,7 @@ void __fastcall DrawMain(int dwHgt, int draw_desc, int draw_hp, int draw_mana, i // 679660: using guessed type char gbMaxPlayers; #ifdef _DEBUG -void __cdecl DrawFPS() +void DrawFPS() { DWORD v0; // eax int v1; // esi @@ -2598,7 +2598,7 @@ void __cdecl DrawFPS() } #endif -void __fastcall DoBlitScreen(DWORD dwX, DWORD dwY, DWORD dwWdt, DWORD dwHgt) +void DoBlitScreen(DWORD dwX, DWORD dwY, DWORD dwWdt, DWORD dwHgt) { int nSrcOff, nDstOff, nSrcWdt, nDstWdt; DWORD dwTicks; @@ -2687,7 +2687,7 @@ void __fastcall DoBlitScreen(DWORD dwX, DWORD dwY, DWORD dwWdt, DWORD dwHgt) } } -void __cdecl DrawAndBlit() +void DrawAndBlit() { BOOLEAN ddsdesc; // ebp BOOLEAN ctrlPan; // esi diff --git a/Source/scrollrt.h b/Source/scrollrt.h index 17d3ba8a..67d30976 100644 --- a/Source/scrollrt.h +++ b/Source/scrollrt.h @@ -10,45 +10,45 @@ extern char arch_draw_type; // weak extern DDSURFACEDESC DDS_desc; extern int cel_transparency_active; // weak extern int level_piece_id; // weak -extern void (__fastcall *DrawPlrProc)(int, int, int, int, int, BYTE *, int, int, int, int); +extern void (*DrawPlrProc)(int, int, int, int, int, BYTE *, int, int, int, int); extern int draw_monster_num; // weak -void __cdecl ClearCursor(); -void __fastcall DrawMissile(int x, int y, int sx, int sy, int CelSkip, int capChunks, BOOL pre); -void __fastcall DrawClippedMissile(int x, int y, int sx, int sy, int CelSkip, int capChunks, BOOL pre); -void __fastcall DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int capChunks, BOOL clipped); -void __fastcall DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int capChunks); -void __fastcall DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int capChunks); -void __fastcall DrawView(int StartX, int StartY); -void __fastcall DrawGame(int x, int y); -void __fastcall scrollrt_draw_lower(int x, int y, int sx, int sy, int chunks, int eflag); -void __fastcall scrollrt_draw_clipped_dungeon(char *pBuff, int sx, int sy, int x, int y, int eflag); -void __fastcall DrawClippedMonster(int x, int y, int mx, int my, int m, int CelSkip, int capChunks); -void __fastcall DrawClippedObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int capChunks); -void __fastcall scrollrt_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy); -void __fastcall scrollrt_draw_lower_2(int x, int y, int sx, int sy, int chunks, int skipChunks, int eflag); -void __fastcall scrollrt_draw_clipped_dungeon_2(char *buffer, int x, int y, int skipChunks, int CelSkip, int sx, int sy, int eflag); -void __fastcall scrollrt_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int skipChunks, signed int CelSkip, int sx, int sy); -void __fastcall scrollrt_draw_upper(int x, int y, int sx, int sy, int chunks, int capChunks, int eflag); -void __fastcall scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, int CelCap, int dx, int dy, int eflag); -void __fastcall DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, int CelCap); -void __fastcall DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int capChunks); -void __fastcall scrollrt_draw_e_flag(BYTE *pBuff, int x, int y, int capChunks, int CelCap, int sx, int sy); -void __fastcall DrawZoom(int x, int y); -void __cdecl ClearScreenBuffer(); +void ClearCursor(); +void DrawMissile(int x, int y, int sx, int sy, int CelSkip, int capChunks, BOOL pre); +void DrawClippedMissile(int x, int y, int sx, int sy, int CelSkip, int capChunks, BOOL pre); +void DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int capChunks, BOOL clipped); +void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int capChunks); +void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int capChunks); +void DrawView(int StartX, int StartY); +void DrawGame(int x, int y); +void scrollrt_draw_lower(int x, int y, int sx, int sy, int chunks, int eflag); +void scrollrt_draw_clipped_dungeon(char *pBuff, int sx, int sy, int x, int y, int eflag); +void DrawClippedMonster(int x, int y, int mx, int my, int m, int CelSkip, int capChunks); +void DrawClippedObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int capChunks); +void scrollrt_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy); +void scrollrt_draw_lower_2(int x, int y, int sx, int sy, int chunks, int skipChunks, int eflag); +void scrollrt_draw_clipped_dungeon_2(char *buffer, int x, int y, int skipChunks, int CelSkip, int sx, int sy, int eflag); +void scrollrt_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int skipChunks, signed int CelSkip, int sx, int sy); +void scrollrt_draw_upper(int x, int y, int sx, int sy, int chunks, int capChunks, int eflag); +void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, int CelCap, int dx, int dy, int eflag); +void DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, int CelCap); +void DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int capChunks); +void scrollrt_draw_e_flag(BYTE *pBuff, int x, int y, int capChunks, int CelCap, int sx, int sy); +void DrawZoom(int x, int y); +void ClearScreenBuffer(); #ifdef _DEBUG -void __cdecl ScrollView(); -void __cdecl EnableFrameCount(); +void ScrollView(); +void EnableFrameCount(); #endif -void __fastcall scrollrt_draw_game_screen(BOOL draw_cursor); -void __cdecl scrollrt_draw_cursor_back_buffer(); -void __cdecl scrollrt_draw_cursor_item(); -void __fastcall DrawMain(int dwHgt, int draw_desc, int draw_hp, int draw_mana, int draw_sbar, int draw_btn); +void scrollrt_draw_game_screen(BOOL draw_cursor); +void scrollrt_draw_cursor_back_buffer(); +void scrollrt_draw_cursor_item(); +void DrawMain(int dwHgt, int draw_desc, int draw_hp, int draw_mana, int draw_sbar, int draw_btn); #ifdef _DEBUG -void __cdecl DrawFPS(); +void DrawFPS(); #endif -void __fastcall DoBlitScreen(DWORD dwX, DWORD dwY, DWORD dwWdt, DWORD dwHgt); -void __cdecl DrawAndBlit(); +void DoBlitScreen(DWORD dwX, DWORD dwY, DWORD dwWdt, DWORD dwHgt); +void DrawAndBlit(); /* rdata */ diff --git a/Source/setmaps.cpp b/Source/setmaps.cpp index e90582d7..3e195f6e 100644 --- a/Source/setmaps.cpp +++ b/Source/setmaps.cpp @@ -65,7 +65,7 @@ char *quest_level_names[] = { "Archbishop Lazarus' Lair" }; -int __fastcall ObjIndex(int x, int y) +int ObjIndex(int x, int y) { int i; int oi; @@ -79,7 +79,7 @@ int __fastcall ObjIndex(int x, int y) return -1; } -void __cdecl AddSKingObjs() +void AddSKingObjs() { SetObjMapRange(ObjIndex(64, 34), 20, 7, 23, 10, 1); SetObjMapRange(ObjIndex(64, 59), 20, 14, 21, 16, 2); @@ -89,20 +89,20 @@ void __cdecl AddSKingObjs() SetObjMapRange(ObjIndex(27, 53), 8, 1, 15, 11, 3); } -void __cdecl AddSChamObjs() +void AddSChamObjs() { SetObjMapRange(ObjIndex(37, 30), 17, 0, 21, 5, 1); SetObjMapRange(ObjIndex(37, 46), 13, 0, 16, 5, 2); } -void __cdecl AddVileObjs() +void AddVileObjs() { SetObjMapRange(ObjIndex(26, 45), 1, 1, 9, 10, 1); SetObjMapRange(ObjIndex(45, 46), 11, 1, 20, 10, 2); SetObjMapRange(ObjIndex(35, 36), 7, 11, 13, 18, 3); } -void __fastcall DRLG_SetMapTrans(char *sFileName) +void DRLG_SetMapTrans(char *sFileName) { int x, y; int i, j; @@ -129,7 +129,7 @@ void __fastcall DRLG_SetMapTrans(char *sFileName) mem_free_dbg(pLevelMap); } -void __cdecl LoadSetMap() +void LoadSetMap() { switch (setlvlnum) { case SL_SKELKING: diff --git a/Source/setmaps.h b/Source/setmaps.h index 4feebe38..8b86f304 100644 --- a/Source/setmaps.h +++ b/Source/setmaps.h @@ -2,12 +2,12 @@ #ifndef __SETMAPS_H__ #define __SETMAPS_H__ -int __fastcall ObjIndex(int x, int y); -void __cdecl AddSKingObjs(); -void __cdecl AddSChamObjs(); -void __cdecl AddVileObjs(); -void __fastcall DRLG_SetMapTrans(char *sFileName); -void __cdecl LoadSetMap(); +int ObjIndex(int x, int y); +void AddSKingObjs(); +void AddSChamObjs(); +void AddVileObjs(); +void DRLG_SetMapTrans(char *sFileName); +void LoadSetMap(); /* rdata */ extern unsigned char SkelKingTrans1[8]; diff --git a/Source/sha.cpp b/Source/sha.cpp index edcf595b..c7ef540a 100644 --- a/Source/sha.cpp +++ b/Source/sha.cpp @@ -4,12 +4,12 @@ SHA1Context sgSHA1[3]; -void __cdecl SHA1Clear() +void SHA1Clear() { memset(sgSHA1, 0, sizeof(sgSHA1)); } -void __fastcall SHA1Result(int n, char Message_Digest[SHA1HashSize]) +void SHA1Result(int n, char Message_Digest[SHA1HashSize]) { DWORD *Message_Digest_Block; int i; @@ -23,14 +23,14 @@ void __fastcall SHA1Result(int n, char Message_Digest[SHA1HashSize]) } } -void __fastcall SHA1Calculate(int n, const char *data, char Message_Digest[SHA1HashSize]) +void SHA1Calculate(int n, const char *data, char Message_Digest[SHA1HashSize]) { SHA1Input(&sgSHA1[n], data, 64); if (Message_Digest) SHA1Result(n, Message_Digest); } -void __fastcall SHA1Input(SHA1Context *context, const char *message_array, int len) +void SHA1Input(SHA1Context *context, const char *message_array, int len) { int i, count; @@ -48,7 +48,7 @@ void __fastcall SHA1Input(SHA1Context *context, const char *message_array, int l } } -void __fastcall SHA1ProcessMessageBlock(SHA1Context *context) +void SHA1ProcessMessageBlock(SHA1Context *context) { int i; int temp; @@ -112,12 +112,12 @@ void __fastcall SHA1ProcessMessageBlock(SHA1Context *context) context->state[4] += E; } -void __fastcall SHA1Reset(int n) +void SHA1Reset(int n) { SHA1Init(&sgSHA1[n]); } -void __fastcall SHA1Init(SHA1Context *context) +void SHA1Init(SHA1Context *context) { context->count[0] = 0; context->count[1] = 0; diff --git a/Source/sha.h b/Source/sha.h index 0b62c8fa..e4902e1e 100644 --- a/Source/sha.h +++ b/Source/sha.h @@ -11,12 +11,12 @@ //sha -void __cdecl SHA1Clear(); -void __fastcall SHA1Result(int n, char Message_Digest[SHA1HashSize]); -void __fastcall SHA1Calculate(int n, const char *data, char Message_Digest[SHA1HashSize]); -void __fastcall SHA1Input(SHA1Context *context, const char *message_array, int len); -void __fastcall SHA1ProcessMessageBlock(SHA1Context *context); -void __fastcall SHA1Reset(int n); -void __fastcall SHA1Init(SHA1Context *context); +void SHA1Clear(); +void SHA1Result(int n, char Message_Digest[SHA1HashSize]); +void SHA1Calculate(int n, const char *data, char Message_Digest[SHA1HashSize]); +void SHA1Input(SHA1Context *context, const char *message_array, int len); +void SHA1ProcessMessageBlock(SHA1Context *context); +void SHA1Reset(int n); +void SHA1Init(SHA1Context *context); #endif /* __SHA_H__ */ diff --git a/Source/sound.cpp b/Source/sound.cpp index c4e62042..524dfb4e 100644 --- a/Source/sound.cpp +++ b/Source/sound.cpp @@ -32,7 +32,7 @@ char unk_volume[4][2] = { { 30, -31 } }; -void __fastcall snd_update(BOOL bStopAll) +void snd_update(BOOL bStopAll) { DWORD dwStatus, i; @@ -58,7 +58,7 @@ void __fastcall snd_update(BOOL bStopAll) } } -void __fastcall snd_stop_snd(TSnd *pSnd) +void snd_stop_snd(TSnd *pSnd) { if (pSnd && pSnd->DSB) #ifdef __cplusplus @@ -68,7 +68,7 @@ void __fastcall snd_stop_snd(TSnd *pSnd) #endif } -BOOL __fastcall snd_playing(TSnd *pSnd) +BOOL snd_playing(TSnd *pSnd) { DWORD dwStatus; @@ -88,7 +88,7 @@ BOOL __fastcall snd_playing(TSnd *pSnd) return dwStatus == DSBSTATUS_PLAYING; } -void __fastcall snd_play_snd(TSnd *pSnd, int lVolume, int lPan) +void snd_play_snd(TSnd *pSnd, int lVolume, int lPan) { LPDIRECTSOUNDBUFFER DSB; DWORD tc; @@ -149,7 +149,7 @@ void __fastcall snd_play_snd(TSnd *pSnd, int lVolume, int lPan) pSnd->start_tc = tc; } -LPDIRECTSOUNDBUFFER __fastcall sound_dup_channel(LPDIRECTSOUNDBUFFER DSB) +LPDIRECTSOUNDBUFFER sound_dup_channel(LPDIRECTSOUNDBUFFER DSB) { DWORD i; @@ -174,7 +174,7 @@ LPDIRECTSOUNDBUFFER __fastcall sound_dup_channel(LPDIRECTSOUNDBUFFER DSB) return NULL; } -BOOL __fastcall sound_file_reload(TSnd *sound_file, LPDIRECTSOUNDBUFFER DSB) +BOOL sound_file_reload(TSnd *sound_file, LPDIRECTSOUNDBUFFER DSB) { HANDLE file; LPVOID buf1, buf2; @@ -212,7 +212,7 @@ BOOL __fastcall sound_file_reload(TSnd *sound_file, LPDIRECTSOUNDBUFFER DSB) return rv; } -TSnd *__fastcall sound_file_load(char *path) +TSnd *sound_file_load(char *path) { HANDLE file; BYTE *wave_file; @@ -261,7 +261,7 @@ TSnd *__fastcall sound_file_load(char *path) } // 456F07: could not find valid save-restore pair for esi -void __fastcall sound_CreateSoundBuffer(TSnd *sound_file) +void sound_CreateSoundBuffer(TSnd *sound_file) { DSBUFFERDESC DSB; HRESULT error_code; @@ -281,7 +281,7 @@ void __fastcall sound_CreateSoundBuffer(TSnd *sound_file) DSErrMsg(error_code, 282, "C:\\Src\\Diablo\\Source\\SOUND.CPP"); } -void __fastcall sound_file_cleanup(TSnd *sound_file) +void sound_file_cleanup(TSnd *sound_file) { if (sound_file) { if (sound_file->DSB) { @@ -299,7 +299,7 @@ void __fastcall sound_file_cleanup(TSnd *sound_file) } } -void __fastcall snd_init(HWND hWnd) +void snd_init(HWND hWnd) { sound_load_volume("Sound Volume", &sglSoundVolume); gbSoundOn = sglSoundVolume > VOLUME_MIN; @@ -323,7 +323,7 @@ void __fastcall snd_init(HWND hWnd) gbSndInited = sglpDS != NULL; } -void __fastcall sound_load_volume(char *value_name, int *value) +void sound_load_volume(char *value_name, int *value) { int v = *value; if (!SRegLoadValue("Diablo", value_name, 0, &v)) { @@ -339,7 +339,7 @@ void __fastcall sound_load_volume(char *value_name, int *value) *value -= *value % 100; } -void __fastcall sound_create_primary_buffer(HANDLE music_track) +void sound_create_primary_buffer(HANDLE music_track) { HRESULT error_code; DSBUFFERDESC dsbuf; @@ -392,7 +392,7 @@ void __fastcall sound_create_primary_buffer(HANDLE music_track) } // 69F100: using guessed type int sglpDSB; -HRESULT __fastcall sound_DirectSoundCreate(LPGUID lpGuid, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter) +HRESULT sound_DirectSoundCreate(LPGUID lpGuid, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter) { HRESULT(WINAPI * DirectSoundCreate) (LPGUID lpGuid, LPDIRECTSOUND * ppDS, LPUNKNOWN pUnkOuter); @@ -411,7 +411,7 @@ HRESULT __fastcall sound_DirectSoundCreate(LPGUID lpGuid, LPDIRECTSOUND *ppDS, L return DirectSoundCreate(lpGuid, ppDS, pUnkOuter); } -void __cdecl sound_cleanup() +void sound_cleanup() { snd_update(TRUE); SVidDestroy(); @@ -433,12 +433,12 @@ void __cdecl sound_cleanup() } } -void __fastcall sound_store_volume(char *key, int value) +void sound_store_volume(char *key, int value) { SRegSaveValue("Diablo", key, 0, value); } -void __cdecl music_stop() +void music_stop() { if (sgpMusicTrack) { SFileDdaEnd(sgpMusicTrack); @@ -448,7 +448,7 @@ void __cdecl music_stop() } } -void __fastcall music_start(int nTrack) +void music_start(int nTrack) { BOOL success; @@ -472,7 +472,7 @@ void __fastcall music_start(int nTrack) } } -void __fastcall sound_disable_music(BOOL disable) +void sound_disable_music(BOOL disable) { if (disable) { music_stop(); @@ -481,7 +481,7 @@ void __fastcall sound_disable_music(BOOL disable) } } -int __fastcall sound_get_or_set_music_volume(int volume) +int sound_get_or_set_music_volume(int volume) { if (volume == 1) return sglMusicVolume; @@ -494,7 +494,7 @@ int __fastcall sound_get_or_set_music_volume(int volume) return sglMusicVolume; } -int __fastcall sound_get_or_set_sound_volume(int volume) +int sound_get_or_set_sound_volume(int volume) { if (volume == 1) return sglSoundVolume; diff --git a/Source/sound.h b/Source/sound.h index ffc0439f..831001b8 100644 --- a/Source/sound.h +++ b/Source/sound.h @@ -6,26 +6,26 @@ extern IDirectSoundBuffer *DSBs[8]; extern BOOLEAN gbSndInited; extern HMODULE hDsound_dll; -void __fastcall snd_update(BOOL bStopAll); -void __fastcall snd_stop_snd(TSnd *pSnd); -BOOL __fastcall snd_playing(TSnd *pSnd); -void __fastcall snd_play_snd(TSnd *pSnd, int lVolume, int lPan); -IDirectSoundBuffer *__fastcall sound_dup_channel(IDirectSoundBuffer *DSB); -BOOL __fastcall sound_file_reload(TSnd *sound_file, IDirectSoundBuffer *DSB); -TSnd *__fastcall sound_file_load(char *path); -void __fastcall sound_CreateSoundBuffer(TSnd *sound_file); -void __fastcall sound_file_cleanup(TSnd *sound_file); -void __fastcall snd_init(HWND hWnd); -void __fastcall sound_load_volume(char *value_name, int *value); -void __fastcall sound_create_primary_buffer(HANDLE music_track); -HRESULT __fastcall sound_DirectSoundCreate(LPGUID lpGuid, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter); -void __cdecl sound_cleanup(); -void __fastcall sound_store_volume(char *key, int value); -void __cdecl music_stop(); -void __fastcall music_start(int nTrack); -void __fastcall sound_disable_music(BOOL disable); -int __fastcall sound_get_or_set_music_volume(int volume); -int __fastcall sound_get_or_set_sound_volume(int volume); +void snd_update(BOOL bStopAll); +void snd_stop_snd(TSnd *pSnd); +BOOL snd_playing(TSnd *pSnd); +void snd_play_snd(TSnd *pSnd, int lVolume, int lPan); +IDirectSoundBuffer *sound_dup_channel(IDirectSoundBuffer *DSB); +BOOL sound_file_reload(TSnd *sound_file, IDirectSoundBuffer *DSB); +TSnd *sound_file_load(char *path); +void sound_CreateSoundBuffer(TSnd *sound_file); +void sound_file_cleanup(TSnd *sound_file); +void snd_init(HWND hWnd); +void sound_load_volume(char *value_name, int *value); +void sound_create_primary_buffer(HANDLE music_track); +HRESULT sound_DirectSoundCreate(LPGUID lpGuid, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter); +void sound_cleanup(); +void sound_store_volume(char *key, int value); +void music_stop(); +void music_start(int nTrack); +void sound_disable_music(BOOL disable); +int sound_get_or_set_music_volume(int volume); +int sound_get_or_set_sound_volume(int volume); /* rdata */ diff --git a/Source/spells.cpp b/Source/spells.cpp index 50543713..cc1b8ce9 100644 --- a/Source/spells.cpp +++ b/Source/spells.cpp @@ -45,7 +45,7 @@ SpellData spelldata[MAX_SPELLS] = { // clang-format on }; -int __fastcall GetManaAmount(int id, int sn) +int GetManaAmount(int id, int sn) { int i; // "raw" mana cost int ma; // mana amount @@ -97,7 +97,7 @@ int __fastcall GetManaAmount(int id, int sn) return ma * (100 - plr[id]._pISplCost) / 100; } -void __fastcall UseMana(int id, int sn) +void UseMana(int id, int sn) { int ma; // mana cost @@ -125,7 +125,7 @@ void __fastcall UseMana(int id, int sn) } } -BOOL __fastcall CheckSpell(int id, int sn, BYTE st, BOOL manaonly) +BOOL CheckSpell(int id, int sn, BYTE st, BOOL manaonly) { BOOL result; @@ -150,7 +150,7 @@ BOOL __fastcall CheckSpell(int id, int sn, BYTE st, BOOL manaonly) return result; } -void __fastcall CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL caster, int spllvl) +void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL caster, int spllvl) { int i; int dir; // missile direction @@ -190,7 +190,7 @@ void __fastcall CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL // pnum: player index // rid: target player index -void __fastcall DoResurrect(int pnum, int rid) +void DoResurrect(int pnum, int rid) { int hp; @@ -235,7 +235,7 @@ void __fastcall DoResurrect(int pnum, int rid) } } -void __fastcall PlacePlayer(int pnum) +void PlacePlayer(int pnum) { int nx, ny, max, min, x, y; DWORD i; @@ -281,7 +281,7 @@ void __fastcall PlacePlayer(int pnum) } } -void __fastcall DoHealOther(int pnum, int rid) +void DoHealOther(int pnum, int rid) { int i, j, hp; diff --git a/Source/spells.h b/Source/spells.h index 3e23547b..b264550d 100644 --- a/Source/spells.h +++ b/Source/spells.h @@ -2,13 +2,13 @@ #ifndef __SPELLS_H__ #define __SPELLS_H__ -int __fastcall GetManaAmount(int id, int sn); -void __fastcall UseMana(int id, int sn); -BOOL __fastcall CheckSpell(int id, int sn, BYTE st, BOOL manaonly); -void __fastcall CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL caster, int spllvl); -void __fastcall DoResurrect(int pnum, int rid); -void __fastcall PlacePlayer(int pnum); -void __fastcall DoHealOther(int pnum, int rid); +int GetManaAmount(int id, int sn); +void UseMana(int id, int sn); +BOOL CheckSpell(int id, int sn, BYTE st, BOOL manaonly); +void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL caster, int spllvl); +void DoResurrect(int pnum, int rid); +void PlacePlayer(int pnum); +void DoHealOther(int pnum, int rid); /* rdata */ diff --git a/Source/stores.cpp b/Source/stores.cpp index fa69eab7..d1f03f6f 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -74,7 +74,7 @@ char *talkname[9] = { "Wirt" }; -void __cdecl InitStores() +void InitStores() { int i; // eax @@ -101,7 +101,7 @@ void __cdecl InitStores() // 6A8A3C: using guessed type int boylevel; // 6AA705: using guessed type char stextflag; -void __cdecl SetupTownStores() +void SetupTownStores() { int i; // eax int l; // esi @@ -130,7 +130,7 @@ void __cdecl SetupTownStores() } // 679660: using guessed type char gbMaxPlayers; -void __cdecl FreeStoreMem() +void FreeStoreMem() { void *p; @@ -145,7 +145,7 @@ void __cdecl FreeStoreMem() mem_free_dbg(p); } -void __cdecl DrawSTextBack() +void DrawSTextBack() { CelDecodeOnly(408, 487, (BYTE *)pSTextBoxCels, 1, 271); @@ -156,7 +156,7 @@ void __cdecl DrawSTextBack() #include "asm_trans_rect.inc" } -void __fastcall PrintSString(int x, int y, unsigned char cjustflag, char *str, int col, int val) +void PrintSString(int x, int y, unsigned char cjustflag, char *str, int col, int val) { int v6; // edi int v7; // eax @@ -255,7 +255,7 @@ void __fastcall PrintSString(int x, int y, unsigned char cjustflag, char *str, i // 6A8A28: using guessed type int stextsel; // 457BD6: using guessed type char valstr[32]; -void __fastcall DrawSLine(int y) +void DrawSLine(int y) { int xy, yy, width, line; @@ -303,7 +303,7 @@ void __fastcall DrawSLine(int y) } // 6A09E0: using guessed type char stextsize; -void __fastcall DrawSArrows(int y1, int y2) +void DrawSArrows(int y1, int y2) { int *v2; // ebp int v3; // ebx @@ -346,7 +346,7 @@ void __fastcall DrawSArrows(int y1, int y2) // 6A8A2C: using guessed type char stextscrldbtn; // 6AA704: using guessed type char stextscrlubtn; -void __cdecl DrawSTextHelp() +void DrawSTextHelp() { stextsel = -1; stextsize = 1; @@ -354,7 +354,7 @@ void __cdecl DrawSTextHelp() // 6A09E0: using guessed type char stextsize; // 6A8A28: using guessed type int stextsel; -void __fastcall ClearSText(int s, int e) +void ClearSText(int s, int e) { int i; @@ -370,7 +370,7 @@ void __fastcall ClearSText(int s, int e) } } -void __fastcall AddSLine(int y) +void AddSLine(int y) { stext[y]._sx = 0; stext[y]._syoff = 0; @@ -378,17 +378,17 @@ void __fastcall AddSLine(int y) stext[y]._sline = 1; } -void __fastcall AddSTextVal(int y, int val) +void AddSTextVal(int y, int val) { stext[y]._sval = val; } -void __fastcall OffsetSTextY(int y, int yo) +void OffsetSTextY(int y, int yo) { stext[y]._syoff = yo; } -void __fastcall AddSText(int x, int y, int j, char *str, char clr, int sel) +void AddSText(int x, int y, int j, char *str, char clr, int sel) { stext[y]._sx = x; stext[y]._syoff = 0; @@ -399,7 +399,7 @@ void __fastcall AddSText(int x, int y, int j, char *str, char clr, int sel) stext[y]._ssel = sel; } -void __cdecl StoreAutoPlace() +void StoreAutoPlace() { int v0; // edi int v1; // eax @@ -556,7 +556,7 @@ void __cdecl StoreAutoPlace() } // 48E9A8: using guessed type int AP2x2Tbl[10]; -void __cdecl S_StartSmith() +void S_StartSmith() { stextsize = 0; stextscrl = 0; @@ -576,7 +576,7 @@ void __cdecl S_StartSmith() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __fastcall S_ScrollSBuy(int idx) +void S_ScrollSBuy(int idx) { int y; char clr; @@ -615,7 +615,7 @@ void __fastcall S_ScrollSBuy(int idx) // 6A8A28: using guessed type int stextsel; // 6AA700: using guessed type int stextdown; -void __fastcall PrintStoreItem(ItemStruct *x, int l, char iclr) +void PrintStoreItem(ItemStruct *x, int l, char iclr) { ItemStruct *v3; // esi char v5; // cl @@ -692,7 +692,7 @@ void __fastcall PrintStoreItem(ItemStruct *x, int l, char iclr) } } -void __cdecl S_StartSBuy() +void S_StartSBuy() { int i; @@ -718,7 +718,7 @@ void __cdecl S_StartSBuy() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -void __fastcall S_ScrollSPBuy(int idx) +void S_ScrollSPBuy(int idx) { int v1; // esi int v2; // edi @@ -770,7 +770,7 @@ void __fastcall S_ScrollSPBuy(int idx) // 6A8A28: using guessed type int stextsel; // 6AA700: using guessed type int stextdown; -BOOL __cdecl S_StartSPBuy() +BOOL S_StartSPBuy() { int i; @@ -811,7 +811,7 @@ BOOL __cdecl S_StartSPBuy() // 6A6BB8: using guessed type int stextscrl; // 6A8A28: using guessed type int stextsel; -BOOL __fastcall SmithSellOk(int i) +BOOL SmithSellOk(int i) { if (plr[myplr].InvList[i]._itype == ITYPE_NONE) return FALSE; @@ -829,7 +829,7 @@ BOOL __fastcall SmithSellOk(int i) return TRUE; } -void __fastcall S_ScrollSSell(int idx) +void S_ScrollSSell(int idx) { char clr; int y; @@ -867,7 +867,7 @@ void __fastcall S_ScrollSSell(int idx) // 6A09E4: using guessed type int stextsmax; // 6AA700: using guessed type int stextdown; -void __cdecl S_StartSSell() +void S_StartSSell() { int i; // eax BOOLEAN sellok; // [esp+14h] [ebp-4h] @@ -921,7 +921,7 @@ void __cdecl S_StartSSell() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -BOOL __fastcall SmithRepairOk(int i) +BOOL SmithRepairOk(int i) { if (plr[myplr].InvList[i]._itype == ITYPE_NONE) return FALSE; @@ -937,7 +937,7 @@ BOOL __fastcall SmithRepairOk(int i) return TRUE; } -void __cdecl S_StartSRepair() +void S_StartSRepair() { int v0; // ebp int *v1; // eax @@ -1030,7 +1030,7 @@ void __cdecl S_StartSRepair() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -void __fastcall AddStoreHoldRepair(ItemStruct *itm, int i) +void AddStoreHoldRepair(ItemStruct *itm, int i) { int v2; // ebx ItemStruct *v3; // ebp @@ -1056,7 +1056,7 @@ void __fastcall AddStoreHoldRepair(ItemStruct *itm, int i) } // 69F10C: using guessed type int storenumh; -void __cdecl S_StartWitch() +void S_StartWitch() { stextsize = 0; stextscrl = 0; @@ -1074,7 +1074,7 @@ void __cdecl S_StartWitch() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __fastcall S_ScrollWBuy(int idx) +void S_ScrollWBuy(int idx) { int v1; // esi int v2; // edi @@ -1112,7 +1112,7 @@ void __fastcall S_ScrollWBuy(int idx) // 6A8A28: using guessed type int stextsel; // 6AA700: using guessed type int stextdown; -void __cdecl S_StartWBuy() +void S_StartWBuy() { int v0; // ST10_4 int v1; // eax @@ -1149,7 +1149,7 @@ void __cdecl S_StartWBuy() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -BOOLEAN __fastcall WitchSellOk(int i) +BOOLEAN WitchSellOk(int i) { BOOLEAN rv; // al ItemStruct *pI; // edx @@ -1172,7 +1172,7 @@ BOOLEAN __fastcall WitchSellOk(int i) return rv; } -void __cdecl S_StartWSell() +void S_StartWSell() { int i; // eax BOOLEAN sellok; // [esp+18h] [ebp-8h] @@ -1241,7 +1241,7 @@ void __cdecl S_StartWSell() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -BOOLEAN __fastcall WitchRechargeOk(int i) +BOOLEAN WitchRechargeOk(int i) { BOOLEAN rv; // al @@ -1253,7 +1253,7 @@ BOOLEAN __fastcall WitchRechargeOk(int i) return rv; } -void __fastcall AddStoreHoldRecharge(ItemStruct itm, int i) +void AddStoreHoldRecharge(ItemStruct itm, int i) { int v2; // ebx int v3; // eax @@ -1281,7 +1281,7 @@ void __fastcall AddStoreHoldRecharge(ItemStruct itm, int i) // 69F108: using guessed type int stextup; // 69F10C: using guessed type int storenumh; -void __cdecl S_StartWRecharge() +void S_StartWRecharge() { int *v0; // eax int v1; // ebp @@ -1348,7 +1348,7 @@ void __cdecl S_StartWRecharge() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartNoMoney() +void S_StartNoMoney() { StartStore((unsigned char)stextshold); stextscrl = 0; @@ -1359,7 +1359,7 @@ void __cdecl S_StartNoMoney() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartNoRoom() +void S_StartNoRoom() { StartStore((unsigned char)stextshold); stextscrl = 0; @@ -1368,7 +1368,7 @@ void __cdecl S_StartNoRoom() } // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartConfirm() +void S_StartConfirm() { BOOL idprint; // esi char iclr; // [esp+Ch] [ebp-4h] @@ -1447,7 +1447,7 @@ LABEL_37: } // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartBoy() +void S_StartBoy() { stextsize = 0; stextscrl = 0; @@ -1468,7 +1468,7 @@ void __cdecl S_StartBoy() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartBBoy() +void S_StartBBoy() { int iclr; // esi @@ -1497,7 +1497,7 @@ void __cdecl S_StartBBoy() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartHealer() +void S_StartHealer() { stextsize = 0; stextscrl = 0; @@ -1515,7 +1515,7 @@ void __cdecl S_StartHealer() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __fastcall S_ScrollHBuy(int idx) +void S_ScrollHBuy(int idx) { int i; char iclr; @@ -1542,7 +1542,7 @@ void __fastcall S_ScrollHBuy(int idx) // 6A8A28: using guessed type int stextsel; // 6AA700: using guessed type int stextdown; -void __cdecl S_StartHBuy() +void S_StartHBuy() { int v0; // ST10_4 int v1; // eax @@ -1578,7 +1578,7 @@ void __cdecl S_StartHBuy() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartStory() +void S_StartStory() { stextsize = 0; stextscrl = 0; @@ -1592,7 +1592,7 @@ void __cdecl S_StartStory() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -BOOLEAN __fastcall IdItemOk(ItemStruct *i) +BOOLEAN IdItemOk(ItemStruct *i) { BOOLEAN result; // al @@ -1604,7 +1604,7 @@ BOOLEAN __fastcall IdItemOk(ItemStruct *i) return result; } -void __fastcall AddStoreHoldId(ItemStruct itm, int i) +void AddStoreHoldId(ItemStruct itm, int i) { qmemcpy(&storehold[storenumh], &itm, sizeof(ItemStruct)); storehold[storenumh]._ivalue = 100; @@ -1614,7 +1614,7 @@ void __fastcall AddStoreHoldId(ItemStruct itm, int i) // 69F108: using guessed type int stextup; // 69F10C: using guessed type int storenumh; -void __cdecl S_StartSIdentify() +void S_StartSIdentify() { ItemStruct itm; // [esp-170h] [ebp-18Ch] BOOLEAN idok; // [esp+10h] [ebp-Ch] @@ -1696,7 +1696,7 @@ void __cdecl S_StartSIdentify() // 6A09E4: using guessed type int stextsmax; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartIdShow() +void S_StartIdShow() { char iclr; // [esp+4h] [ebp-4h] @@ -1717,7 +1717,7 @@ void __cdecl S_StartIdShow() } // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartTalk() +void S_StartTalk() { int *v0; // edi signed int v1; // eax @@ -1773,7 +1773,7 @@ void __cdecl S_StartTalk() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartTavern() +void S_StartTavern() { stextsize = 0; stextscrl = 0; @@ -1789,7 +1789,7 @@ void __cdecl S_StartTavern() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartBarMaid() +void S_StartBarMaid() { stextsize = 0; stextscrl = 0; @@ -1804,7 +1804,7 @@ void __cdecl S_StartBarMaid() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __cdecl S_StartDrunk() +void S_StartDrunk() { stextsize = 0; stextscrl = 0; @@ -1819,7 +1819,7 @@ void __cdecl S_StartDrunk() // 6A09E0: using guessed type char stextsize; // 6A6BB8: using guessed type int stextscrl; -void __fastcall StartStore(char s) +void StartStore(char s) { char t; // bl int i; // ecx @@ -1925,7 +1925,7 @@ void __fastcall StartStore(char s) // 6A8A28: using guessed type int stextsel; // 6AA705: using guessed type char stextflag; -void __cdecl DrawSText() +void DrawSText() { int i; // edi @@ -1981,7 +1981,7 @@ LABEL_19: // 6A6BB8: using guessed type int stextscrl; // 6AA705: using guessed type char stextflag; -void __cdecl STextESC() +void STextESC() { char v0; // cl char v1; // cl @@ -2064,7 +2064,7 @@ void __cdecl STextESC() // 6A8A28: using guessed type int stextsel; // 6AA705: using guessed type char stextflag; -void __cdecl STextUp() +void STextUp() { int v0; // eax @@ -2110,7 +2110,7 @@ void __cdecl STextUp() // 6A6BB8: using guessed type int stextscrl; // 6A8A28: using guessed type int stextsel; -void __cdecl STextDown() +void STextDown() { int v0; // eax @@ -2157,7 +2157,7 @@ void __cdecl STextDown() // 6A8A28: using guessed type int stextsel; // 6AA700: using guessed type int stextdown; -void __cdecl STextPrior() +void STextPrior() { PlaySFX(IS_TITLEMOV); if (stextsel != -1 && stextscrl) { @@ -2176,7 +2176,7 @@ void __cdecl STextPrior() // 6A6BB8: using guessed type int stextscrl; // 6A8A28: using guessed type int stextsel; -void __cdecl STextNext() +void STextNext() { PlaySFX(IS_TITLEMOV); if (stextsel != -1 && stextscrl) { @@ -2195,7 +2195,7 @@ void __cdecl STextNext() // 6A8A28: using guessed type int stextsel; // 6AA700: using guessed type int stextdown; -void __cdecl S_SmithEnter() +void S_SmithEnter() { int v0; // ecx @@ -2236,7 +2236,7 @@ void __cdecl S_SmithEnter() // 6A8A30: using guessed type int gossipend; // 6AA705: using guessed type char stextflag; -void __fastcall SetGoldCurs(int pnum, int i) +void SetGoldCurs(int pnum, int i) { if (plr[pnum].InvList[i]._ivalue < 2500) { if (plr[pnum].InvList[i]._ivalue > 1000) @@ -2248,7 +2248,7 @@ void __fastcall SetGoldCurs(int pnum, int i) } } -void __fastcall SetSpdbarGoldCurs(int pnum, int i) +void SetSpdbarGoldCurs(int pnum, int i) { if (plr[pnum].SpdList[i]._ivalue < 2500) { if (plr[pnum].SpdList[i]._ivalue > 1000) @@ -2260,7 +2260,7 @@ void __fastcall SetSpdbarGoldCurs(int pnum, int i) } } -void __fastcall TakePlrsMoney(int cost) +void TakePlrsMoney(int cost) { int v1; // edi int v2; // eax @@ -2396,7 +2396,7 @@ void __fastcall TakePlrsMoney(int cost) } // 52571C: using guessed type int drawpanflag; -void __cdecl SmithBuyItem() +void SmithBuyItem() { int idx; // eax ItemStruct *v1; // edx @@ -2429,7 +2429,7 @@ void __cdecl SmithBuyItem() // 69F110: using guessed type int stextlhold; // 6A8A24: using guessed type int stextvhold; -void __cdecl S_SBuyEnter() +void S_SBuyEnter() { int v0; // eax int idx; // ecx @@ -2476,7 +2476,7 @@ void __cdecl S_SBuyEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl SmithBuyPItem() +void SmithBuyPItem() { int xx; // ecx int idx; // eax @@ -2511,7 +2511,7 @@ void __cdecl SmithBuyPItem() // 69F110: using guessed type int stextlhold; // 6A8A24: using guessed type int stextvhold; -void __cdecl S_SPBuyEnter() +void S_SPBuyEnter() { int v0; // eax BOOLEAN v1; // sf @@ -2580,7 +2580,7 @@ void __cdecl S_SPBuyEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -BOOLEAN __fastcall StoreGoldFit(int idx) +BOOLEAN StoreGoldFit(int idx) { int cost; // edi int i; // ecx @@ -2621,7 +2621,7 @@ BOOLEAN __fastcall StoreGoldFit(int idx) } // 4B8C9C: using guessed type int cursH; -void __fastcall PlaceStoreGold(int v) +void PlaceStoreGold(int v) { BOOLEAN done; // ecx int ii; // ebp @@ -2649,7 +2649,7 @@ void __fastcall PlaceStoreGold(int v) } } -void __cdecl StoreSellItem() +void StoreSellItem() { int idx; // ebx char v1; // al @@ -2722,7 +2722,7 @@ void __cdecl StoreSellItem() // 69F110: using guessed type int stextlhold; // 6A8A24: using guessed type int stextvhold; -void __cdecl S_SSellEnter() +void S_SSellEnter() { int idx; // eax @@ -2748,7 +2748,7 @@ void __cdecl S_SSellEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl SmithRepairItem() +void SmithRepairItem() { int i; // edx int idx; // eax @@ -2776,7 +2776,7 @@ void __cdecl SmithRepairItem() // 69F110: using guessed type int stextlhold; // 6A8A24: using guessed type int stextvhold; -void __cdecl S_SRepairEnter() +void S_SRepairEnter() { int idx; // eax int v1; // edx @@ -2809,7 +2809,7 @@ void __cdecl S_SRepairEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl S_WitchEnter() +void S_WitchEnter() { int v0; // ecx @@ -2848,7 +2848,7 @@ void __cdecl S_WitchEnter() // 6A8A30: using guessed type int gossipend; // 6AA705: using guessed type char stextflag; -void __cdecl WitchBuyItem() +void WitchBuyItem() { int idx; // ebx ItemStruct *v3; // eax @@ -2884,7 +2884,7 @@ void __cdecl WitchBuyItem() // 69F110: using guessed type int stextlhold; // 6A8A24: using guessed type int stextvhold; -void __cdecl S_WBuyEnter() +void S_WBuyEnter() { int idx; // ecx int done; // eax @@ -2927,7 +2927,7 @@ void __cdecl S_WBuyEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl S_WSellEnter() +void S_WSellEnter() { int idx; // eax char v2; // cl @@ -2952,7 +2952,7 @@ void __cdecl S_WSellEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl WitchRechargeItem() +void WitchRechargeItem() { int i; // ecx int idx; // eax @@ -2974,7 +2974,7 @@ void __cdecl WitchRechargeItem() // 69F110: using guessed type int stextlhold; // 6A8A24: using guessed type int stextvhold; -void __cdecl S_WRechargeEnter() +void S_WRechargeEnter() { int idx; // eax int v1; // edx @@ -3007,7 +3007,7 @@ void __cdecl S_WRechargeEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl S_BoyEnter() +void S_BoyEnter() { if (boyitem._itype != ITYPE_NONE && stextsel == 18) { if (plr[myplr]._pGold < 50) { @@ -3031,7 +3031,7 @@ void __cdecl S_BoyEnter() } } -void __cdecl BoyBuyItem() +void BoyBuyItem() { TakePlrsMoney(plr[myplr].HoldItem._iIvalue); StoreAutoPlace(); @@ -3040,7 +3040,7 @@ void __cdecl BoyBuyItem() CalcPlrInv(myplr, 1u); } -void __cdecl HealerBuyItem() +void HealerBuyItem() { int idx; // esi BOOLEAN v1; // sf @@ -3105,7 +3105,7 @@ void __cdecl HealerBuyItem() // 69F110: using guessed type int stextlhold; // 6A8A24: using guessed type int stextvhold; -void __cdecl S_BBuyEnter() +void S_BBuyEnter() { int v0; // ecx int v1; // eax @@ -3153,7 +3153,7 @@ void __cdecl S_BBuyEnter() // 6A8A28: using guessed type int stextsel; // 6AA705: using guessed type char stextflag; -void __cdecl StoryIdItem() +void StoryIdItem() { int idx; @@ -3181,7 +3181,7 @@ void __cdecl StoryIdItem() CalcPlrInv(myplr, TRUE); } -void __cdecl S_ConfirmEnter() +void S_ConfirmEnter() { char v0; // cl @@ -3237,7 +3237,7 @@ void __cdecl S_ConfirmEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl S_HealerEnter() +void S_HealerEnter() { switch (stextsel) { case 12: @@ -3270,7 +3270,7 @@ void __cdecl S_HealerEnter() // 6A8A30: using guessed type int gossipend; // 6AA705: using guessed type char stextflag; -void __cdecl S_HBuyEnter() +void S_HBuyEnter() { int v0; // eax int idx; // ecx @@ -3317,7 +3317,7 @@ void __cdecl S_HBuyEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl S_StoryEnter() +void S_StoryEnter() { switch (stextsel) { case 12: @@ -3337,7 +3337,7 @@ void __cdecl S_StoryEnter() } } -void __cdecl S_SIDEnter() +void S_SIDEnter() { int idx; // eax int v1; // edx @@ -3370,7 +3370,7 @@ void __cdecl S_SIDEnter() // 6A8A24: using guessed type int stextvhold; // 6A8A28: using guessed type int stextsel; -void __cdecl S_TalkEnter() +void S_TalkEnter() { int v0; // edx int *v1; // edi @@ -3436,7 +3436,7 @@ void __cdecl S_TalkEnter() // 6A8A28: using guessed type int stextsel; // 6A8A30: using guessed type int gossipend; -void __cdecl S_TavernEnter() +void S_TavernEnter() { switch (stextsel) { case 12: @@ -3453,7 +3453,7 @@ void __cdecl S_TavernEnter() } } -void __cdecl S_BarmaidEnter() +void S_BarmaidEnter() { switch (stextsel) { case 12: @@ -3470,7 +3470,7 @@ void __cdecl S_BarmaidEnter() } } -void __cdecl S_DrunkEnter() +void S_DrunkEnter() { switch (stextsel) { case 12: @@ -3487,7 +3487,7 @@ void __cdecl S_DrunkEnter() } } -void __cdecl STextEnter() +void STextEnter() { if (qtextflag) { qtextflag = FALSE; @@ -3574,7 +3574,7 @@ void __cdecl STextEnter() // 6A8A28: using guessed type int stextsel; // 6AA705: using guessed type char stextflag; -void __cdecl CheckStoreBtn() +void CheckStoreBtn() { BOOLEAN v0; // sf //unsigned char v1; // of @@ -3642,7 +3642,7 @@ void __cdecl CheckStoreBtn() // 6A8A2C: using guessed type char stextscrldbtn; // 6AA704: using guessed type char stextscrlubtn; -void __cdecl ReleaseStoreBtn() +void ReleaseStoreBtn() { stextscrlubtn = -1; stextscrldbtn = -1; diff --git a/Source/stores.h b/Source/stores.h index 024b517b..e1e362a2 100644 --- a/Source/stores.h +++ b/Source/stores.h @@ -36,101 +36,101 @@ extern int stextdown; // weak extern char stextscrlubtn; // weak extern char stextflag; // weak -void __cdecl InitStores(); -void __cdecl SetupTownStores(); -void __cdecl FreeStoreMem(); -void __cdecl DrawSTextBack(); -void __fastcall PrintSString(int x, int y, unsigned char cjustflag, char *str, int col, int val); -void __fastcall DrawSLine(int y); -void __fastcall DrawSArrows(int y1, int y2); -void __cdecl DrawSTextHelp(); -void __fastcall ClearSText(int s, int e); -void __fastcall AddSLine(int y); -void __fastcall AddSTextVal(int y, int val); -void __fastcall OffsetSTextY(int y, int yo); -void __fastcall AddSText(int x, int y, int j, char *str, char clr, int sel); -void __cdecl StoreAutoPlace(); -void __cdecl S_StartSmith(); -void __fastcall S_ScrollSBuy(int idx); -void __fastcall PrintStoreItem(ItemStruct *x, int l, char iclr); -void __cdecl S_StartSBuy(); -void __fastcall S_ScrollSPBuy(int idx); -BOOL __cdecl S_StartSPBuy(); -BOOL __fastcall SmithSellOk(int i); -void __fastcall S_ScrollSSell(int idx); -void __cdecl S_StartSSell(); -BOOL __fastcall SmithRepairOk(int i); -void __cdecl S_StartSRepair(); -void __fastcall AddStoreHoldRepair(ItemStruct *itm, int i); -void __cdecl S_StartWitch(); -void __fastcall S_ScrollWBuy(int idx); -void __cdecl S_StartWBuy(); -BOOLEAN __fastcall WitchSellOk(int i); -void __cdecl S_StartWSell(); -BOOLEAN __fastcall WitchRechargeOk(int i); -void __fastcall AddStoreHoldRecharge(ItemStruct itm, int i); -void __cdecl S_StartWRecharge(); -void __cdecl S_StartNoMoney(); -void __cdecl S_StartNoRoom(); -void __cdecl S_StartConfirm(); -void __cdecl S_StartBoy(); -void __cdecl S_StartBBoy(); -void __cdecl S_StartHealer(); -void __fastcall S_ScrollHBuy(int idx); -void __cdecl S_StartHBuy(); -void __cdecl S_StartStory(); -BOOLEAN __fastcall IdItemOk(ItemStruct *i); -void __fastcall AddStoreHoldId(ItemStruct itm, int i); -void __cdecl S_StartSIdentify(); -void __cdecl S_StartIdShow(); -void __cdecl S_StartTalk(); -void __cdecl S_StartTavern(); -void __cdecl S_StartBarMaid(); -void __cdecl S_StartDrunk(); -void __fastcall StartStore(char s); -void __cdecl DrawSText(); -void __cdecl STextESC(); -void __cdecl STextUp(); -void __cdecl STextDown(); -void __cdecl STextPrior(); -void __cdecl STextNext(); -void __cdecl S_SmithEnter(); -void __fastcall SetGoldCurs(int pnum, int i); -void __fastcall SetSpdbarGoldCurs(int pnum, int i); -void __fastcall TakePlrsMoney(int cost); -void __cdecl SmithBuyItem(); -void __cdecl S_SBuyEnter(); -void __cdecl SmithBuyPItem(); -void __cdecl S_SPBuyEnter(); -BOOLEAN __fastcall StoreGoldFit(int idx); -void __fastcall PlaceStoreGold(int v); -void __cdecl StoreSellItem(); -void __cdecl S_SSellEnter(); -void __cdecl SmithRepairItem(); -void __cdecl S_SRepairEnter(); -void __cdecl S_WitchEnter(); -void __cdecl WitchBuyItem(); -void __cdecl S_WBuyEnter(); -void __cdecl S_WSellEnter(); -void __cdecl WitchRechargeItem(); -void __cdecl S_WRechargeEnter(); -void __cdecl S_BoyEnter(); -void __cdecl BoyBuyItem(); -void __cdecl HealerBuyItem(); -void __cdecl S_BBuyEnter(); -void __cdecl StoryIdItem(); -void __cdecl S_ConfirmEnter(); -void __cdecl S_HealerEnter(); -void __cdecl S_HBuyEnter(); -void __cdecl S_StoryEnter(); -void __cdecl S_SIDEnter(); -void __cdecl S_TalkEnter(); -void __cdecl S_TavernEnter(); -void __cdecl S_BarmaidEnter(); -void __cdecl S_DrunkEnter(); -void __cdecl STextEnter(); -void __cdecl CheckStoreBtn(); -void __cdecl ReleaseStoreBtn(); +void InitStores(); +void SetupTownStores(); +void FreeStoreMem(); +void DrawSTextBack(); +void PrintSString(int x, int y, unsigned char cjustflag, char *str, int col, int val); +void DrawSLine(int y); +void DrawSArrows(int y1, int y2); +void DrawSTextHelp(); +void ClearSText(int s, int e); +void AddSLine(int y); +void AddSTextVal(int y, int val); +void OffsetSTextY(int y, int yo); +void AddSText(int x, int y, int j, char *str, char clr, int sel); +void StoreAutoPlace(); +void S_StartSmith(); +void S_ScrollSBuy(int idx); +void PrintStoreItem(ItemStruct *x, int l, char iclr); +void S_StartSBuy(); +void S_ScrollSPBuy(int idx); +BOOL S_StartSPBuy(); +BOOL SmithSellOk(int i); +void S_ScrollSSell(int idx); +void S_StartSSell(); +BOOL SmithRepairOk(int i); +void S_StartSRepair(); +void AddStoreHoldRepair(ItemStruct *itm, int i); +void S_StartWitch(); +void S_ScrollWBuy(int idx); +void S_StartWBuy(); +BOOLEAN WitchSellOk(int i); +void S_StartWSell(); +BOOLEAN WitchRechargeOk(int i); +void AddStoreHoldRecharge(ItemStruct itm, int i); +void S_StartWRecharge(); +void S_StartNoMoney(); +void S_StartNoRoom(); +void S_StartConfirm(); +void S_StartBoy(); +void S_StartBBoy(); +void S_StartHealer(); +void S_ScrollHBuy(int idx); +void S_StartHBuy(); +void S_StartStory(); +BOOLEAN IdItemOk(ItemStruct *i); +void AddStoreHoldId(ItemStruct itm, int i); +void S_StartSIdentify(); +void S_StartIdShow(); +void S_StartTalk(); +void S_StartTavern(); +void S_StartBarMaid(); +void S_StartDrunk(); +void StartStore(char s); +void DrawSText(); +void STextESC(); +void STextUp(); +void STextDown(); +void STextPrior(); +void STextNext(); +void S_SmithEnter(); +void SetGoldCurs(int pnum, int i); +void SetSpdbarGoldCurs(int pnum, int i); +void TakePlrsMoney(int cost); +void SmithBuyItem(); +void S_SBuyEnter(); +void SmithBuyPItem(); +void S_SPBuyEnter(); +BOOLEAN StoreGoldFit(int idx); +void PlaceStoreGold(int v); +void StoreSellItem(); +void S_SSellEnter(); +void SmithRepairItem(); +void S_SRepairEnter(); +void S_WitchEnter(); +void WitchBuyItem(); +void S_WBuyEnter(); +void S_WSellEnter(); +void WitchRechargeItem(); +void S_WRechargeEnter(); +void S_BoyEnter(); +void BoyBuyItem(); +void HealerBuyItem(); +void S_BBuyEnter(); +void StoryIdItem(); +void S_ConfirmEnter(); +void S_HealerEnter(); +void S_HBuyEnter(); +void S_StoryEnter(); +void S_SIDEnter(); +void S_TalkEnter(); +void S_TavernEnter(); +void S_BarmaidEnter(); +void S_DrunkEnter(); +void STextEnter(); +void CheckStoreBtn(); +void ReleaseStoreBtn(); /* rdata */ diff --git a/Source/sync.cpp b/Source/sync.cpp index c59bfc8f..f49991f0 100644 --- a/Source/sync.cpp +++ b/Source/sync.cpp @@ -8,7 +8,7 @@ WORD sgwLRU[MAXMONSTERS]; int sgnSyncItem; int sgnSyncPInv; -DWORD __fastcall sync_all_monsters(const BYTE *pbBuf, DWORD dwMaxLen) +DWORD sync_all_monsters(const BYTE *pbBuf, DWORD dwMaxLen) { TSyncHeader *pHdr; int i; @@ -51,7 +51,7 @@ DWORD __fastcall sync_all_monsters(const BYTE *pbBuf, DWORD dwMaxLen) return dwMaxLen; } -void __cdecl sync_one_monster() +void sync_one_monster() { int i, m; @@ -66,7 +66,7 @@ void __cdecl sync_one_monster() } } -BOOL __fastcall sync_monster_active(TSyncMonster *p) +BOOL sync_monster_active(TSyncMonster *p) { int i, m, ndx; DWORD lru; @@ -90,7 +90,7 @@ BOOL __fastcall sync_monster_active(TSyncMonster *p) return TRUE; } -void __fastcall sync_monster_pos(TSyncMonster *p, int ndx) +void sync_monster_pos(TSyncMonster *p, int ndx) { p->_mndx = ndx; p->_mx = monster[ndx]._mx; @@ -102,7 +102,7 @@ void __fastcall sync_monster_pos(TSyncMonster *p, int ndx) sgwLRU[ndx] = monster[ndx]._msquelch == 0 ? 0xFFFF : 0xFFFE; } -BOOL __fastcall sync_monster_active2(TSyncMonster *p) +BOOL sync_monster_active2(TSyncMonster *p) { int i, m, ndx; DWORD lru; @@ -130,7 +130,7 @@ BOOL __fastcall sync_monster_active2(TSyncMonster *p) return TRUE; } -void __fastcall SyncPlrInv(TSyncHeader *pHdr) +void SyncPlrInv(TSyncHeader *pHdr) { int ii; ItemStruct *pItem; @@ -188,7 +188,7 @@ void __fastcall SyncPlrInv(TSyncHeader *pHdr) } } -DWORD __fastcall sync_update(int pnum, const BYTE *pbBuf) +DWORD sync_update(int pnum, const BYTE *pbBuf) { TSyncHeader *pHdr; WORD wLen; @@ -223,7 +223,7 @@ DWORD __fastcall sync_update(int pnum, const BYTE *pbBuf) } // 676194: using guessed type char gbBufferMsgs; -void __fastcall sync_monster(int pnum, const TSyncMonster *p) +void sync_monster(int pnum, const TSyncMonster *p) { int i, ndx, md, mdx, mdy; DWORD delta; @@ -281,7 +281,7 @@ void __fastcall sync_monster(int pnum, const TSyncMonster *p) decode_enemy(ndx, p->_menemy); } -void __cdecl sync_init() +void sync_init() { sgnMonsters = 16 * myplr; memset(sgwLRU, 255, sizeof(sgwLRU)); diff --git a/Source/sync.h b/Source/sync.h index 3c327af2..b65f9b19 100644 --- a/Source/sync.h +++ b/Source/sync.h @@ -7,14 +7,14 @@ extern int sgnMonsters; extern WORD sgwLRU[MAXMONSTERS]; extern int sgnSyncItem; -DWORD __fastcall sync_all_monsters(const BYTE *pbBuf, DWORD dwMaxLen); -void __cdecl sync_one_monster(); -BOOL __fastcall sync_monster_active(TSyncMonster *p); -void __fastcall sync_monster_pos(TSyncMonster *p, int ndx); -BOOL __fastcall sync_monster_active2(TSyncMonster *p); -void __fastcall SyncPlrInv(TSyncHeader *pHdr); -DWORD __fastcall sync_update(int pnum, const BYTE *pbBuf); -void __fastcall sync_monster(int pnum, const TSyncMonster *p); -void __cdecl sync_init(); +DWORD sync_all_monsters(const BYTE *pbBuf, DWORD dwMaxLen); +void sync_one_monster(); +BOOL sync_monster_active(TSyncMonster *p); +void sync_monster_pos(TSyncMonster *p, int ndx); +BOOL sync_monster_active2(TSyncMonster *p); +void SyncPlrInv(TSyncHeader *pHdr); +DWORD sync_update(int pnum, const BYTE *pbBuf); +void sync_monster(int pnum, const TSyncMonster *p); +void sync_init(); #endif /* __SYNC_H__ */ diff --git a/Source/themes.cpp b/Source/themes.cpp index 933e028a..82295daf 100644 --- a/Source/themes.cpp +++ b/Source/themes.cpp @@ -49,7 +49,7 @@ int trm3y[9] = { 1, 1, 1 }; -BOOLEAN __fastcall TFit_Shrine(int i) +BOOLEAN TFit_Shrine(int i) { int v1; // ecx int v2; // esi @@ -110,7 +110,7 @@ BOOLEAN __fastcall TFit_Shrine(int i) return 1; } -BOOL __fastcall TFit_Obj5(int t) +BOOL TFit_Obj5(int t) { int v2; // ebx int v3; // esi @@ -177,7 +177,7 @@ BOOL __fastcall TFit_Obj5(int t) } } -BOOL __fastcall TFit_SkelRoom(int t) +BOOL TFit_SkelRoom(int t) { int i; @@ -195,7 +195,7 @@ BOOL __fastcall TFit_SkelRoom(int t) return FALSE; } -BOOL __fastcall TFit_GoatShrine(int t) +BOOL TFit_GoatShrine(int t) { int i; @@ -209,7 +209,7 @@ BOOL __fastcall TFit_GoatShrine(int t) return FALSE; } -BOOL __fastcall CheckThemeObj3(int xp, int yp, int t, int f) +BOOL CheckThemeObj3(int xp, int yp, int t, int f) { int i; @@ -229,7 +229,7 @@ BOOL __fastcall CheckThemeObj3(int xp, int yp, int t, int f) return TRUE; } -BOOL __fastcall TFit_Obj3(int t) +BOOL TFit_Obj3(int t) { int xp, yp; char objrnd[4] = { 4, 4, 3, 5 }; @@ -247,7 +247,7 @@ BOOL __fastcall TFit_Obj3(int t) return FALSE; } -BOOLEAN __fastcall CheckThemeReqs(int t) +BOOLEAN CheckThemeReqs(int t) { BOOLEAN rv; // al int v2; // ecx @@ -324,7 +324,7 @@ BOOLEAN __fastcall CheckThemeReqs(int t) // 6AAC08: using guessed type int pFountainFlag; // 6AAC0C: using guessed type int bFountainFlag; -BOOLEAN __fastcall SpecialThemeFit(int i, int t) +BOOLEAN SpecialThemeFit(int i, int t) { BOOLEAN rv; // eax @@ -411,7 +411,7 @@ BOOLEAN __fastcall SpecialThemeFit(int i, int t) // 6AAC08: using guessed type int pFountainFlag; // 6AAC0C: using guessed type int bFountainFlag; -BOOLEAN __fastcall CheckThemeRoom(int tv) +BOOLEAN CheckThemeRoom(int tv) { int v1; // esi int *v2; // edx @@ -484,7 +484,7 @@ BOOLEAN __fastcall CheckThemeRoom(int tv) return 0; } -void __cdecl InitThemes() +void InitThemes() { int v0; // esi char v1; // bl @@ -601,7 +601,7 @@ void __cdecl InitThemes() // 6AAC0C: using guessed type int bFountainFlag; // HoldThemeRooms marks theme rooms as populated. -void __cdecl HoldThemeRooms() +void HoldThemeRooms() { int i, x, y; @@ -627,7 +627,7 @@ void __cdecl HoldThemeRooms() // Parameters: // - t: theme number (index into themes array). // - f: frequency (1/f likelihood of adding monster). -void __fastcall PlaceThemeMonsts(int t, int f) +void PlaceThemeMonsts(int t, int f) { int xp, yp; int scattertypes[111]; @@ -656,7 +656,7 @@ void __fastcall PlaceThemeMonsts(int t, int f) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_Barrel(int t) +void Theme_Barrel(int t) { int xp, yp, r; char barrnd[4] = { 2, 6, 4, 8 }; @@ -680,7 +680,7 @@ void __fastcall Theme_Barrel(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_Shrine(int t) +void Theme_Shrine(int t) { char monstrnd[4] = { 6, 6, 3, 9 }; @@ -701,7 +701,7 @@ void __fastcall Theme_Shrine(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_MonstPit(int t) +void Theme_MonstPit(int t) { int r; int ixp, iyp; @@ -737,7 +737,7 @@ void __fastcall Theme_MonstPit(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_SkelRoom(int t) +void Theme_SkelRoom(int t) { int xp, yp; char monstrnd[4] = { 6, 7, 3, 9 }; @@ -790,7 +790,7 @@ void __fastcall Theme_SkelRoom(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_Treasure(int t) +void Theme_Treasure(int t) { int xp, yp; int i; @@ -827,7 +827,7 @@ void __fastcall Theme_Treasure(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_Library(int t) +void Theme_Library(int t) { int xp, yp; int oi; @@ -871,7 +871,7 @@ void __fastcall Theme_Library(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_Torture(int t) +void Theme_Torture(int t) { int xp, yp; char tortrnd[4] = { 6, 8, 3, 8 }; @@ -895,7 +895,7 @@ void __fastcall Theme_Torture(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_BloodFountain(int t) +void Theme_BloodFountain(int t) { char monstrnd[4] = { 6, 8, 3, 9 }; @@ -908,7 +908,7 @@ void __fastcall Theme_BloodFountain(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_Decap(int t) +void Theme_Decap(int t) { int xp, yp; char decaprnd[4] = { 6, 8, 3, 8 }; @@ -932,7 +932,7 @@ void __fastcall Theme_Decap(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_PurifyingFountain(int t) +void Theme_PurifyingFountain(int t) { char monstrnd[4] = { 6, 7, 3, 9 }; @@ -945,7 +945,7 @@ void __fastcall Theme_PurifyingFountain(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_ArmorStand(int t) +void Theme_ArmorStand(int t) { int xp, yp; char armorrnd[4] = { 6, 8, 3, 8 }; @@ -974,7 +974,7 @@ void __fastcall Theme_ArmorStand(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_GoatShrine(int t) +void Theme_GoatShrine(int t) { int xx, yy; @@ -993,7 +993,7 @@ void __fastcall Theme_GoatShrine(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_Cauldron(int t) +void Theme_Cauldron(int t) { char monstrnd[4] = { 6, 7, 3, 9 }; @@ -1006,7 +1006,7 @@ void __fastcall Theme_Cauldron(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_MurkyFountain(int t) +void Theme_MurkyFountain(int t) { char monstrnd[4] = { 6, 7, 3, 9 }; @@ -1019,7 +1019,7 @@ void __fastcall Theme_MurkyFountain(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_TearFountain(int t) +void Theme_TearFountain(int t) { char monstrnd[4] = { 6, 7, 3, 9 }; @@ -1032,7 +1032,7 @@ void __fastcall Theme_TearFountain(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_BrnCross(int t) +void Theme_BrnCross(int t) { int xp, yp; char monstrnd[4] = { 6, 8, 3, 9 }; @@ -1057,7 +1057,7 @@ void __fastcall Theme_BrnCross(int t) // // Parameters: // - t: theme number (index into themes array). -void __fastcall Theme_WeaponRack(int t) +void Theme_WeaponRack(int t) { int xp, yp; char weaponrnd[4] = { 6, 8, 5, 8 }; @@ -1083,7 +1083,7 @@ void __fastcall Theme_WeaponRack(int t) } // UpdateL4Trans sets each value of the transparency map to 1. -void __cdecl UpdateL4Trans() +void UpdateL4Trans() { int i, j; @@ -1097,7 +1097,7 @@ void __cdecl UpdateL4Trans() } // CreateThemeRooms adds thematic elements to rooms. -void __cdecl CreateThemeRooms() +void CreateThemeRooms() { int i; diff --git a/Source/themes.h b/Source/themes.h index 6ddc03d1..c37594fe 100644 --- a/Source/themes.h +++ b/Source/themes.h @@ -19,37 +19,37 @@ extern BOOLEAN pFountainFlag; // weak extern BOOLEAN bFountainFlag; // weak extern BOOL bCrossFlag; -BOOLEAN __fastcall TFit_Shrine(int i); -BOOL __fastcall TFit_Obj5(int t); -BOOL __fastcall TFit_SkelRoom(int t); -BOOL __fastcall TFit_GoatShrine(int t); -BOOL __fastcall CheckThemeObj3(int xp, int yp, int t, int f); -BOOL __fastcall TFit_Obj3(int t); -BOOLEAN __fastcall CheckThemeReqs(int t); -BOOLEAN __fastcall SpecialThemeFit(int i, int t); -BOOLEAN __fastcall CheckThemeRoom(int tv); -void __cdecl InitThemes(); -void __cdecl HoldThemeRooms(); -void __fastcall PlaceThemeMonsts(int t, int f); -void __fastcall Theme_Barrel(int t); -void __fastcall Theme_Shrine(int t); -void __fastcall Theme_MonstPit(int t); -void __fastcall Theme_SkelRoom(int t); -void __fastcall Theme_Treasure(int t); -void __fastcall Theme_Library(int t); -void __fastcall Theme_Torture(int t); -void __fastcall Theme_BloodFountain(int t); -void __fastcall Theme_Decap(int t); -void __fastcall Theme_PurifyingFountain(int t); -void __fastcall Theme_ArmorStand(int t); -void __fastcall Theme_GoatShrine(int t); -void __fastcall Theme_Cauldron(int t); -void __fastcall Theme_MurkyFountain(int t); -void __fastcall Theme_TearFountain(int t); -void __fastcall Theme_BrnCross(int t); -void __fastcall Theme_WeaponRack(int t); -void __cdecl UpdateL4Trans(); -void __cdecl CreateThemeRooms(); +BOOLEAN TFit_Shrine(int i); +BOOL TFit_Obj5(int t); +BOOL TFit_SkelRoom(int t); +BOOL TFit_GoatShrine(int t); +BOOL CheckThemeObj3(int xp, int yp, int t, int f); +BOOL TFit_Obj3(int t); +BOOLEAN CheckThemeReqs(int t); +BOOLEAN SpecialThemeFit(int i, int t); +BOOLEAN CheckThemeRoom(int tv); +void InitThemes(); +void HoldThemeRooms(); +void PlaceThemeMonsts(int t, int f); +void Theme_Barrel(int t); +void Theme_Shrine(int t); +void Theme_MonstPit(int t); +void Theme_SkelRoom(int t); +void Theme_Treasure(int t); +void Theme_Library(int t); +void Theme_Torture(int t); +void Theme_BloodFountain(int t); +void Theme_Decap(int t); +void Theme_PurifyingFountain(int t); +void Theme_ArmorStand(int t); +void Theme_GoatShrine(int t); +void Theme_Cauldron(int t); +void Theme_MurkyFountain(int t); +void Theme_TearFountain(int t); +void Theme_BrnCross(int t); +void Theme_WeaponRack(int t); +void UpdateL4Trans(); +void CreateThemeRooms(); /* rdata */ diff --git a/Source/tmsg.cpp b/Source/tmsg.cpp index fe2f98f2..fd673f72 100644 --- a/Source/tmsg.cpp +++ b/Source/tmsg.cpp @@ -4,7 +4,7 @@ static TMsg *sgpTimedMsgHead; -int __fastcall tmsg_get(BYTE *pbMsg, DWORD dwMaxLen) +int tmsg_get(BYTE *pbMsg, DWORD dwMaxLen) { int len; TMsg *head; @@ -23,7 +23,7 @@ int __fastcall tmsg_get(BYTE *pbMsg, DWORD dwMaxLen) return len; } -void __fastcall tmsg_add(BYTE *pbMsg, BYTE bLen) +void tmsg_add(BYTE *pbMsg, BYTE bLen) { TMsg **tail; @@ -38,7 +38,7 @@ void __fastcall tmsg_add(BYTE *pbMsg, BYTE bLen) *tail = msg; } -void *__cdecl tmsg_cleanup() +void *tmsg_cleanup() { while (sgpTimedMsgHead) { TMsg *next = sgpTimedMsgHead->hdr.pNext; diff --git a/Source/tmsg.h b/Source/tmsg.h index 1ba5559b..b58ec5bf 100644 --- a/Source/tmsg.h +++ b/Source/tmsg.h @@ -2,8 +2,8 @@ #ifndef __TMSG_H__ #define __TMSG_H__ -int __fastcall tmsg_get(BYTE *pbMsg, DWORD dwMaxLen); -void __fastcall tmsg_add(BYTE *pbMsg, BYTE bLen); -void *__cdecl tmsg_cleanup(); +int tmsg_get(BYTE *pbMsg, DWORD dwMaxLen); +void tmsg_add(BYTE *pbMsg, BYTE bLen); +void *tmsg_cleanup(); #endif /* __TMSG_H__ */ diff --git a/Source/town.cpp b/Source/town.cpp index 3fc10cb1..81f0a259 100644 --- a/Source/town.cpp +++ b/Source/town.cpp @@ -2,7 +2,7 @@ #include "../types.h" -void __fastcall town_clear_upper_buf(BYTE *pBuff) +void town_clear_upper_buf(BYTE *pBuff) { /// ASSERT: assert(gpBuffer); @@ -65,7 +65,7 @@ void __fastcall town_clear_upper_buf(BYTE *pBuff) } // 69CF0C: using guessed type int gpBufEnd; -void __fastcall town_clear_low_buf(BYTE *pBuff) +void town_clear_low_buf(BYTE *pBuff) { /// ASSERT: assert(gpBuffer); @@ -142,7 +142,7 @@ void __fastcall town_clear_low_buf(BYTE *pBuff) } // 69CF0C: using guessed type int gpBufEnd; -void __fastcall town_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy) +void town_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy) { int i; BYTE *dst; @@ -167,7 +167,7 @@ void __fastcall town_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int } // 69CF14: using guessed type int level_cel_block; -void __fastcall town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some_flag) +void town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some_flag) { int mi, px, py; char bv; @@ -234,7 +234,7 @@ void __fastcall town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy // 4B8CC0: using guessed type char pcursitem; // 4B8CC2: using guessed type char pcursplr; -void __fastcall town_draw_lower(int x, int y, int sx, int sy, int a5, int some_flag) +void town_draw_lower(int x, int y, int sx, int sy, int a5, int some_flag) { int i, j; BYTE *dst; @@ -320,7 +320,7 @@ void __fastcall town_draw_lower(int x, int y, int sx, int sy, int a5, int some_f } // 69CF14: using guessed type int level_cel_block; -void __fastcall town_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy) +void town_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy) { int i; BYTE *dst; @@ -354,7 +354,7 @@ void __fastcall town_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int a4, in } // 69CF14: using guessed type int level_cel_block; -void __fastcall town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy, BOOL some_flag) +void town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy, BOOL some_flag) { int mi, px, py; char bv; @@ -417,7 +417,7 @@ void __fastcall town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int // 4B8CC0: using guessed type char pcursitem; // 4B8CC2: using guessed type char pcursplr; -void __fastcall town_draw_lower_2(int x, int y, int sx, int sy, int a5, int a6, int some_flag) +void town_draw_lower_2(int x, int y, int sx, int sy, int a5, int a6, int some_flag) { int i, j, dir; BYTE *dst; @@ -517,7 +517,7 @@ void __fastcall town_draw_lower_2(int x, int y, int sx, int sy, int a5, int a6, } // 69CF14: using guessed type int level_cel_block; -void __fastcall town_draw_e_flag(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy) +void town_draw_e_flag(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy) { int i; BYTE *dst; @@ -544,7 +544,7 @@ void __fastcall town_draw_e_flag(BYTE *pBuff, int x, int y, int a4, int dir, int } // 69CF14: using guessed type int level_cel_block; -void __fastcall town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy, BOOL some_flag) +void town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy, BOOL some_flag) { int mi, px, py; char bv; @@ -612,7 +612,7 @@ void __fastcall town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, i // 4B8CC0: using guessed type char pcursitem; // 4B8CC2: using guessed type char pcursplr; -void __fastcall town_draw_upper(int x, int y, int sx, int sy, int a5, int a6, int some_flag) +void town_draw_upper(int x, int y, int sx, int sy, int a5, int a6, int some_flag) { int i, j, dir; BYTE *dst; @@ -709,7 +709,7 @@ void __fastcall town_draw_upper(int x, int y, int sx, int sy, int a5, int a6, in } // 69CF14: using guessed type int level_cel_block; -void __fastcall T_DrawGame(int x, int y) +void T_DrawGame(int x, int y) { int i, sx, sy, chunks, blocks; @@ -829,7 +829,7 @@ void __fastcall T_DrawGame(int x, int y) // 69BD04: using guessed type int questlog; // 69CF0C: using guessed type int gpBufEnd; -void __fastcall T_DrawZoom(int x, int y) +void T_DrawZoom(int x, int y) { int i, sx, sy, chunks, blocks; int wdt, nSrcOff, nDstOff; @@ -1004,7 +1004,7 @@ void __fastcall T_DrawZoom(int x, int y) // 69BD04: using guessed type int questlog; // 69CF0C: using guessed type int gpBufEnd; -void __fastcall T_DrawView(int StartX, int StartY) +void T_DrawView(int StartX, int StartY) { light_table_index = 0; cel_transparency_active = 0; @@ -1061,7 +1061,7 @@ void __fastcall T_DrawView(int StartX, int StartY) // 69CF94: using guessed type int cel_transparency_active; // 6AA705: using guessed type char stextflag; -void __cdecl SetTownMicros() +void SetTownMicros() { int i, x, y, lv; WORD *pMap, *pPiece; @@ -1102,7 +1102,7 @@ void __cdecl SetTownMicros() // 5C3000: using guessed type int scr_pix_width; // 5C3004: using guessed type int scr_pix_height; -void __fastcall T_FillSector(unsigned char *P3Tiles, unsigned char *pSector, int xi, int yi, int w, int h) +void T_FillSector(unsigned char *P3Tiles, unsigned char *pSector, int xi, int yi, int w, int h) { int i, j, xx, yy; long v1, v2, v3, v4, ii; @@ -1174,7 +1174,7 @@ void __fastcall T_FillSector(unsigned char *P3Tiles, unsigned char *pSector, int } } -void __fastcall T_FillTile(unsigned char *P3Tiles, int xx, int yy, int t) +void T_FillTile(unsigned char *P3Tiles, int xx, int yy, int t) { long v1, v2, v3, v4; @@ -1219,7 +1219,7 @@ void __fastcall T_FillTile(unsigned char *P3Tiles, int xx, int yy, int t) dPiece[xx + 1][yy + 1] = v4; } -void __cdecl T_Pass3() +void T_Pass3() { int xx, yy, x; unsigned char *P3Tiles, *pSector; @@ -1273,7 +1273,7 @@ void __cdecl T_Pass3() // 45FDE6: could not find valid save-restore pair for edi // 679660: using guessed type char gbMaxPlayers; -void __fastcall CreateTown(int entry) +void CreateTown(int entry) { int x, y; diff --git a/Source/town.h b/Source/town.h index 83aff6a7..58f20843 100644 --- a/Source/town.h +++ b/Source/town.h @@ -2,24 +2,24 @@ #ifndef __TOWN_H__ #define __TOWN_H__ -void __fastcall town_clear_upper_buf(BYTE *pBuff); -void __fastcall town_clear_low_buf(BYTE *pBuff); -void __fastcall town_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy); -void __fastcall town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some_flag); -void __fastcall town_draw_lower(int x, int y, int sx, int sy, int a5, int some_flag); -void __fastcall town_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy); -void __fastcall town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy, BOOL some_flag); -void __fastcall town_draw_lower_2(int x, int y, int sx, int sy, int a5, int a6, int some_flag); -void __fastcall town_draw_e_flag(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy); -void __fastcall town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy, BOOL some_flag); -void __fastcall town_draw_upper(int x, int y, int sx, int sy, int a5, int a6, int some_flag); -void __fastcall T_DrawGame(int x, int y); -void __fastcall T_DrawZoom(int x, int y); -void __fastcall T_DrawView(int StartX, int StartY); -void __cdecl SetTownMicros(); -void __fastcall T_FillSector(unsigned char *P3Tiles, unsigned char *pSector, int xi, int yi, int w, int h); -void __fastcall T_FillTile(unsigned char *P3Tiles, int xx, int yy, int t); -void __cdecl T_Pass3(); -void __fastcall CreateTown(int entry); +void town_clear_upper_buf(BYTE *pBuff); +void town_clear_low_buf(BYTE *pBuff); +void town_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy); +void town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some_flag); +void town_draw_lower(int x, int y, int sx, int sy, int a5, int some_flag); +void town_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy); +void town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy, BOOL some_flag); +void town_draw_lower_2(int x, int y, int sx, int sy, int a5, int a6, int some_flag); +void town_draw_e_flag(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy); +void town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy, BOOL some_flag); +void town_draw_upper(int x, int y, int sx, int sy, int a5, int a6, int some_flag); +void T_DrawGame(int x, int y); +void T_DrawZoom(int x, int y); +void T_DrawView(int StartX, int StartY); +void SetTownMicros(); +void T_FillSector(unsigned char *P3Tiles, unsigned char *pSector, int xi, int yi, int w, int h); +void T_FillTile(unsigned char *P3Tiles, int xx, int yy, int t); +void T_Pass3(); +void CreateTown(int entry); #endif /* __TOWN_H__ */ diff --git a/Source/towners.cpp b/Source/towners.cpp index 7e0ba151..c7c0eb09 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -108,7 +108,7 @@ QuestTalkData Qtalklist[11] = { }; int CowPlaying = -1; -int __fastcall GetActiveTowner(int t) +int GetActiveTowner(int t) { int i; @@ -120,7 +120,7 @@ int __fastcall GetActiveTowner(int t) return -1; } -void __fastcall SetTownerGPtrs(BYTE *pData, BYTE **pAnim) +void SetTownerGPtrs(BYTE *pData, BYTE **pAnim) { int i; @@ -129,7 +129,7 @@ void __fastcall SetTownerGPtrs(BYTE *pData, BYTE **pAnim) } } -void __fastcall NewTownerAnim(int tnum, unsigned char *pAnim, int numFrames, int Delay) +void NewTownerAnim(int tnum, unsigned char *pAnim, int numFrames, int Delay) { towner[tnum]._tAnimCnt = 0; towner[tnum]._tAnimLen = numFrames; @@ -138,7 +138,7 @@ void __fastcall NewTownerAnim(int tnum, unsigned char *pAnim, int numFrames, int towner[tnum]._tAnimDelay = Delay; } -void __fastcall InitTownerInfo(int i, int w, int sel, int t, int x, int y, int ao, int tp) +void InitTownerInfo(int i, int w, int sel, int t, int x, int y, int ao, int tp) { memset(&towner[i], 0, sizeof(TownerStruct)); towner[i]._tSelFlag = sel; @@ -154,7 +154,7 @@ void __fastcall InitTownerInfo(int i, int w, int sel, int t, int x, int y, int a towner[i]._tSeed = GetRndSeed(); } -void __fastcall InitQstSnds(int i) +void InitQstSnds(int i) { int v1; // eax _BYTE *v2; // ecx @@ -181,7 +181,7 @@ void __fastcall InitQstSnds(int i) // 69BE90: using guessed type int qline; // 6AAC2C: using guessed type int boyloadflag; -void __cdecl InitSmith() +void InitSmith() { int i, tnum; @@ -198,7 +198,7 @@ void __cdecl InitSmith() numtowners++; } -void __cdecl InitBarOwner() +void InitBarOwner() { int i, tnum; @@ -217,7 +217,7 @@ void __cdecl InitBarOwner() } // 6AAC28: using guessed type int bannerflag; -void __cdecl InitTownDead() +void InitTownDead() { int i, tnum; @@ -234,7 +234,7 @@ void __cdecl InitTownDead() numtowners++; } -void __cdecl InitWitch() +void InitWitch() { int i, tnum; @@ -251,7 +251,7 @@ void __cdecl InitWitch() numtowners++; } -void __cdecl InitBarmaid() +void InitBarmaid() { int i, tnum; @@ -268,7 +268,7 @@ void __cdecl InitBarmaid() numtowners++; } -void __cdecl InitBoy() +void InitBoy() { int i, tnum; @@ -287,7 +287,7 @@ void __cdecl InitBoy() } // 6AAC2C: using guessed type int boyloadflag; -void __cdecl InitHealer() +void InitHealer() { int i, tnum; @@ -304,7 +304,7 @@ void __cdecl InitHealer() numtowners++; } -void __cdecl InitTeller() +void InitTeller() { int i, tnum; @@ -321,7 +321,7 @@ void __cdecl InitTeller() numtowners++; } -void __cdecl InitDrunk() +void InitDrunk() { int i, tnum; @@ -338,7 +338,7 @@ void __cdecl InitDrunk() numtowners++; } -void __cdecl InitCows() +void InitCows() { int i, dir, tnum; int x, y, xo, yo; @@ -373,7 +373,7 @@ void __cdecl InitCows() } // 6AAC2C: using guessed type int boyloadflag; -void __cdecl InitTowners() +void InitTowners() { numtowners = 0; boyloadflag = 0; @@ -391,7 +391,7 @@ void __cdecl InitTowners() } // 6AAC2C: using guessed type int boyloadflag; -void __cdecl FreeTownerGFX() +void FreeTownerGFX() { void *tmp; int i; @@ -411,7 +411,7 @@ void __cdecl FreeTownerGFX() mem_free_dbg(tmp); } -void __fastcall TownCtrlMsg(int i) +void TownCtrlMsg(int i) { int p; int dx, dy; @@ -430,7 +430,7 @@ void __fastcall TownCtrlMsg(int i) } // 646D00: using guessed type char qtextflag; -void __cdecl TownBlackSmith() +void TownBlackSmith() { int i; @@ -438,7 +438,7 @@ void __cdecl TownBlackSmith() TownCtrlMsg(i); } -void __cdecl TownBarOwner() +void TownBarOwner() { int i; @@ -446,7 +446,7 @@ void __cdecl TownBarOwner() TownCtrlMsg(i); } -void __cdecl TownDead() +void TownDead() { int v0; // esi int v1; // eax @@ -467,7 +467,7 @@ void __cdecl TownDead() } // 646D00: using guessed type char qtextflag; -void __cdecl TownHealer() +void TownHealer() { int i; @@ -475,7 +475,7 @@ void __cdecl TownHealer() TownCtrlMsg(i); } -void __cdecl TownStory() +void TownStory() { int i; @@ -483,7 +483,7 @@ void __cdecl TownStory() TownCtrlMsg(i); } -void __cdecl TownDrunk() +void TownDrunk() { int i; @@ -491,7 +491,7 @@ void __cdecl TownDrunk() TownCtrlMsg(i); } -void __cdecl TownBoy() +void TownBoy() { int i; @@ -499,7 +499,7 @@ void __cdecl TownBoy() TownCtrlMsg(i); } -void __cdecl TownWitch() +void TownWitch() { int i; @@ -507,7 +507,7 @@ void __cdecl TownWitch() TownCtrlMsg(i); } -void __cdecl TownBarMaid() +void TownBarMaid() { int i; @@ -515,7 +515,7 @@ void __cdecl TownBarMaid() TownCtrlMsg(i); } -void __cdecl TownCow() +void TownCow() { int i; @@ -523,7 +523,7 @@ void __cdecl TownCow() TownCtrlMsg(i); } -void __cdecl ProcessTowners() +void ProcessTowners() { int i, ao; @@ -581,7 +581,7 @@ void __cdecl ProcessTowners() } } -ItemStruct *__fastcall PlrHasItem(int pnum, int item, int *inv_item_num) +ItemStruct *PlrHasItem(int pnum, int item, int *inv_item_num) { int i; @@ -593,7 +593,7 @@ ItemStruct *__fastcall PlrHasItem(int pnum, int item, int *inv_item_num) return NULL; } -void __fastcall TownerTalk(int t) +void TownerTalk(int t) { sgdwCowClicks = 0; sgnCowMsg = 0; @@ -602,7 +602,7 @@ void __fastcall TownerTalk(int t) } // 6AAC18: using guessed type int storeflag; -void __fastcall TalkToTowner(int p, int t) +void TalkToTowner(int p, int t) { int v2; // ebx int v3; // edi @@ -1013,7 +1013,7 @@ LABEL_86: // 679660: using guessed type char gbMaxPlayers; // 6AAC18: using guessed type int storeflag; -void __fastcall CowSFX(int pnum) +void CowSFX(int pnum) { if (CowPlaying == -1 || !effect_is_playing(CowPlaying)) { sgdwCowClicks++; diff --git a/Source/towners.h b/Source/towners.h index 13d33155..bb7074c7 100644 --- a/Source/towners.h +++ b/Source/towners.h @@ -4,39 +4,39 @@ extern TownerStruct towner[16]; -int __fastcall GetActiveTowner(int t); -void __fastcall SetTownerGPtrs(BYTE *pData, BYTE **pAnim); /* unsigned char *+** */ -void __fastcall NewTownerAnim(int tnum, unsigned char *pAnim, int numFrames, int Delay); -void __fastcall InitTownerInfo(int i, int w, int sel, int t, int x, int y, int ao, int tp); -void __fastcall InitQstSnds(int i); -void __cdecl InitSmith(); -void __cdecl InitBarOwner(); -void __cdecl InitTownDead(); -void __cdecl InitWitch(); -void __cdecl InitBarmaid(); -void __cdecl InitBoy(); -void __cdecl InitHealer(); -void __cdecl InitTeller(); -void __cdecl InitDrunk(); -void __cdecl InitCows(); -void __cdecl InitTowners(); -void __cdecl FreeTownerGFX(); -void __fastcall TownCtrlMsg(int i); -void __cdecl TownBlackSmith(); -void __cdecl TownBarOwner(); -void __cdecl TownDead(); -void __cdecl TownHealer(); -void __cdecl TownStory(); -void __cdecl TownDrunk(); -void __cdecl TownBoy(); -void __cdecl TownWitch(); -void __cdecl TownBarMaid(); -void __cdecl TownCow(); -void __cdecl ProcessTowners(); -ItemStruct *__fastcall PlrHasItem(int pnum, int item, int *i); -void __fastcall TownerTalk(int t); -void __fastcall TalkToTowner(int p, int t); -void __fastcall CowSFX(int pnum); +int GetActiveTowner(int t); +void SetTownerGPtrs(BYTE *pData, BYTE **pAnim); /* unsigned char *+** */ +void NewTownerAnim(int tnum, unsigned char *pAnim, int numFrames, int Delay); +void InitTownerInfo(int i, int w, int sel, int t, int x, int y, int ao, int tp); +void InitQstSnds(int i); +void InitSmith(); +void InitBarOwner(); +void InitTownDead(); +void InitWitch(); +void InitBarmaid(); +void InitBoy(); +void InitHealer(); +void InitTeller(); +void InitDrunk(); +void InitCows(); +void InitTowners(); +void FreeTownerGFX(); +void TownCtrlMsg(int i); +void TownBlackSmith(); +void TownBarOwner(); +void TownDead(); +void TownHealer(); +void TownStory(); +void TownDrunk(); +void TownBoy(); +void TownWitch(); +void TownBarMaid(); +void TownCow(); +void ProcessTowners(); +ItemStruct *PlrHasItem(int pnum, int item, int *i); +void TownerTalk(int t); +void TalkToTowner(int p, int t); +void CowSFX(int pnum); /* data */ diff --git a/Source/track.cpp b/Source/track.cpp index ae035e04..fc02a7a9 100644 --- a/Source/track.cpp +++ b/Source/track.cpp @@ -6,7 +6,7 @@ static BYTE sgbIsScrolling; static DWORD sgdwLastWalk; static BOOL sgbIsWalking; -void __cdecl track_process() +void track_process() { if (!sgbIsWalking) return; @@ -28,7 +28,7 @@ void __cdecl track_process() } } -void __fastcall track_repeat_walk(BOOL rep) +void track_repeat_walk(BOOL rep) { if (sgbIsWalking == rep) return; @@ -43,7 +43,7 @@ void __fastcall track_repeat_walk(BOOL rep) } } -BOOL __cdecl track_isscrolling() +BOOL track_isscrolling() { return sgbIsScrolling; } diff --git a/Source/track.h b/Source/track.h index 3b127a16..a2a2506c 100644 --- a/Source/track.h +++ b/Source/track.h @@ -2,8 +2,8 @@ #ifndef __TRACK_H__ #define __TRACK_H__ -void __cdecl track_process(); -void __fastcall track_repeat_walk(BOOL rep); -BOOL __cdecl track_isscrolling(); +void track_process(); +void track_repeat_walk(BOOL rep); +BOOL track_isscrolling(); #endif /* __TRACK_H__ */ diff --git a/Source/trigs.cpp b/Source/trigs.cpp index ed27c7d5..a99706b8 100644 --- a/Source/trigs.cpp +++ b/Source/trigs.cpp @@ -85,13 +85,13 @@ int L4PentaList[33] = { -1 }; -void __cdecl InitNoTriggers() +void InitNoTriggers() { trigflag[4] = 0; trigflag[3] = 0; } -void __cdecl InitTownTriggers() +void InitTownTriggers() { char v0; // bl int v1; // eax @@ -152,7 +152,7 @@ void __cdecl InitTownTriggers() } // 679660: using guessed type char gbMaxPlayers; -void __cdecl InitL1Triggers() +void InitL1Triggers() { int j, i; int *_tmsg, *_ty, *_tx; @@ -188,7 +188,7 @@ void __cdecl InitL1Triggers() trigflag[3] = 0; } -void __cdecl InitL2Triggers() +void InitL2Triggers() { signed int v0; // edi int *v1; // esi @@ -252,7 +252,7 @@ void __cdecl InitL2Triggers() trigflag[3] = 0; } -void __cdecl InitL3Triggers() +void InitL3Triggers() { int v0; // edi signed int v1; // esi @@ -308,7 +308,7 @@ void __cdecl InitL3Triggers() trigflag[3] = 0; } -void __cdecl InitL4Triggers() +void InitL4Triggers() { signed int v0; // edi int *v1; // esi @@ -395,7 +395,7 @@ void __cdecl InitL4Triggers() trigflag[3] = 0; } -void __cdecl InitSKingTriggers() +void InitSKingTriggers() { trigflag[3] = 0; trigflag[4] = 1; @@ -404,7 +404,7 @@ void __cdecl InitSKingTriggers() trigs[0]._tmsg = WM_DIABRTNLVL; } -void __cdecl InitSChambTriggers() +void InitSChambTriggers() { trigflag[3] = 0; trigflag[4] = 1; @@ -413,7 +413,7 @@ void __cdecl InitSChambTriggers() trigs[0]._tmsg = WM_DIABRTNLVL; } -void __cdecl InitPWaterTriggers() +void InitPWaterTriggers() { trigflag[3] = 0; trigflag[4] = 1; @@ -422,7 +422,7 @@ void __cdecl InitPWaterTriggers() trigs[0]._tmsg = WM_DIABRTNLVL; } -void __cdecl InitVPTriggers() +void InitVPTriggers() { trigflag[3] = 0; trigflag[4] = 1; @@ -431,7 +431,7 @@ void __cdecl InitVPTriggers() trigs[0]._tmsg = WM_DIABRTNLVL; } -BOOL __cdecl ForceTownTrig() +BOOL ForceTownTrig() { int i, j, k, l; @@ -480,7 +480,7 @@ BOOL __cdecl ForceTownTrig() return FALSE; } -unsigned char __cdecl ForceL1Trig() +unsigned char ForceL1Trig() { int *v0; // eax int *v1; // esi @@ -552,7 +552,7 @@ unsigned char __cdecl ForceL1Trig() return 1; } -unsigned char __cdecl ForceL2Trig() +unsigned char ForceL2Trig() { int *v0; // eax int *v1; // ebp @@ -674,7 +674,7 @@ LABEL_37: return 1; } -unsigned char __cdecl ForceL3Trig() +unsigned char ForceL3Trig() { int *v0; // eax int *v1; // esi @@ -794,7 +794,7 @@ LABEL_19: return 0; } -unsigned char __cdecl ForceL4Trig() +unsigned char ForceL4Trig() { int *v0; // eax int *v1; // esi @@ -942,7 +942,7 @@ LABEL_17: return 0; } -void __cdecl Freeupstairs() +void Freeupstairs() { int i, yy, xx, tx, ty; @@ -958,7 +958,7 @@ void __cdecl Freeupstairs() } } -BOOL __cdecl ForceSKingTrig() +BOOL ForceSKingTrig() { int i; @@ -975,7 +975,7 @@ BOOL __cdecl ForceSKingTrig() return FALSE; } -BOOL __cdecl ForceSChambTrig() +BOOL ForceSChambTrig() { int i; @@ -992,7 +992,7 @@ BOOL __cdecl ForceSChambTrig() return FALSE; } -BOOL __cdecl ForcePWaterTrig() +BOOL ForcePWaterTrig() { int i; @@ -1009,7 +1009,7 @@ BOOL __cdecl ForcePWaterTrig() return FALSE; } -void __cdecl CheckTrigForce() +void CheckTrigForce() { int v0; // eax int v1; // eax @@ -1072,7 +1072,7 @@ void __cdecl CheckTrigForce() } // 5CF31D: using guessed type char setlevel; -void __cdecl CheckTriggers() +void CheckTriggers() { int *v0; // edi int v1; // esi diff --git a/Source/trigs.h b/Source/trigs.h index e6630fe8..04057501 100644 --- a/Source/trigs.h +++ b/Source/trigs.h @@ -6,27 +6,27 @@ extern int trigflag[MAXTRIGGERS]; extern TriggerStruct trigs[MAXTRIGGERS]; extern int TWarpFrom; // weak -void __cdecl InitNoTriggers(); -void __cdecl InitTownTriggers(); -void __cdecl InitL1Triggers(); -void __cdecl InitL2Triggers(); -void __cdecl InitL3Triggers(); -void __cdecl InitL4Triggers(); -void __cdecl InitSKingTriggers(); -void __cdecl InitSChambTriggers(); -void __cdecl InitPWaterTriggers(); -void __cdecl InitVPTriggers(); -BOOL __cdecl ForceTownTrig(); -unsigned char __cdecl ForceL1Trig(); -unsigned char __cdecl ForceL2Trig(); -unsigned char __cdecl ForceL3Trig(); -unsigned char __cdecl ForceL4Trig(); -void __cdecl Freeupstairs(); -BOOL __cdecl ForceSKingTrig(); -BOOL __cdecl ForceSChambTrig(); -BOOL __cdecl ForcePWaterTrig(); -void __cdecl CheckTrigForce(); -void __cdecl CheckTriggers(); +void InitNoTriggers(); +void InitTownTriggers(); +void InitL1Triggers(); +void InitL2Triggers(); +void InitL3Triggers(); +void InitL4Triggers(); +void InitSKingTriggers(); +void InitSChambTriggers(); +void InitPWaterTriggers(); +void InitVPTriggers(); +BOOL ForceTownTrig(); +unsigned char ForceL1Trig(); +unsigned char ForceL2Trig(); +unsigned char ForceL3Trig(); +unsigned char ForceL4Trig(); +void Freeupstairs(); +BOOL ForceSKingTrig(); +BOOL ForceSChambTrig(); +BOOL ForcePWaterTrig(); +void CheckTrigForce(); +void CheckTriggers(); /* rdata */ diff --git a/Source/wave.cpp b/Source/wave.cpp index 55ddb524..2dbde315 100644 --- a/Source/wave.cpp +++ b/Source/wave.cpp @@ -2,12 +2,12 @@ #include "../types.h" -BOOL __fastcall WCloseFile(HANDLE file) +BOOL WCloseFile(HANDLE file) { return SFileCloseFile(file); } -LONG __fastcall WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh) +LONG WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh) { unsigned int retry = 0; LONG ret; @@ -18,7 +18,7 @@ LONG __fastcall WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh) return ret; } -void __fastcall WGetFileArchive(HANDLE hsFile, unsigned int *retries, const char *FileName) +void WGetFileArchive(HANDLE hsFile, unsigned int *retries, const char *FileName) { HANDLE archive; @@ -32,7 +32,7 @@ void __fastcall WGetFileArchive(HANDLE hsFile, unsigned int *retries, const char FileErrDlg(FileName); } -BOOL __fastcall WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist) +BOOL WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist) { unsigned int retry = 0; @@ -46,7 +46,7 @@ BOOL __fastcall WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExis return FALSE; } -void __fastcall WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read) +void WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read) { unsigned int retry = 0; DWORD readed; @@ -58,7 +58,7 @@ void __fastcall WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read) } } -int __fastcall WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence) +int WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence) { unsigned int retry = 0; int result; @@ -72,7 +72,7 @@ int __fastcall WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whenc return result; } -BOOL __fastcall LoadWaveFormat(HANDLE hsFile, WAVEFORMATEX *pwfx) +BOOL LoadWaveFormat(HANDLE hsFile, WAVEFORMATEX *pwfx) { BOOL ret; MEMFILE wave_file; @@ -83,7 +83,7 @@ BOOL __fastcall LoadWaveFormat(HANDLE hsFile, WAVEFORMATEX *pwfx) return ret; } -void *__fastcall AllocateMemFile(HANDLE hsFile, MEMFILE *pMemFile, DWORD dwPos) +void *AllocateMemFile(HANDLE hsFile, MEMFILE *pMemFile, DWORD dwPos) { DWORD length; @@ -101,14 +101,14 @@ void *__fastcall AllocateMemFile(HANDLE hsFile, MEMFILE *pMemFile, DWORD dwPos) return pMemFile->buf; } -void __fastcall FreeMemFile(MEMFILE *pMemFile) +void FreeMemFile(MEMFILE *pMemFile) { void *mem = pMemFile->buf; pMemFile->buf = NULL; mem_free_dbg(mem); } -BOOL __fastcall ReadWaveFile(MEMFILE *pMemFile, WAVEFORMATEX *pwfx, CKINFO *chunk) +BOOL ReadWaveFile(MEMFILE *pMemFile, WAVEFORMATEX *pwfx, CKINFO *chunk) { MMCKINFO hdr; CKINFO fmt; @@ -139,7 +139,7 @@ BOOL __fastcall ReadWaveFile(MEMFILE *pMemFile, WAVEFORMATEX *pwfx, CKINFO *chun return ReadWaveSection(pMemFile, MAKEFOURCC('d', 'a', 't', 'a'), chunk); } -BOOL __fastcall ReadMemFile(MEMFILE *pMemFile, void *lpBuf, size_t length) +BOOL ReadMemFile(MEMFILE *pMemFile, void *lpBuf, size_t length) { while (length) { size_t to_copy; @@ -160,7 +160,7 @@ BOOL __fastcall ReadMemFile(MEMFILE *pMemFile, void *lpBuf, size_t length) return TRUE; } -void __fastcall FillMemFile(MEMFILE *pMemFile) +void FillMemFile(MEMFILE *pMemFile) { DWORD to_read; WSetFilePointer(pMemFile->file, pMemFile->offset, NULL, FILE_BEGIN); @@ -173,7 +173,7 @@ void __fastcall FillMemFile(MEMFILE *pMemFile) pMemFile->bytes_to_read = to_read; } -int __fastcall SeekMemFile(MEMFILE *pMemFile, ULONG lDist, DWORD dwMethod) +int SeekMemFile(MEMFILE *pMemFile, ULONG lDist, DWORD dwMethod) { if (lDist < pMemFile->bytes_to_read) { pMemFile->bytes_to_read -= lDist; @@ -184,7 +184,7 @@ int __fastcall SeekMemFile(MEMFILE *pMemFile, ULONG lDist, DWORD dwMethod) return pMemFile->offset; } -BOOL __fastcall ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk) +BOOL ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk) { DWORD hdr[2]; @@ -202,7 +202,7 @@ BOOL __fastcall ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk) return chunk->dwOffset != (DWORD)-1; } -BYTE *__fastcall LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk) +BYTE *LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk) { MEMFILE wave_file; diff --git a/Source/wave.h b/Source/wave.h index b38e04d7..95c34822 100644 --- a/Source/wave.h +++ b/Source/wave.h @@ -2,20 +2,20 @@ #ifndef __WAVE_H__ #define __WAVE_H__ -BOOL __fastcall WCloseFile(HANDLE file); -LONG __fastcall WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh); -void __fastcall WGetFileArchive(HANDLE hsFile, unsigned int *retry, const char *FileName); -BOOL __fastcall WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist); -void __fastcall WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read); -int __fastcall WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence); -BOOL __fastcall LoadWaveFormat(HANDLE hsFile, WAVEFORMATEX *pwfx); -void *__fastcall AllocateMemFile(HANDLE hsFile, MEMFILE *pMemFile, DWORD dwPos); -void __fastcall FreeMemFile(MEMFILE *pMemFile); -BOOL __fastcall ReadWaveFile(MEMFILE *pMemFile, WAVEFORMATEX *pwfx, CKINFO *chunk); -BOOL __fastcall ReadMemFile(MEMFILE *pMemFile, void *lpBuf, size_t length); -void __fastcall FillMemFile(MEMFILE *pMemFile); -int __fastcall SeekMemFile(MEMFILE *pMemFile, ULONG lDist, DWORD dwMethod); -BOOL __fastcall ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk); -BYTE *__fastcall LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk); +BOOL WCloseFile(HANDLE file); +LONG WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh); +void WGetFileArchive(HANDLE hsFile, unsigned int *retry, const char *FileName); +BOOL WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist); +void WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read); +int WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence); +BOOL LoadWaveFormat(HANDLE hsFile, WAVEFORMATEX *pwfx); +void *AllocateMemFile(HANDLE hsFile, MEMFILE *pMemFile, DWORD dwPos); +void FreeMemFile(MEMFILE *pMemFile); +BOOL ReadWaveFile(MEMFILE *pMemFile, WAVEFORMATEX *pwfx, CKINFO *chunk); +BOOL ReadMemFile(MEMFILE *pMemFile, void *lpBuf, size_t length); +void FillMemFile(MEMFILE *pMemFile); +int SeekMemFile(MEMFILE *pMemFile, ULONG lDist, DWORD dwMethod); +BOOL ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk); +BYTE *LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk); #endif /* __WAVE_H__ */ diff --git a/structs.h b/structs.h index c7be0bb7..d2558247 100644 --- a/structs.h +++ b/structs.h @@ -359,8 +359,8 @@ typedef struct TextDataStruct { typedef struct MissileData { unsigned char mName; - void(__fastcall *mAddProc)(int, int, int, int, int, int, char, int, int); - void(__fastcall *mProc)(int); + void(* mAddProc)(int, int, int, int, int, int, char, int, int); + void(* mProc)(int); BOOL mDraw; unsigned char mType; unsigned char mResist; @@ -991,7 +991,7 @@ typedef struct QuestData { typedef struct TMenuItem { unsigned int dwFlags; char *pszStr; - void(__fastcall *fnMenu)(BOOL); /* fix, should have one arg */ + void(* fnMenu)(BOOL); /* fix, should have one arg */ } TMenuItem; // TPDEF PTR FCN VOID TMenuUpdateFcn @@ -1301,21 +1301,21 @@ typedef struct _SNETUIDATA { int size; int uiflags; HWND parentwindow; - void(__cdecl *artcallback)(); - void(__cdecl *authcallback)(); - void(__cdecl *createcallback)(); - void(__cdecl *drawdesccallback)(); - void(__cdecl *selectedcallback)(); - void(__cdecl *messageboxcallback)(); - void(__cdecl *soundcallback)(); - void(__cdecl *statuscallback)(); - void(__cdecl *getdatacallback)(); - void(__cdecl *categorycallback)(); - void(__cdecl *categorylistcallback)(); - void(__cdecl *newaccountcallback)(); - void(__cdecl *profilecallback)(); + void(* artcallback)(); + void(* authcallback)(); + void(* createcallback)(); + void(* drawdesccallback)(); + void(* selectedcallback)(); + void(* messageboxcallback)(); + void(* soundcallback)(); + void(* statuscallback)(); + void(* getdatacallback)(); + void(* categorycallback)(); + void(* categorylistcallback)(); + void(* newaccountcallback)(); + void(* profilecallback)(); int profilefields; - void(__cdecl *profilebitmapcallback)(); + void(* profilebitmapcallback)(); int(__stdcall *selectnamecallback)( const struct _SNETPROGRAMDATA *, const struct _SNETPLAYERDATA *, @@ -1326,7 +1326,7 @@ typedef struct _SNETUIDATA { char *, DWORD, /* character "description" will be copied here (used to advertise games) */ BOOL * /* new character? - unsure about this */ ); - void(__cdecl *changenamecallback)(); + void(* changenamecallback)(); } _SNETUIDATA; typedef struct _SNETVERSIONDATA {