Cleanup default calling conventions

This commit is contained in:
galaxyhaxz
2019-04-09 12:04:00 +02:00
committed by Anders Jenbo
parent 1b66199f02
commit 4e01e03711
142 changed files with 3861 additions and 3861 deletions
+9 -9
View File
@@ -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)
{
+8 -8
View File
@@ -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,
+13 -13
View File
@@ -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);
+2 -2
View File
@@ -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,
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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)
+7 -7
View File
@@ -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
+19 -19
View File
@@ -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();
+19 -19
View File
@@ -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__ */
+16 -16
View File
@@ -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;
+16 -16
View File
@@ -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__ */
+7 -7
View File
@@ -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;
+7 -7
View File
@@ -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__ */
+4 -4
View File
@@ -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
+4 -4
View File
@@ -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__ */
+64 -64
View File
@@ -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
+65 -65
View File
@@ -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];
+9 -9
View File
@@ -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
+9 -9
View File
@@ -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];
+3 -3
View File
@@ -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;
+3 -3
View File
@@ -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__ */
+14 -14
View File
@@ -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]
+14 -14
View File
@@ -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__ */
+30 -30
View File
@@ -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
+31 -31
View File
@@ -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 */
+9 -9
View File
@@ -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;
+9 -9
View File
@@ -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__ */
+38 -38
View File
@@ -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
+38 -38
View File
@@ -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];
+35 -35
View File
@@ -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
+35 -35
View File
@@ -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
+34 -34
View File
@@ -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;
+34 -34
View File
@@ -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];
+35 -35
View File
@@ -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;
+35 -35
View File
@@ -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];
+6 -6
View File
@@ -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;
+6 -6
View File
@@ -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
+12 -12
View File
@@ -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;
+13 -13
View File
@@ -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 */
+18 -18
View File
@@ -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);
}
+18 -18
View File
@@ -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 */
+6 -6
View File
@@ -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;
+6 -6
View File
@@ -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__ */
+51 -51
View File
@@ -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);
+51 -51
View File
@@ -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 */
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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];
+10 -10
View File
@@ -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;
}
+9 -9
View File
@@ -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__ */
+24 -24
View File
@@ -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];
+23 -23
View File
@@ -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[];
+22 -22
View File
@@ -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;
+22 -22
View File
@@ -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__ */
+22 -22
View File
@@ -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;
}
+21 -21
View File
@@ -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 */
+6 -6
View File
@@ -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;
+6 -6
View File
@@ -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[];
+15 -15
View File
@@ -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
+15 -15
View File
@@ -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
+7 -7
View File
@@ -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);
+7 -7
View File
@@ -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 */
+40 -40
View File
@@ -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);
+40 -40
View File
@@ -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 */
+111 -111
View File
@@ -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
+111 -111
View File
@@ -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 */
+26 -26
View File
@@ -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;
+26 -26
View File
@@ -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 */
+32 -32
View File
@@ -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;
+32 -32
View File
@@ -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__ */
+6 -6
View File
@@ -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]
+6 -6
View File
@@ -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 */
+6 -6
View File
@@ -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);
+6 -6
View File
@@ -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 */
+6 -6
View File
@@ -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
+6 -6
View File
@@ -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 */
+133 -133
View File
File diff suppressed because it is too large Load Diff
+133 -133
View File
@@ -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 */
+147 -147
View File
File diff suppressed because it is too large Load Diff
+146 -146
View File
@@ -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__ */
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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 */
+27 -27
View File
@@ -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
+28 -28
View File
@@ -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 */
+135 -135
View File
File diff suppressed because it is too large Load Diff
+135 -135
View File
@@ -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__ */
+14 -14
View File
@@ -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
+14 -14
View File
@@ -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 */
+46 -46
View File
@@ -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
+35 -35
View File
@@ -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 */
+10 -10
View File
@@ -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
+10 -10
View File
@@ -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 */
+131 -131
View File
File diff suppressed because it is too large Load Diff
+131 -131
View File
@@ -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 */
+5 -5
View File
@@ -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;
+5 -5
View File
@@ -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 */
+20 -20
View File
@@ -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;
}
+20 -20
View File
@@ -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 */
+14 -14
View File
@@ -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;
+14 -14
View File
@@ -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 */
+29 -29
View File
@@ -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;

Some files were not shown because too many files have changed in this diff Show More