diff --git a/3rdParty/Storm/Source/Storm.dsp b/3rdParty/Storm/Source/Storm.dsp index 449861f7b..1e7bb6d83 100644 --- a/3rdParty/Storm/Source/Storm.dsp +++ b/3rdParty/Storm/Source/Storm.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="Storm" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 @@ -22,6 +22,7 @@ CFG=Storm - Win32 Debug !MESSAGE # Begin Project +# PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe @@ -42,8 +43,8 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /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 /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# 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" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -67,8 +68,8 @@ LINK32=link.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /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 /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# 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" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe diff --git a/3rdParty/Storm/Source/storm.cpp b/3rdParty/Storm/Source/storm.cpp index 2802af22a..0c70745f7 100644 --- a/3rdParty/Storm/Source/storm.cpp +++ b/3rdParty/Storm/Source/storm.cpp @@ -236,3 +236,9 @@ bool __stdcall SNetSetBasePlayer(int) rBool; int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *) rInt; int __stdcall SNetGetProviderCaps(struct _SNETCAPS *) rInt; int __stdcall SFileSetFilePointer(HANDLE,int,HANDLE,int) rInt; +void __stdcall SDrawClearSurface(int a1) rVoid; +BOOL __stdcall SDlgSetBitmapI(HWND hWnd, int a2, char *src, int mask1, int flags, void *pBuff, int a7, int width, int height, int mask2) rBool; +void __stdcall SDlgBeginPaint(HWND hWnd, char *a2) rVoid; +void __stdcall SDlgEndPaint(HWND hWnd, char *a2) rVoid; +void __stdcall SDlgSetSystemCursor(BYTE *a1, BYTE *a2, int *a3, int a4) rVoid; +void __stdcall SDlgSetCursor(HWND hWnd, HCURSOR a2, int a3, int *a4) rVoid; diff --git a/3rdParty/Storm/Source/storm.def b/3rdParty/Storm/Source/storm.def index fde2f7b9a..99c8783b4 100644 --- a/3rdParty/Storm/Source/storm.def +++ b/3rdParty/Storm/Source/storm.def @@ -51,7 +51,7 @@ EXPORTS ;Ordinal150 @150 NONAME ;Ordinal151 @151 NONAME - ;SDlgBeginPaint @201 NONAME + SDlgBeginPaint @201 NONAME ;SDlgBltToWindowI @202 NONAME ;SDlgCheckTimers @203 NONAME ;SDlgCreateDialogIndirectParam @204 NONAME @@ -62,13 +62,13 @@ EXPORTS ;SDlgDialogBoxParam @209 NONAME ;SDlgDrawBitmap @210 NONAME SDlgEndDialog @211 NONAME - ;SDlgEndPaint @212 NONAME + SDlgEndPaint @212 NONAME ;SDlgKillTimer @213 NONAME ;SDlgSetBaseFont @214 NONAME - ;SDlgSetBitmapI @215 NONAME + SDlgSetBitmapI @215 NONAME SDlgSetControlBitmaps @216 NONAME - ;SDlgSetCursor @217 NONAME - ;SDlgSetSystemCursor @218 NONAME + SDlgSetCursor @217 NONAME + SDlgSetSystemCursor @218 NONAME ;SDlgSetTimer @219 NONAME ;SDlgUpdateCursor @220 NONAME SDlgBltToWindowE @221 NONAME @@ -151,7 +151,7 @@ EXPORTS SDrawAutoInitialize @341 NONAME SDrawCaptureScreen @342 NONAME - ;SDrawClearSurface @343 NONAME + SDrawClearSurface @343 NONAME SDrawDestroy @344 NONAME ;SDrawFlipPage @345 NONAME SDrawGetFrameWindow @346 NONAME diff --git a/3rdParty/Storm/Source/storm.h b/3rdParty/Storm/Source/storm.h index 541b410f3..7a8ab5edc 100644 --- a/3rdParty/Storm/Source/storm.h +++ b/3rdParty/Storm/Source/storm.h @@ -1299,6 +1299,12 @@ bool __stdcall SNetSetBasePlayer(int); int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *); int __stdcall SNetGetProviderCaps(struct _SNETCAPS *); int __stdcall SFileSetFilePointer(HANDLE,int,HANDLE,int); +void __stdcall SDrawClearSurface(int a1); +BOOL __stdcall SDlgSetBitmapI(HWND hWnd, int a2, char *src, int mask1, int flags, void *pBuff, int a7, int width, int height, int mask2); +void __stdcall SDlgBeginPaint(HWND hWnd, char *a2); +void __stdcall SDlgEndPaint(HWND hWnd, char *a2); +void __stdcall SDlgSetSystemCursor(BYTE *a1, BYTE *a2, int *a3, int a4); +void __stdcall SDlgSetCursor(HWND hWnd, HCURSOR a2, int a3, int *a4); #ifdef __GNUC__ } diff --git a/3rdParty/Storm/Source/storm_gcc.def b/3rdParty/Storm/Source/storm_gcc.def index d6b10a925..669cdc6b4 100644 --- a/3rdParty/Storm/Source/storm_gcc.def +++ b/3rdParty/Storm/Source/storm_gcc.def @@ -69,7 +69,8 @@ EXPORTS ;Ordinal150 @150 NONAME ;Ordinal151 @151 NONAME - ;SDlgBeginPaint @201 NONAME + SDlgBeginPaint @201 NONAME + SDlgBeginPaint@8 @201 NONAME ;SDlgBltToWindowI @202 NONAME ;SDlgCheckTimers @203 NONAME ;SDlgCreateDialogIndirectParam @204 NONAME @@ -80,13 +81,17 @@ EXPORTS ;SDlgDialogBoxParam @209 NONAME ;SDlgDrawBitmap @210 NONAME SDlgEndDialog @211 NONAME - ;SDlgEndPaint @212 NONAME + SDlgEndPaint @212 NONAME + SDlgEndPaint@8 @212 NONAME ;SDlgKillTimer @213 NONAME ;SDlgSetBaseFont @214 NONAME - ;SDlgSetBitmapI @215 NONAME + SDlgSetBitmapI @215 NONAME + SDlgSetBitmapI@40 @215 NONAME SDlgSetControlBitmaps @216 NONAME - ;SDlgSetCursor @217 NONAME - ;SDlgSetSystemCursor @218 NONAME + SDlgSetCursor @217 NONAME + SDlgSetCursor@16 @217 NONAME + SDlgSetSystemCursor @218 NONAME + SDlgSetSystemCursor@16 @218 NONAME ;SDlgSetTimer @219 NONAME ;SDlgUpdateCursor @220 NONAME SDlgBltToWindowE @221 NONAME @@ -185,7 +190,8 @@ EXPORTS SDrawAutoInitialize @341 NONAME SDrawCaptureScreen @342 NONAME - ;SDrawClearSurface @343 NONAME + SDrawClearSurface @343 NONAME + SDrawClearSurface@0 @343 NONAME SDrawDestroy @344 NONAME ;SDrawFlipPage @345 NONAME SDrawGetFrameWindow @346 NONAME diff --git a/Diablo.dsp b/Diablo.dsp index 9b84140fa..f40504738 100644 --- a/Diablo.dsp +++ b/Diablo.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="Diablo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 @@ -22,6 +22,7 @@ CFG=Diablo - Win32 Debug !MESSAGE # Begin Project +# PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe @@ -42,8 +43,8 @@ RSC=rc.exe # 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 /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# 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" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -67,8 +68,8 @@ LINK32=link.exe # 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 /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# 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" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe diff --git a/Diablo.dsw b/Diablo.dsw index 014f0ec0a..8bf0b9f14 100644 --- a/Diablo.dsw +++ b/Diablo.dsw @@ -1,4 +1,4 @@ -Microsoft Developer Studio Workspace File, Format Version 5.00 +Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### @@ -29,6 +29,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name Storm + End Project Dependency }}} ############################################################################### diff --git a/DiabloUI/DiabloUI.dsp b/DiabloUI/DiabloUI.dsp index 01c7dc186..01b736b87 100644 --- a/DiabloUI/DiabloUI.dsp +++ b/DiabloUI/DiabloUI.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="DiabloUI" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 @@ -17,12 +17,12 @@ CFG=DiabloUI - Win32 Debug !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "DiabloUI - Win32 Release" (based on\ - "Win32 (x86) Dynamic-Link Library") +!MESSAGE "DiabloUI - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "DiabloUI - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project +# PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe @@ -43,8 +43,8 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /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 /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# 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" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -52,7 +52,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /def:"diabloui.def" +# ADD LINK32 ../3rdParty/Storm/Source/WinRel/Storm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /def:"diabloui.def" !ELSEIF "$(CFG)" == "DiabloUI - Win32 Debug" @@ -68,8 +68,8 @@ LINK32=link.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /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 /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# 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" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -77,7 +77,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:"diabloui.def" /pdbtype:sept +# ADD LINK32 ../3rdParty/Storm/Source/WinDebug/Storm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:"diabloui.def" /pdbtype:sept !ENDIF diff --git a/DiabloUI/DiabloUI.vcxproj b/DiabloUI/DiabloUI.vcxproj index e40bf9ddf..24ab28a38 100644 --- a/DiabloUI/DiabloUI.vcxproj +++ b/DiabloUI/DiabloUI.vcxproj @@ -86,7 +86,7 @@ diabloui.def .\WinRel\DiabloUI.dll .\WinRel\DiabloUI.lib - odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ../3rdParty/Storm/Source/WinRel/Storm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) @@ -128,7 +128,7 @@ diabloui.def .\WinDebug\DiabloUI.dll .\WinDebug\DiabloUI.lib - odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ../3rdParty/Storm/Source/WinDebug/Storm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) @@ -143,4 +143,4 @@ - \ No newline at end of file + diff --git a/DiabloUI/_temp_data.cpp b/DiabloUI/_temp_data.cpp new file mode 100644 index 000000000..1836695f0 --- /dev/null +++ b/DiabloUI/_temp_data.cpp @@ -0,0 +1,352 @@ +#define _UNKNOWN DWORD + +char *off_1001F378 = "profile\\sex"; // weak +char byte_1001F37C[] = { '\x01' }; // weak +int dword_1001F380[] = { 1128 }; // weak +int dword_1001F384[] = { 8 }; // weak +_UNKNOWN unk_1001F3B8; // weak +_UNKNOWN unk_1001F3BC; // weak +_UNKNOWN unk_1001F3D0; // weak +int dword_10022258 = 4; // weak +int dword_10022260[] = { 8 }; // weak +char *off_10022264 = "Arial"; // weak +int dword_10022268[] = { 400 }; // weak +_UNKNOWN unk_100228DC; // weak +_UNKNOWN unk_100228E8; // weak +_UNKNOWN unk_100228F0; // weak +_UNKNOWN unk_100228F8; // weak +DWORD pdwMsgTbl = 1094u; // idb +short word_10022958[] = { 30 }; // weak +short word_1002295A[] = { 15 }; // weak +short word_1002295C[] = { 20 }; // weak +short word_1002295E[8] = { 30, 25, 20, 30, 20, 15, 35, 25 }; // idb +_UNKNOWN unk_10022A2C; // weak +_UNKNOWN unk_10022A38; // weak +_UNKNOWN unk_10022A40; // weak +_UNKNOWN unk_10022A48; // weak +DWORD dword_10022A54 = 1100u; // idb +_UNKNOWN unk_10022A98; // weak +_UNKNOWN unk_10022AA4; // weak +_UNKNOWN unk_10022AFC; // weak +_UNKNOWN unk_10022B04; // weak +_UNKNOWN unk_10022B10; // weak +_UNKNOWN unk_10022B34; // weak +_UNKNOWN unk_10022B3C; // weak +_UNKNOWN unk_10022B48; // weak +_UNKNOWN unk_10022BE0; // weak +DWORD dword_10022BE8 = 1044u; // idb +_UNKNOWN unk_10022C4C; // weak +_UNKNOWN unk_10022C54; // weak +_UNKNOWN unk_10022C5C; // weak +_UNKNOWN unk_10022CAC; // weak +DWORD dword_10022CB4 = 2u; // idb +_UNKNOWN unk_10022EB4; // weak +_UNKNOWN unk_10022EBC; // weak +DWORD dword_10022EC8 = 1062u; // idb +_UNKNOWN unk_10022ED8; // weak +_UNKNOWN unk_10022EE4; // weak +_UNKNOWN unk_10022EF0; // weak +_UNKNOWN unk_10022F00; // weak +_UNKNOWN unk_10022F08; // weak +int dword_10022F18 = 1069; // weak +char *off_10022F8C[4] = { "Entry1", "Entry2", "Entry3", "Entry4" }; // weak +char *off_10022F90[3] = { "Entry2", "Entry3", "Entry4" }; // weak +_UNKNOWN unk_10022F9C; // weak +_UNKNOWN unk_10022FA4; // weak +DWORD dword_10022FB0 = 1117u; // idb +_UNKNOWN unk_10023000; // weak +_UNKNOWN unk_10023008; // weak +_UNKNOWN unk_10023020; // weak +_UNKNOWN unk_100230F0; // weak +_UNKNOWN unk_100230FC; // weak +_UNKNOWN unk_10023104; // weak +_UNKNOWN unk_1002310C; // weak +int dword_10023118 = 1088; // weak +_UNKNOWN unk_10023174; // weak +_UNKNOWN unk_1002317C; // weak +_UNKNOWN unk_10023188; // weak +int dword_10023190 = 1047; // weak +_UNKNOWN unk_100231AC; // weak +_UNKNOWN unk_100231B4; // weak +DWORD dword_100231C0 = 1106u; // idb +_UNKNOWN unk_100231CC; // weak +_UNKNOWN unk_100231D4; // weak +_UNKNOWN unk_100231E0; // weak +_UNKNOWN unk_100231E8; // weak +int dword_100231F4 = 1110; // weak +_UNKNOWN unk_10023244; // weak +_UNKNOWN unk_10023250; // weak +_UNKNOWN unk_10023258; // weak +_UNKNOWN unk_10023260; // weak +int dword_1002326C = 1135; // weak +_UNKNOWN unk_100232D4; // weak +DWORD dword_100232DC = 1109u; // idb +_UNKNOWN unk_10023340; // weak +int dword_10026BB0 = 0; // weak +_UNKNOWN unk_10026BB8; // weak +int dword_100270BC; // weak +int dword_100270C0; // weak +_UNKNOWN unk_100270C8; // weak +int dword_100275CC; // weak +_UNKNOWN unk_100275D0; // weak +int dword_10027AD4; // weak +_UNKNOWN unk_10027AD8; // weak +int dword_10027FDC; // weak +_UNKNOWN unk_10027FE0; // weak +int dword_100284E4; // weak +_UNKNOWN unk_100284E8; // weak +int dword_100289EC; // weak +_UNKNOWN unk_100289F0; // weak +int dword_10028EF4; // weak +_UNKNOWN unk_10028EF8; // weak +int dword_100293FC; // weak +LPARAM lParam; // idb +int dword_10029404; // weak +int dword_10029408; // weak +int dword_1002940C; // weak +BYTE *a7; // idb +int dword_10029414; // weak +int dword_10029418; // weak +int dword_1002941C; // weak +HGDIOBJ ho; // idb +HGDIOBJ dword_10029424; // idb +BYTE *buffer2; // idb +void *dword_1002942C; // idb +int (__stdcall *dword_10029430)(_DWORD, _DWORD, _DWORD, _DWORD); // weak +void *location; // idb +int dword_10029438[4]; // idb +char byte_10029448; // idb +HGDIOBJ dword_10029450; // idb +int dword_10029454; // weak +int dword_10029458; // weak +_DWORD dword_10029460[3]; // idb +int dword_1002946C; // weak +HGDIOBJ h; // idb +int dword_10029478; // weak +_UNKNOWN unk_10029480; // weak +int dword_10029488; // weak +int dword_1002948C; // weak +int dword_100294A0; // weak +int dword_100294A4; // weak +DWORD pdwSize; // idb +char byte_100294B0[128]; // idb +_UNKNOWN unk_10029530; // weak +int dword_100295B0; // weak +DWORD dword_100295B8; // idb +int dword_100295BC; // weak +int dword_100295C0; // weak +DWORD dword_100295C8; // idb +int dword_100295CC; // weak +int dword_100295D0; // weak +int dword_100295D4; // weak +BYTE *pBuffer; // idb +BYTE *dword_100295DC; // idb +BYTE *dword_100295E0; // idb +void *dword_100295E4; // idb +int dword_100295E8[10]; // idb +int dword_10029610; // weak +int dword_10029614; // weak +HGLOBAL dword_10029618; // idb +HGLOBAL hResData; // idb +int dword_10029620; // weak +HGLOBAL dword_10029624; // idb +HGDIOBJ dword_10029628; // idb +int dword_1002962C; // weak +int dword_10029630; // weak +int dword_10029634; // weak +int dword_10029638; // weak +int dword_1002963C; // weak +int dword_10029640; // weak +int dword_10029644; // weak +_UNKNOWN unk_10029648; // weak +char byte_1002964C; // weak +HWND dword_10029650; // idb +HWND hWnd; // idb +int dword_10029658; // weak +DWORD dword_10029660; // idb +int dword_10029668; // weak +int dword_1002966C; // weak +char byte_10029670; // idb +char byte_10029690; // weak +BYTE *dword_100296B0; +BYTE *dword_100296B4; // idb +BYTE *dword_100296B8; // idb +int dword_100296BC; // weak +int dword_100296C0; // weak +int dword_100296C4; // weak +int dword_100296C8; // weak +int dword_100296CC; // weak +int dword_100296D0; // weak +int dword_100296D4; // weak +int dword_100296D8; // weak +int dword_100296DC; // weak +int dword_100296E0; // weak +int dword_100296E8; // weak +int dword_100296EC; // weak +HGLOBAL dword_100296F0; // idb +int dword_100296F4; // weak +int dword_100296F8; // weak +int dword_100296FC; // weak +int dword_10029700; // weak +void *a6; // idb +int dword_10029708; // weak +int dword_1002970C; // weak +int dword_10029710; // weak +int dword_10029714; // weak +HINSTANCE hInstance; // idb +int dword_1002971C; // weak +int dword_10029720; // weak +int dword_10029724; // weak +int dword_10029728; // weak +int dword_1002972C; // weak +int dword_10029730; // weak +int dword_10029738; // weak +char byte_1002973C; // idb +char byte_100297BC; // idb +int dword_1002983C; // weak +int dword_10029840; // weak +int dword_10029844; // weak +void *dword_10029848; // idb +int dword_1002984C; // weak +int dword_10029850; // weak +int dword_10029854; // weak +LPSTR lpString; // idb +int dword_1002985C; // weak +int dword_10029860; // weak +LPSTR dword_10029864; // idb +int dword_10029868; // weak +int dword_1002986C; // weak +tagPALETTEENTRY fadepal[256]; +int dword_10029C70; // weak +int dword_10029C78[8]; // idb +int dword_10029C98; // weak +int dword_10029C9C; // weak +int dword_10029CA0; // weak +int dword_10029CA4; // weak +int dword_10029CA8; // weak +int dword_10029CAC; // weak +int dword_10029CB0; // weak +int local_cpp_float; // weak +int gdwCursWidth; // weak +int gdwCursHeight; // weak +tagPALETTEENTRY artpal[256]; +HGDIOBJ objPalette; // idb +BYTE *gpCursorArt; +BYTE *gpCursorArt2; +int dword_1002A0D4; // weak +char byte_1002A0D8; // idb +int dword_1002A118; // weak +int dword_1002A120; // weak +int dword_1002A124; // weak +int dword_1002A128; // weak +int dword_1002A12C; // weak +int dword_1002A130; // weak +int dword_1002A134; // weak +int dword_1002A138; // weak +int dword_1002A13C; // weak +int dword_1002A140; // weak +int dword_1002A144; // weak +int dword_1002A148; // weak +void *dword_1002A14C; // idb +int dword_1002A150; // weak +char byte_1002A154; // idb +char byte_1002A1D4; // idb +int dword_1002A254; // weak +int dword_1002A258; // weak +int dword_1002A25C; // weak +int (*dword_1002A260)(void); // weak +char pszStr; // idb +int dword_1002A2E4; // weak +int dword_1002A2E8; // weak +int dword_1002A2EC; // weak +int dword_1002A2F0; // weak +int (*dword_1002A2F4)(void); // weak +int dword_1002A2F8; // weak +BOOL bEnable; // idb +int dword_1002A300; // weak +int dword_1002A304; // weak +DWORD dword_1002A308; // idb +DWORD dword_1002A310; // idb +BYTE *dword_1002A318; // idb +BYTE *arg0; // idb +BYTE *dword_1002A320; // idb +BYTE *dword_1002A324; // idb +void *dword_1002A328; // idb +int dword_1002A338; // weak +int dword_1002A344; // weak +int dword_1002A348; // weak +int dword_1002A34C; // idb +int dword_1002A350; // weak +int dword_1002A354; // weak +char *dword_1002A358; // idb +int dword_1002A35C; // weak +int dword_1002A360; // idb +int dword_1002A364; // weak +int dword_1002A368; // weak +int dword_1002A36C; // weak +int dword_1002A370; // weak +int dword_1002A374; // weak +char *dword_1002A378; // idb +int dword_1002A37C; // weak +char byte_1002A380[128]; // idb +int dword_1002A400; // weak +int dword_1002A404; // weak +int dword_1002A408; // weak +int (__stdcall *dword_1002A410)(_DWORD, _DWORD); // weak +int dword_1002A414; // weak +DWORD width; // idb +int height; // idb +int dword_1002A420; // weak +int dword_1002A424; // weak +int dword_1002A428; // weak +CHAR byte_1002A42C[8]; // idb +int (__stdcall *dword_1002A434)(_DWORD); // weak +int (__stdcall *dword_1002A438)(_DWORD); // weak +CHAR byte_1002A43C[4]; // idb +char byte_1002A440; // idb +int (UNKCALL *dword_1002A450)(_DWORD, _DWORD); // weak +CHAR byte_1002A454[4]; // idb +int dword_1002A458; // weak +int dword_1002A45C; // weak +_UNKNOWN unk_1002A460; // weak +char byte_1002A464[18]; // idb +char byte_1002A476; // weak +int dword_1002A484; // weak +int dword_1002A48C; // weak +CHAR byte_1002A490[4]; // idb +CHAR byte_1002A494[4]; // idb +BYTE *dword_1002A498; // idb +int dword_1002A49C; // weak +void *dword_1002A4A0; // idb +int dword_1002A4A4; // weak +int dword_1002A4A8; // weak +int dword_1002A4AC; // weak +int dword_1002A4B0; // weak +int dword_1002A4B4; // weak +int dword_1002A4B8; // idb +int dword_1002A4BC; // weak +int dword_1002A4C0; // weak +int dword_1002A4C4; // weak +int dword_1002A4C8; // weak +int dword_1002A4CC; // weak +int dword_1002A4D0; // weak +void *dword_1002A4D4; // idb +int dword_1002A4D8; // idb +int dword_1002A4DC; // weak +int dword_1002A4E0; // weak +int dword_1002A4E4; // weak +int dword_1002A4E8; // weak +int dword_1002A4EC; // weak +int dword_1002A4F0; // weak +int dword_1002A4F4; // idb +LPCSTR dword_1002A4F8; // idb +int dword_1002A4FC; // weak +int dword_1002A500; // weak +int dword_1002A504; // weak +int (*dword_1002A508)(void); // weak +int dword_1002A50C; // weak +int dword_1002A510[30]; // idb +int dword_1002A588; // weak +int dword_1002A58C; // weak +int dword_1002A590; // weak +int (__stdcall *dword_1002A594)(_DWORD); // weak diff --git a/DiabloUI/_temp_funcs.h b/DiabloUI/_temp_funcs.h new file mode 100644 index 000000000..5ebaa8174 --- /dev/null +++ b/DiabloUI/_temp_funcs.h @@ -0,0 +1,614 @@ +void UNKCALL artfont_10001058(char *arg); +int artfont_10001098(); +int artfont_100010C8(); +int UNKCALL artfont_10001120(_DWORD *arg); +signed int artfont_10001159(); +void __fastcall artfont_100011FB(int ecx0, int edx0, const char *a1); +int artfont_100012F6(); +int artfont_10001310(); +int __fastcall artfont_10001329(unsigned char *a1); +signed int artfont_1000136C(); +int __fastcall artfont_10001377(unsigned char *a1); +BOOL __cdecl artfont_100013B3(void *location); +void __fastcall artfont_100013CD(unsigned char *a1, _DWORD *a2, int a3, int a4); + + +signed int bn_prof_100014E8(); +//const char *UiProfileGetString(); +//BOOL __stdcall UiProfileCallback(int a1, int a2, int a3, int a4, LPARAM a5, int a6, int a7, int a8, int (__stdcall *a9)(_DWORD, _DWORD, _DWORD, _DWORD)); +HGDIOBJ __stdcall bn_prof_1000155F(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +void UNKCALL bn_prof_100016DD(HWND arg); +void __fastcall bn_prof_100018CE(int a1, int a2); +int __fastcall bn_prof_10001938(HDC a1, _DWORD *a2, char *a3, int a4, int a5); +int __fastcall bn_prof_10001A10(HWND a1, HWND a2); +HINSTANCE __fastcall bn_prof_10001B0A(HWND a1, const CHAR *a2); +HWND UNKCALL bn_prof_10001C0E(HWND hWnd); +void __fastcall bn_prof_10001CB9(_DWORD *a1, int a2, void (__fastcall *a3)(_BYTE *, _DWORD, int), int a4); +BOOL UNKCALL bn_prof_10001CF3(HWND hWnd); +HFONT __fastcall bn_prof_10001D81(HWND hWnd, int a2, int a3); +void UNKCALL bn_prof_10001E34(void *arg); +void __fastcall bn_prof_10001E4C(char *a1, LPARAM lParam, HWND hDlg); +void __fastcall bn_prof_10001ED0(char *a1, _BYTE *a2, int a3); +void *bn_prof_10001F29(); +BYTE *bn_prof_10001F84(); +//int __stdcall UiProfileDraw(int, int, int, int, HGDIOBJ ho, int, int, int, int, int, int); // idb +BOOL bn_prof_100021C4(); +void *bn_prof_10002247(); +int j_bn_prof_10002282(); +_DWORD *bn_prof_10002282(); +void __cdecl bn_prof_10002298(); // idb +int UNKCALL bn_prof_100022A2(HWND hWnd); // idb +int UNKCALL bn_prof_10002353(HGDIOBJ h); // idb +HGDIOBJ bn_prof_100023D8(); +_DWORD *__fastcall bn_prof_10002410(HDC hdc, _DWORD *a2); +signed int __fastcall bn_prof_10002456(int a1, const CHAR *a2, char a3, _DWORD *a4); +signed int bn_prof_100026B9(); +signed int UNKCALL bn_prof_100026C4(_DWORD *arg); +void UNKCALL bn_prof_100026F0(_DWORD *arg); +int UNKCALL bn_prof_10002749(_DWORD *arg, _DWORD *location); +_DWORD *UNKCALL bn_prof_10002782(int *arg, int a2, int a3, char a4); +_DWORD *UNKCALL bn_prof_100027CE(_DWORD *arg); +void UNKCALL bn_prof_100027D8(_DWORD *arg); +_DWORD *UNKCALL bn_prof_1000280C(int *arg, _DWORD *a2, int a3, _DWORD *a4); +void UNKCALL bn_prof_1000287D(_DWORD *arg); +void UNKCALL bn_prof_10002890(_DWORD *arg); + + +void UNKCALL BNetGW_100028C2(_DWORD *arg); +void UNKCALL BNetGW_100029BF(_DWORD *arg, int a2); +void *UNKCALL BNetGW_10002A07(_DWORD *arg); +_DWORD *UNKCALL BNetGW_10002A84(_DWORD *arg, signed int a2); +signed int BNetGW_10002AE5(); +int UNKCALL BNetGW_10002AF0(_DWORD *arg, char *a2); +_BYTE *UNKCALL BNetGW_10002B21(_DWORD *arg, signed int a2); +void UNKCALL BNetGW_10002B51(_DWORD *arg, signed int a2); +char *UNKCALL BNetGW_10002B78(void *arg, char *a2); +char *UNKCALL BNetGW_10002C23(_DWORD *arg); +int UNKCALL BNetGW_10002C51(_DWORD *arg); +int UNKCALL BNetGW_10002DBF(_DWORD *arg); +char *__stdcall BNetGW_10002DEB(char *a1, unsigned int a2); +char *__stdcall BNetGW_10002E0B(char *a1, unsigned int a2); + + +void *Connect_10002E2B(); +signed int Connect_10002EC4(); +//BOOL __stdcall UiArtCallback(int a1, unsigned int a2, PALETTEENTRY *pPalette, void *pBuffer, DWORD dwBuffersize, DWORD *pdwWidth, DWORD *dwHeight, DWORD *pdwBpp); +signed int Connect_100033D1(); +//BOOL __stdcall UiGetDataCallback(int a1, int a2, void *a3, int a4, int a5); +//int __stdcall UiSoundCallback(int a1, int a2, int a3); +//int __stdcall UiAuthCallback(int, int, char *, char, char *, LPSTR lpBuffer, int cchBufferMax); // idb +//int __stdcall UiDrawDescCallback(int, COLORREF color, LPCSTR lpString, char *, int, UINT align, time_t, int); // idb +//signed int __stdcall UiCategoryCallback(int a1, int a2, int a3, int a4, int a5, _DWORD *a6, _DWORD *a7); +int UNKCALL Connect_10003D04(char *); // idb +int __fastcall Connect_10003DAF(char *a1, int a2, int a3, int a4); +char *__fastcall Connect_10003E0C(int a1, const char *a2, char *a3, char *a4, int a5); +signed int __fastcall Connect_10003E61(const char *a1, _BYTE *a2); +int __fastcall Connect_10003F6F(int a1, int a2, size_t a3); +//int __stdcall UiCreateGameCriteria(int, char *); // idb +//signed int __stdcall UiCreatePlayerDescription(int a1, int a2, int a3); +//int __stdcall UiSetupPlayerInfo(int a1, int a2, int a3); +int __fastcall Connect_10004028(int a1, int a2, int a3, int a4); + + +//signed int __stdcall UiCopyProtError(int *a1); +int __stdcall CopyProt_100040AF(int, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HGLOBAL CopyProt_10004173(); +signed int __fastcall CopyProt_100041B5(HWND a1, const CHAR *edx0); +int __fastcall CopyProt_1000430C(int a1, int a2); +signed int CopyProt_10004329(); + + +signed int cr8game_10004339(); +int UNKCALL cr8game_10004344(HWND arg); +//int __stdcall UiCreateGameCallback(int a1, int a2, int a3, int a4, int a5, int a6); +HGDIOBJ __stdcall cr8game_10004506(HWND hDlg, UINT Msg, WPARAM wParam, HWND hWnd); +BYTE *cr8game_10004828(); +BOOL __fastcall cr8game_1000487F(HWND hWnd); +void **UNKCALL cr8game_10004914(HWND hDlg); +_DWORD *UNKCALL cr8game_1000497F(HWND arg); +_DWORD *__fastcall cr8game_10004A34(HWND hWnd, int a2, int a3); +LRESULT UNKCALL cr8game_10004A93(HWND hDlg); +_DWORD *__fastcall cr8game_10004ABA(HWND hDlg, int a2); +BOOL __fastcall cr8game_10004B02(HWND hWnd, int a2, int a3); +int UNKCALL cr8game_10004B3F(char *); // idb +HFONT UNKCALL cr8game_10004BA8(HWND hWnd); + + +void UNKCALL CreaDung_10004C33(void *arg); +signed int CreaDung_10004C3F(); +int __stdcall CreaDung_10004C4A(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +int __fastcall CreaDung_10004D75(HWND a1, int a2); +void UNKCALL CreaDung_10004E2E(HWND hDlg); +int UNKCALL CreaDung_10004E8B(HWND hWnd); // idb +int __fastcall CreaDung_10004F40(int a1, int a2); +HWND USERCALL CreaDung_10004F5D(HWND a1, int a2); +HWND UNKCALL CreaDung_10005037(HWND arg); +HWND USERPURGE CreaDung_1000517E(HWND hWnd, int a2, int a3, int height); +int __fastcall CreaDung_100051D8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8); + + +//signed int __stdcall UiGetDefaultStats(int a1, _WORD *a2); +signed int CreaStat_10005287(); + + +signed int credits_10005297(); +//signed int __stdcall UiCreditsDialog(int a1); +int __fastcall credits_100052C7(int a1, int a2, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +HGLOBAL __fastcall credits_100053D9(HWND hWnd, int a2); +int __fastcall credits_1000543A(HWND a1, int a2); +BOOL UNKCALL credits_100055C0(HWND hWnd); +signed int UNKCALL credits_10005660(void *arg); +signed int __fastcall credits_10005736(_BYTE *a1); +int __fastcall credits_10005755(int a1, int a2); + + +BOOL UNKCALL DiabEdit_10005765(HWND hWnd); +signed int DiabEdit_1000579B(); +ATOM DiabEdit_100057A6(); +HANDLE __fastcall DiabEdit_100057E8(int a1, int a2, HWND hWnd, UINT Msg, HANDLE hData, LPARAM lParam); +LRESULT __fastcall DiabEdit_1000591C(LPARAM lParam, unsigned short a2); +LRESULT UNKCALL DiabEdit_1000594E(LPARAM lParam); +char *__fastcall DiabEdit_10005A0A(HWND a1, unsigned char a2, int a3); +int __fastcall DiabEdit_10005AF4(LPARAM lParam, int a2, int a3); +char *__fastcall DiabEdit_10005B70(HWND hWnd, char *a2); +BOOL __fastcall DiabEdit_10005B9F(HWND hWnd, int a2); +HANDLE UNKCALL DiabEdit_10005BE7(HWND hWnd); + + +int DiabloUI_10005C2A(); +//int __stdcall UiSetBackgroundBitmap(int a1, int a2, int a3, int a4, int a5); +//int __stdcall UiSetSpawned(int a1); +//BOOL UiInitialize(); +//void *UiDestroy(); +//int __stdcall UiAppActivate(int a1); +BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); +signed int DiabloUI_10005CEA(); + + +signed int DirLink_10005CFA(); +BOOL __fastcall DirLink_10005D05(int a1, int a2, int a3, _DWORD *a4, int a5, int a6); +int __stdcall DirLink_10005D63(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); +int __fastcall DirLink_10005EB2(HWND hDlg, int a2); +int UNKCALL DirLink_10005F1F(HWND hDlg); // idb +int UNKCALL DirLink_10005F7B(HWND hWnd); // idb +int __fastcall DirLink_10006047(int a1, int a2); +void UNKCALL DirLink_10006073(void *arg); +HWND UNKCALL DirLink_100060D1(HWND arg); +int UNKCALL DirLink_10006141(void *arg); +int UNKCALL DirLink_100061E1(void *arg); +int UNKCALL DirLink_100062BF(void *arg, int a2, char *a3, char *a4); +signed int __stdcall DirLink_1000632B(int a1, char *a2, char *a3); +HWND __fastcall DirLink_10006359(HWND hWnd, int a2, int height); + + +//signed int __stdcall UiBetaDisclaimer(int a1); +int __stdcall disclaim_100063DA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +void UNKCALL disclaim_100064C9(HWND hDlg); +int UNKCALL disclaim_100064F3(HWND hWnd); // idb +int UNKCALL disclaim_10006552(void *arg); +signed int disclaim_10006571(); + + +signed int Doom_10006581(); +int __fastcall Doom_1000658C(HWND hWnd, int *a2, int a3, int a4); +void __fastcall Doom_100065BB(HWND hWnd, HWND a2, int a3, int a4); +_DWORD *__fastcall Doom_1000663F(HWND hWnd, int a2); +BOOL __fastcall Doom_10006719(int a1, HWND a2, int flags); +_DWORD *__fastcall Doom_1000678A(HWND hWnd, HWND a2); +int __fastcall Doom_1000680A(HWND hDlg, int *a2, int a3, int a4); +void __fastcall Doom_10006839(HWND a1, HWND a2, char *a3, int a4); +int __fastcall Doom_100068AB(HWND hWnd, int *a2, int a3); +void __fastcall Doom_100068D6(HWND hWnd, HWND a2, int a3); +_DWORD *__fastcall Doom_1000695D(HWND hWnd, int a2); +int __fastcall Doom_10006A13(HWND hDlg, int *a2, int a3); +void __fastcall Doom_10006A3E(HWND a1, HWND a2, char *a3); +int __fastcall Doom_10006AB8(HWND hWnd, int *a2, int a3); +void __fastcall Doom_10006AE3(HWND hWnd, HWND a2, int a3); +void UNKCALL Doom_10006B12(HWND hWnd); +int __fastcall Doom_10006C08(HWND hDlg, int *a2, int a3); +void __fastcall Doom_10006C33(HWND a1, HWND a2, char *a3); +int __fastcall Doom_10006C53(HWND hDlg, int *a2); + + +int __stdcall EntDial_10006C96(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND UNKCALL EntDial_10006D78(HWND hDlg); +HWND USERCALL EntDial_10006DB8(HWND hWnd, int a2); +int __fastcall EntDial_10006EA7(HWND hDlg, int a2); +void __fastcall EntDial_10006EE8(HWND hWnd, unsigned int a2, int a3); +int __fastcall EntDial_10006F16(HWND hDlg, int, int); // idb +signed int EntDial_10006F71(); + + +int __stdcall EntName_10006F7C(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND UNKCALL EntName_1000709E(HWND hDlg); +int UNKCALL EntName_100070DB(HWND hWnd); // idb +int __fastcall EntName_100071AC(HWND hDlg, int a2); +void __fastcall EntName_100071ED(HWND hWnd, unsigned int a2, int a3); +signed int EntName_10007220(); + + +int __fastcall Fade_1000722B(int a1, int a2); +int __fastcall Fade_100072BE(int a1); +signed int Fade_1000739F(); +signed int Fade_100073B4(); +void __fastcall Fade_100073C5(HWND hWnd, int a2); +BOOL UNKCALL Fade_100073EF(HWND hWnd); +int __fastcall Fade_100073FD(int a1, int a2, int a3); +int __stdcall Fade_10007420(int a1, int a2, int a3, int a4); +signed int Fade_1000744D(); + + +int (__stdcall *UNKCALL Focus_10007458(void *arg))(_DWORD); +int Focus_10007482(); +_DWORD *__fastcall Focus_10007492(HWND hWnd, HWND a2); +BOOL UNKCALL Focus_10007566(HWND hWnd); +_DWORD *__fastcall Focus_100075B7(HWND hWnd, HWND a2); +int __fastcall Focus_100075DC(HWND hWnd, HWND a2); // idb +int Focus_100076C3(); +void Focus_100076FA(); +signed int Focus_1000770E(); +void UNKCALL Focus_10007719(const char *arg); +int __fastcall Focus_100077E9(int a1, const char *a2, HWND hWnd); +int __stdcall Focus_10007804(HWND hWnd, int a2, int a3, int a4); +int UNKCALL Focus_10007818(void *arg); + + +void __cdecl local_InitUiPalette(); +void __cdecl local_DelUiPalette(); +tagPALETTEENTRY *__fastcall local_GetArtPalEntry(int entry); +void __fastcall local_ClearPalette(PALETTEENTRY *pPal); +void __cdecl local_ClearSurface(); +BOOL __fastcall local_LoadArtImage(const char *pszFileName, BYTE **pBuffer, DWORD *pdwSize); +BOOL __fastcall local_LoadArtWithPal(HWND hWnd, int a2, char *src, int mask, int flags, const char *pszFileName, BYTE **pBuffer, DWORD *pdwSize, BOOL a9); +void __fastcall local_AdjustRectSize(tagRECT *pRect, int a2, int a3); +BOOL __fastcall local_SetStaticBmp(HWND hWnd, int nIDDlgItem, BYTE *pBuffer, DWORD *pdwSize); +void __cdecl j_local_cpp_init(); +void __cdecl local_cpp_init(); +BOOL __fastcall local_SetButtonBmp(HWND hWnd, int flags, int a7, void *pBuffer, DWORD *pdwSize); +void __fastcall local_FitButtonDlg(HWND hWnd, int *a2, void *pBuffer, DWORD *pdwSize); +void __fastcall local_SetWhiteText(HDC hdc); +BOOL __fastcall local_GetBottomRect(HWND hWnd1, HWND hWnd2, int width, int height); +void __fastcall local_DlgDoPaint(HWND hWnd); +void __fastcall local_DoUiWndProc(HWND hWnd, DWORD *pdwMsgTbl); +LRESULT __stdcall local_PostUiWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +void __fastcall local_DoUiWndProc2(HWND hWnd, DWORD *pdwMsgTbl); +LRESULT __stdcall local_PostUiWndProc2(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +BOOL __fastcall local_DisableKeyWaitMouse(HWND hWnd); +DWORD *__cdecl local_AllocWndLongData(); +void __fastcall local_FreeMemPtr(void **p); +void __fastcall local_SetWndLongStr(int WndLongData, const char *pszStr); +void __cdecl local_LoadArtCursor(); +void __cdecl local_InitArtCursor(); +void __cdecl local_FreeArtCursor(); +void __cdecl local_SetCursorArt(); +void __cdecl local_SetCursorDefault(); +void __fastcall local_SetDiabloCursor(HWND hWnd); + + +signed int MainMenu_10008164(); +//int __stdcall UiMainMenuDialog(char *, int, int, int); // idb +int __fastcall MainMenu_100081E3(int a1, int a2, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +void UNKCALL MainMenu_10008354(HWND hDlg); +int __fastcall MainMenu_10008391(int a1, int a2); +void UNKCALL MainMenu_100083A8(HWND hWnd); +int __fastcall MainMenu_1000845A(int a1, int a2, int a3); +BOOL MainMenu_100084D5(); +LRESULT __fastcall MainMenu_100084FA(HWND hWnd, int a2); + + +int Modem_1000855D(); +HWND __fastcall Modem_10008563(HWND hDlg, const char *edx0, int a2); +int __stdcall Modem_100085D8(int, char *, char *); // idb +BOOL Modem_10008606(); +char *Modem_1000863D(); +signed int Modem_10008648(); +int Modem_10008653(); +int Modem_10008659(); +int UNKCALL Modem_1000865F(char *); // idb +BOOL __fastcall Modem_10008680(int a1, int a2, int a3, _DWORD *a4, int a5, int a6); +int __stdcall Modem_100086DE(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +void **UNKCALL Modem_1000879E(HWND hDlg); +BOOL UNKCALL Modem_100087DB(HWND hWnd); +int Modem_10008888(); +int UNKCALL Modem_100088DB(HWND hWnd); // idb +int UNKCALL Modem_1000893D(HWND hWnd); // idb +int __fastcall Modem_10008A38(HWND hWnd, int); // idb +void __cdecl Modem_10008B42(char *a1); +int UNKCALL Modem_10008BB7(HWND hWnd); // idb +int UNKCALL Modem_10008BFE(HWND hWnd); // idb + + +int __stdcall ModmStat_10008C62(char *, int, int, int, int); // idb +int UNKCALL ModmStat_10008C87(void *arg); +int __stdcall ModmStat_10008CA0(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +int UNKCALL ModmStat_10008DB3(HWND hDlg); // idb +BOOL UNKCALL ModmStat_10008DE4(HWND hWnd); +int __fastcall ModmStat_10008E89(int a1, int a2); +void UNKCALL ModmStat_10008EBF(HWND hDlg); +signed int ModmStat_10008F26(); + + +int __fastcall OkCancel_10008F31(HWND hWnd, const CHAR *a2); +signed int OkCancel_10008FEC(); +HGDIOBJ __stdcall OkCancel_10008FF7(HWND a1, UINT Msg, WPARAM wParam, HWND hWnd); +void **UNKCALL OkCancel_10009117(HWND hWnd); +signed int __fastcall OkCancel_10009161(HWND a1, int a2); +int __fastcall OkCancel_100092F5(int a1, int a2); +int __fastcall OkCancel_1000930A(int a1, int a2, int a3); +//LPCSTR __stdcall UiMessageBoxCallback(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType); + + +signed int Progress_10009480(); +//BOOL __stdcall UiProgressDialog(int a1, int a2, BOOL a3, int (*a4)(void), int a5); +int __stdcall Progress_100094F4(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +void *Progress_100095EC(); +BOOL __fastcall Progress_10009675(HWND hWnd, const CHAR *edx0); +BOOL __fastcall Progress_10009805(HWND hWnd, int a2); +void Progress_100098B0(); +void UNKCALL Progress_100098C5(HWND hWnd); +BOOL UNKCALL Progress_1000991C(HWND hWnd); + + +signed int Sbar_100099B5(); +int UNKCALL Sbar_100099C0(HWND hWnd); // idb +int __fastcall Sbar_100099DC(HWND hWnd, LONG a2, int a3); +HWND __fastcall Sbar_10009A99(HWND hDlg, int nIDDlgItem, int a3, int a4); +HWND __fastcall Sbar_10009BF1(HWND hDlg, int nIDDlgItem); +signed int Sbar_10009CC7(); +HWND __fastcall Sbar_10009CD2(HWND hDlg, int nIDDlgItem); + + +int __stdcall SelClass_10009D66(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND UNKCALL SelClass_10009EC0(HWND hDlg); +int UNKCALL SelClass_10009EFD(HWND hWnd); // idb +int __fastcall SelClass_10009FA2(HWND hWnd, int a2); +int __fastcall SelClass_1000A00D(int a1, LONG a2); +signed int SelClass_1000A077(); + + +void *SelConn_1000A082(); +signed int SelConn_1000A09B(); +int __stdcall SelConn_1000A0A6(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); +HWND __fastcall SelConn_1000A226(HWND hDlg, int nIDDlgItem); +HWND UNKCALL SelConn_1000A3E2(HWND hDlg); +int SelConn_1000A3FF(); +void UNKCALL SelConn_1000A43A(HWND hDlg); +BOOL __fastcall SelConn_1000A4B9(_DWORD *a1); +BOOL UNKCALL SelConn_1000A4CD(void *location); +HWND UNKCALL SelConn_1000A4E4(HWND hWnd, char *a2, int a3); +signed int __stdcall SelConn_1000A5F3(int a1, char *a2, char *a3, int a4); +int __fastcall SelConn_1000A670(HWND a1, const char *a2); +void UNKCALL SelConn_1000A6EC(HWND hDlg); +LRESULT __stdcall SelConn_1000A73E(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +HWND UNKCALL SelConn_1000A866(HWND hWnd); +HWND UNKCALL SelConn_1000A8D7(HWND hWnd); +HWND UNKCALL SelConn_1000A948(HWND hWnd); +int UNKCALL SelConn_1000A9F3(HWND hWnd); // idb +_DWORD *__fastcall SelConn_1000AA28(int a1); +HWND UNKCALL SelConn_1000AA3B(HWND hWnd); +HWND UNKCALL SelConn_1000AAEB(HWND hWnd); +HWND UNKCALL SelConn_1000AB83(HWND hWnd); +int __fastcall SelConn_1000AC07(int a1, int a2); +int UNKCALL SelConn_1000AC30(HWND arg); +int UNKCALL SelConn_1000AC9E(HWND hWnd); // idb +int UNKCALL SelConn_1000ADA8(HWND hWnd); // idb +BOOL UNKCALL SelConn_1000ADD0(HWND hWnd); +int __fastcall SelConn_1000AE19(int a1, UINT a2); +HWND __fastcall SelConn_1000AE59(HWND hWnd, int a2, int height); +//signed int __stdcall UiSelectProvider(int a1, int a2, int a3, int a4, char *a5, int *a6); + + +int UNKCALL SelDial_1000B011(char *arg); +signed int SelDial_1000B0C4(); +int __stdcall SelDial_1000B0CF(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND __fastcall SelDial_1000B1FB(HWND hWnd, int a2); +HWND UNKCALL SelDial_1000B29A(HWND hDlg); +int __fastcall SelDial_1000B2D8(int a1, int a2); +HWND UNKCALL SelDial_1000B354(HWND hDlg); +HWND UNKCALL SelDial_1000B3D8(HWND hDlg); +HWND UNKCALL SelDial_1000B44C(HWND hDlg); +HWND USERCALL SelDial_1000B483(HWND hWnd, int a2); +int SelDial_1000B5D9(); +int __fastcall SelDial_1000B614(HWND hWnd, int, int); // idb + + +void UNKCALL SelGame_1000B66A(void *arg); +int SelGame_1000B671(); +void UNKCALL SelGame_1000B677(void *arg); +int SelGame_1000B67E(); +//int __stdcall UiSelectGame(int, int, void *, int, int, int); // idb +signed int SelGame_1000B795(); + + +int SelHero_1000B7A0(); +int SelHero_1000B7A6(); +void UNKCALL SelHero_1000B7AC(void *arg); +char *SelHero_1000B7B3(); +void *SelHero_1000B7B9(); +int SelHero_1000B7CA(); +int __fastcall SelHero_1000B7D0(int a1, int a2); +signed int SelHero_1000B7DE(); +BOOL __fastcall SelHero_1000B899(HWND hDlg, int a2); +int __fastcall SelHero_1000B905(HWND hDlg, int a2); +HWND __fastcall SelHero_1000BA7B(HWND hDlg, const char *a2); +char *UNKCALL SelHero_1000BAB4(char *arg); +char __fastcall SelHero_1000BB26(char *a1); +int __fastcall SelHero_1000BB34(char *, char *); // idb +//int UNKCALL UiValidPlayerName(char *); // idb +//int __stdcall UiSelHeroMultDialog(int, int, int, int, int, int, char *); // idb +int __stdcall SelHero_1000BC46(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +BOOL UNKCALL SelHero_1000BDAD(HWND arg); +int *__fastcall SelHero_1000BEDB(int *a1, char *a2); +BOOL UNKCALL SelHero_1000BF33(void *location); +const char *__fastcall SelHero_1000BF4A(const char *a1, const char *a2); +int UNKCALL SelHero_1000BF6D(HWND hWnd); // idb +int UNKCALL SelHero_1000BFF9(HWND hWnd); // idb +int UNKCALL SelHero_1000C09B(HWND hWnd); // idb +signed int __fastcall SelHero_1000C0F9(int a1, char *a2); +BOOL UNKCALL SelHero_1000C21A(HWND hWnd); +int UNKCALL SelHero_1000C269(HWND hWnd); // idb +void UNKCALL SelHero_1000C364(HWND hDlg); +BOOL __fastcall SelHero_1000C3CE(_DWORD *a1); +int __fastcall SelHero_1000C3E2(int a1, int a2); +int UNKCALL SelHero_1000C3FF(HWND hWnd); // idb +BOOL UNKCALL SelHero_1000C49F(HWND hWnd, void *a2); +signed int __stdcall SelHero_1000C541(void *a1); +//int __stdcall UiSelHeroSingDialog(int, int, int, int, int, char *, int); // idb + + +void *SelIPX_1000C610(); +signed int SelIPX_1000C629(); +BOOL __fastcall SelIPX_1000C634(int a1, int a2, int a3, _DWORD *a4, int a5, int a6); +int __stdcall SelIPX_1000C692(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +LONG __fastcall SelIPX_1000C818(HWND hDlg, int nIDDlgItem); +HWND UNKCALL SelIPX_1000C982(HWND hDlg); +int SelIPX_1000C99F(); +const char *UNKCALL SelIPX_1000C9DA(HWND hDlg); +void __fastcall SelIPX_1000CA64(_DWORD *a1); +_DWORD **__fastcall SelIPX_1000CA71(_DWORD *a1); +BOOL UNKCALL SelIPX_1000CAC1(void *location); +void *__stdcall SelIPX_1000CAD5(int a1, char *a2, char *a3); +_DWORD *__fastcall SelIPX_1000CB50(_DWORD *a1, _DWORD *a2); +_DWORD *__fastcall SelIPX_1000CB73(_DWORD *a1, int a2); +int __fastcall SelIPX_1000CB83(HWND a1, const char *a2); +int UNKCALL SelIPX_1000CC41(HWND hDlg); // idb +BOOL __fastcall SelIPX_1000CCC5(_DWORD *a1); +HWND UNKCALL SelIPX_1000CCD9(HWND hWnd); +HWND UNKCALL SelIPX_1000CD4A(HWND hWnd); +void UNKCALL SelIPX_1000CEE6(HWND hDlg); +LRESULT __stdcall SelIPX_1000CF38(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +HWND UNKCALL SelIPX_1000D070(HWND hWnd); +HWND UNKCALL SelIPX_1000D0E1(HWND hWnd); +int UNKCALL SelIPX_1000D18C(HWND hWnd); // idb +_DWORD *__fastcall SelIPX_1000D1C1(int a1); +HWND UNKCALL SelIPX_1000D1D4(HWND hWnd); +HWND UNKCALL SelIPX_1000D284(HWND hWnd); +HWND UNKCALL SelIPX_1000D31C(HWND hWnd); +int __fastcall SelIPX_1000D3A0(int a1, int a2); +HWND USERCALL SelIPX_1000D3C5(HWND hDlg, int a2); +BOOL __fastcall SelIPX_1000D4CA(HWND hDlg, int a2); +char *UNKCALL SelIPX_1000D520(char *arg); +const char *__fastcall SelIPX_1000D58D(const char *a1, const char *a2); +int __fastcall SelIPX_1000D5B0(int a1, int a2); +HWND __fastcall SelIPX_1000D696(HWND hDlg, int a2, int height); + + +signed int SelList_1000D769(); +int __stdcall SelList_1000D774(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND UNKCALL SelList_1000D916(HWND hDlg); +HWND __fastcall SelList_1000D964(HWND hDlg, int nIDDlgItem); +HWND UNKCALL SelList_1000D9CF(HWND hDlg); +int UNKCALL SelList_1000D9F4(HWND hWnd); // idb +int UNKCALL SelList_1000DA2D(void *arg); +int UNKCALL SelList_1000DA48(void *arg); +int UNKCALL SelList_1000DA55(HWND hWnd); // idb +int __fastcall SelList_1000DB2C(HWND a1, const char *a2); +void UNKCALL SelList_1000DBAC(HWND hDlg); +LRESULT __stdcall SelList_1000DBFE(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +HWND UNKCALL SelList_1000DD36(HWND hWnd); +HWND UNKCALL SelList_1000DDA7(HWND hWnd); +HWND UNKCALL SelList_1000DE18(HWND hWnd); +_DWORD *UNKCALL SelList_1000DEDD(char *arg); +HWND UNKCALL SelList_1000DEF4(HWND hWnd); +HWND UNKCALL SelList_1000DFAB(HWND hWnd); +HWND UNKCALL SelList_1000E043(HWND hWnd); +int __fastcall SelList_1000E0CA(HWND hWnd, int, int); // idb + + +int __stdcall SelLoad_1000E1C2(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND UNKCALL SelLoad_1000E30E(HWND hDlg); +int UNKCALL SelLoad_1000E34B(HWND hWnd); // idb +int __fastcall SelLoad_1000E3E2(int a1, LONG a2); +signed int SelLoad_1000E41A(); + + +signed int SelModem_1000E42A(); +int __fastcall SelModem_1000E435(void *a1, int a2, int a3, char *a4, char *a5); +char *__stdcall SelModem_1000E497(int a1, char *a2, char *a3); +void *SelModem_1000E4EC(); +_DWORD *__fastcall SelModem_1000E500(int a1, _DWORD *a2); +signed int UNKCALL SelModem_1000E505(void *arg); +signed int SelModem_1000E51E(); +BOOL __fastcall SelModem_1000E553(_DWORD *a1); +BOOL UNKCALL SelModem_1000E567(void *location); +int __fastcall SelModem_1000E57B(int a1, int a2); +signed int SelModem_1000E5CC(); +int __stdcall SelModem_1000E63E(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +void UNKCALL SelModem_1000E783(HWND hDlg); +HWND UNKCALL SelModem_1000E7E9(HWND hDlg); +int UNKCALL SelModem_1000E80E(HWND hWnd); // idb +HWND UNKCALL SelModem_1000E843(HWND hWnd); +int __fastcall SelModem_1000E932(HWND a1, const char *a2); +void UNKCALL SelModem_1000E9B2(HWND hDlg); +LRESULT __stdcall SelModem_1000EA04(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +HWND UNKCALL SelModem_1000EB2C(HWND hWnd); +HWND UNKCALL SelModem_1000EB9D(HWND hWnd); +HWND UNKCALL SelModem_1000EC0E(HWND hWnd); +_DWORD *__fastcall SelModem_1000EC9F(int a1); +HWND UNKCALL SelModem_1000ECB2(HWND hWnd); +HWND UNKCALL SelModem_1000ED3B(HWND hWnd); +HWND UNKCALL SelModem_1000EDBC(HWND hWnd); +int __fastcall SelModem_1000EE29(int a1, int a2); +HWND __fastcall SelModem_1000EE78(HWND hWnd, int a2, int height); + + +void *SelRegn_1000EF42(); +_DWORD *__fastcall SelRegn_1000EF56(int a1, _DWORD *a2); +signed int SelRegn_1000EF60(); +int __stdcall SelRegn_1000EF6B(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND __fastcall SelRegn_1000F0D7(HWND hDlg, int nIDDlgItem); +HWND UNKCALL SelRegn_1000F109(HWND hDlg); +int SelRegn_1000F126(); +void UNKCALL SelRegn_1000F161(HWND hDlg); +BOOL __fastcall SelRegn_1000F1D4(_DWORD *a1); +BOOL UNKCALL SelRegn_1000F1E8(void *location); +HWND UNKCALL SelRegn_1000F1FC(HWND hWnd); +signed int SelRegn_1000F2ED(); +int __fastcall SelRegn_1000F346(HWND a1, const char *a2); +void UNKCALL SelRegn_1000F3C2(HWND hDlg); +LRESULT __stdcall SelRegn_1000F414(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +HWND UNKCALL SelRegn_1000F53C(HWND hWnd); +HWND UNKCALL SelRegn_1000F5AD(HWND hWnd); +HWND UNKCALL SelRegn_1000F61E(HWND hWnd); +int UNKCALL SelRegn_1000F6C9(HWND hWnd); // idb +_DWORD *__fastcall SelRegn_1000F6FE(int a1); +HWND UNKCALL SelRegn_1000F711(HWND hWnd); +HWND UNKCALL SelRegn_1000F7C1(HWND hWnd); +HWND UNKCALL SelRegn_1000F859(HWND hWnd); +signed int UNKCALL SelRegn_1000F8DD(void *arg); +signed int SelRegn_1000F8F6(); +HWND __fastcall SelRegn_1000F929(HWND hWnd, int a2, int height); +//signed int __stdcall UiSelectRegion(_DWORD *a1); + + +int __fastcall SelYesNo_1000FA49(int a1, const CHAR *a2, int a3, int a4); +int __stdcall SelYesNo_1000FA87(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +HWND UNKCALL SelYesNo_1000FBC7(HWND hDlg); +void UNKCALL SelYesNo_1000FC1C(HWND hWnd); +int __fastcall SelYesNo_1000FCF6(int a1, LONG a2); +int __fastcall SelYesNo_1000FD39(int a1, const CHAR *a2, int a3, int a4); +int __fastcall SelYesNo_1000FD77(int a1, UINT a2, int a3); +signed int SelYesNo_1000FDE3(); + + +_DWORD *UNKCALL Title_1000FDEE(HWND hWnd); +int Title_1000FEED(); +void **UNKCALL Title_1000FF0F(HWND hWnd); +HWND UNKCALL Title_1000FF51(HWND arg); +_DWORD *__fastcall Title_1000FFE8(HWND hWnd, const char *edx0); +int __fastcall Title_1001009E(HWND hWnd, const char *a2, HWND hWnda); +_DWORD *__stdcall Title_100100CB(HWND hWnd, int a2, int a3, int a4); +signed int Title_100100DC(); +void **UNKCALL Title_100100E7(HWND hWnd); +//signed int __stdcall UiTitleDialog(int a1); +int __stdcall Title_10010126(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb +void UNKCALL Title_10010235(HWND hDlg); +int __fastcall Title_1001025A(HWND hWnd, int a2); +int UNKCALL Title_100102D7(void *arg); + + +void UNKCALL TitleSnd_10010306(void *arg); +void TitleSnd_1001030D(); +int (__stdcall *TitleSnd_10010315())(_DWORD); +int (__stdcall *TitleSnd_1001031F())(_DWORD); +signed int TitleSnd_1001032E(); diff --git a/DiabloUI/bn_prof.cpp b/DiabloUI/bn_prof.cpp index 06f043978..2d71e9faa 100644 --- a/DiabloUI/bn_prof.cpp +++ b/DiabloUI/bn_prof.cpp @@ -667,7 +667,7 @@ void __fastcall bn_prof_10001ED0(char *a1, _BYTE *a2, int a3) { return; } // 10022258: using guessed type int dword_10022258; // ref: 0x10001F29 -int bn_prof_10001F29() { return 0; } +void *bn_prof_10001F29() { return 0; } /* { int result; // eax @@ -689,7 +689,7 @@ int bn_prof_10001F29() { return 0; } // 10029434: using guessed type int dword_10029434; // ref: 0x10001F84 -int bn_prof_10001F84() { return 0; } +BYTE *bn_prof_10001F84() { return 0; } /* { int result; // eax @@ -874,7 +874,7 @@ int bn_prof_100021C4() { return 0; } // 1002942C: using guessed type int dword_1002942C; // ref: 0x10002247 -int bn_prof_10002247() { return 0; } +void *bn_prof_10002247() { return 0; } /* { int result; // eax diff --git a/DiabloUI/bnetgw.cpp b/DiabloUI/bnetgw.cpp index abe87bb6d..881cdb539 100644 --- a/DiabloUI/bnetgw.cpp +++ b/DiabloUI/bnetgw.cpp @@ -109,7 +109,7 @@ void UNKCALL BNetGW_100029BF(_DWORD *arg, int a2) { return; } } */ // ref: 0x10002A07 -int UNKCALL BNetGW_10002A07(_DWORD *arg) { return 0; } +void *UNKCALL BNetGW_10002A07(_DWORD *arg) { return 0; } /* { _DWORD *v1; // esi int v2; // edi diff --git a/DiabloUI/connect.cpp b/DiabloUI/connect.cpp index 97db16466..afa6126f2 100644 --- a/DiabloUI/connect.cpp +++ b/DiabloUI/connect.cpp @@ -1,5 +1,5 @@ // ref: 0x10002E2B -int Connect_10002E2B() { return 0; } +void *Connect_10002E2B() { return 0; } /* { int *v0; // edi int result; // eax diff --git a/DiabloUI/cr8game.cpp b/DiabloUI/cr8game.cpp index 46acea3bc..ec9142f3e 100644 --- a/DiabloUI/cr8game.cpp +++ b/DiabloUI/cr8game.cpp @@ -218,7 +218,7 @@ HGDIOBJ __stdcall cr8game_10004506(HWND hDlg, UINT Msg, WPARAM wParam, HWND hWnd // 10029690: using guessed type char byte_10029690; // ref: 0x10004828 -int cr8game_10004828() { return 0; } +BYTE *cr8game_10004828() { return 0; } /* { int result; // eax @@ -271,7 +271,7 @@ int UNKCALL cr8game_1000487F(HWND hWnd) { return 0; } // 100296B8: using guessed type int dword_100296B8; // ref: 0x10004914 -_DWORD *UNKCALL cr8game_10004914(HWND hDlg) { return 0; } +void **UNKCALL cr8game_10004914(HWND hDlg) { return 0; } /* { HWND v1; // ebp signed int v2; // edi diff --git a/DiabloUI/diabloui.cpp b/DiabloUI/diabloui.cpp index fd74af8b3..3d2227ffc 100644 --- a/DiabloUI/diabloui.cpp +++ b/DiabloUI/diabloui.cpp @@ -14,6 +14,7 @@ #include "..\defs.h" #include "..\structs.h" +#include "..\3rdParty\Storm\Source\storm.h" #include "diabloui.h" #define UNKCALL __fastcall @@ -21,6 +22,9 @@ #define USERPURGE __fastcall //temporarily include everything directly +#include "_temp_funcs.h" +#include "_temp_data.cpp" + #include "artfont.cpp" #include "bnetgw.cpp" #include "bn_prof.cpp" @@ -145,12 +149,12 @@ BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { // hInstance = hinstDLL; DiabEdit_100057A6(); - local_10007825(); + local_InitUiPalette(); } } else { - local_1000787D(); + local_DelUiPalette(); } return 1; } diff --git a/DiabloUI/fade.cpp b/DiabloUI/fade.cpp index 12f29bcc8..b4d14dbb5 100644 --- a/DiabloUI/fade.cpp +++ b/DiabloUI/fade.cpp @@ -118,7 +118,7 @@ signed int Fade_100073B4() { return 0; } // 10029C70: using guessed type int dword_10029C70; // ref: 0x100073C5 -int __fastcall Fade_100073C5(HWND hWnd, int a2) { return 0; } +void __fastcall Fade_100073C5(HWND hWnd, int a2) { return; } /* { int v2; // esi HWND v3; // eax diff --git a/DiabloUI/local.cpp b/DiabloUI/local.cpp index e44ef5659..654370b46 100644 --- a/DiabloUI/local.cpp +++ b/DiabloUI/local.cpp @@ -1,190 +1,160 @@ // ref: 0x10007825 -LOGPALETTE *local_10007825() { return 0; } -/* { - LOGPALETTE *result; // eax - const LOGPALETTE *v1; // esi - int v2; // eax - signed int v3; // ecx - - result = (LOGPALETTE *)SMemAlloc(1028, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 27, 0); - v1 = result; - if ( result ) +void __cdecl local_InitUiPalette() +{ + LOGPALETTE *v0; // eax MAPDST + PALETTEENTRY *v2; // eax + int v3; // ecx + + v0 = (LOGPALETTE *)SMemAlloc(0x404u, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 27, 0); + if ( v0 ) { - result->palVersion = 768; - result->palNumEntries = 256; - v2 = (int)result->palPalEntry; + v0->palVersion = 768; + v0->palNumEntries = 256; + v2 = v0->palPalEntry; v3 = 0; do { - *(_DWORD *)v2 = v3; - *(_BYTE *)(v2 + 3) = 2; + v2[v3].peFlags = 2; ++v3; - v2 += 4; } while ( v3 < 256 ); - dword_1002A0C8 = CreatePalette(v1); - result = (LOGPALETTE *)SMemFree(v1, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 41, 0); + objPalette = CreatePalette(v0); + SMemFree(v0, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 41, 0); } - return result; -} */ -// 10010340: using guessed type int __stdcall SMemFree(_DWORD, _DWORD, _DWORD, _DWORD); -// 10010364: using guessed type int __stdcall SMemAlloc(_DWORD, _DWORD, _DWORD, _DWORD); +} // ref: 0x1000787D -HGDIOBJ local_1000787D() { return 0; } -/* { - HGDIOBJ result; // eax - - result = dword_1002A0C8; - if ( dword_1002A0C8 ) +void __cdecl local_DelUiPalette() +{ + if ( objPalette ) { - result = (HGDIOBJ)DeleteObject(dword_1002A0C8); - dword_1002A0C8 = 0; + DeleteObject(objPalette); + objPalette = 0; } - return result; -} */ +} // ref: 0x10007895 -char *__fastcall local_10007895(int a1) { return 0; } -/* { - return (char *)&unk_10029CC8 + 4 * a1; -} */ +tagPALETTEENTRY *__fastcall local_GetArtPalEntry(int entry) +{ + return &artpal[entry]; +} // ref: 0x1000789D -_BYTE *UNKCALL local_1000789D(char *arg) { return 0; } -/* { - _BYTE *result; // eax +void __fastcall local_ClearPalette(PALETTEENTRY *pPal) +{ + BYTE *v1; // eax signed int v2; // ecx - result = arg + 2; + v1 = &pPal->peBlue; v2 = 256; do { - *(result - 2) = 0; - *(result - 1) = 0; - *result = 0; - result += 4; + *(v1 - 2) = 0; + *(v1 - 1) = 0; + *v1 = 0; + v1 += 4; --v2; } while ( v2 ); - return result; -} */ +} // ref: 0x100078B6 -int local_100078B6() { return 0; } -/* { - return SDrawClearSurface(); -} */ -// 1001043C: using guessed type _DWORD __stdcall SDrawClearSurface(); +void __cdecl local_ClearSurface() +{ + SDrawClearSurface(0); +} +// 1001043C: using guessed type int __stdcall SDrawClearSurface(_DWORD); // ref: 0x100078BE -signed int __fastcall local_100078BE(int a1, int *a2, _DWORD *a3) { return 0; } -/* { - int *v3; // edi - int v4; // eax - int v5; // ecx - int v7; // [esp+Ch] [ebp-Ch] - int v8; // [esp+10h] [ebp-8h] - int v9; // [esp+14h] [ebp-4h] - - v3 = a2; - v7 = a1; - *a2 = 0; - if ( !SBmpLoadImage(a1, 0, 0, 0, &v9, &v8, 0) ) +BOOL __fastcall local_LoadArtImage(const char *pszFileName, BYTE **pBuffer, DWORD *pdwSize) +{ + BYTE *v4; // eax + DWORD v5; // ecx + DWORD dwHeight; // [esp+10h] [ebp-8h] + DWORD dwWidth; // [esp+14h] [ebp-4h] + + *pBuffer = 0; + if ( !SBmpLoadImage(pszFileName, 0, 0, 0, &dwWidth, &dwHeight, 0) ) return 0; - v4 = SMemAlloc(v8 * v9, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 93, 0); - v5 = v9; - *v3 = v4; - if ( !SBmpLoadImage(v7, 0, v4, v8 * v5, 0, 0, 0) ) + v4 = (BYTE *)SMemAlloc(dwHeight * dwWidth, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 93, 0); + v5 = dwWidth; + *pBuffer = v4; + if ( !SBmpLoadImage(pszFileName, 0, v4, dwHeight * v5, 0, 0, 0) ) { - SMemFree(*v3, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 95, 0); - *v3 = 0; + SMemFree(*pBuffer, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 95, 0); + *pBuffer = 0; return 0; } - if ( a3 ) + if ( pdwSize ) { - *a3 = v9; - a3[1] = v8; + *pdwSize = dwWidth; + pdwSize[1] = dwHeight; } return 1; -} */ -// 10010340: using guessed type int __stdcall SMemFree(_DWORD, _DWORD, _DWORD, _DWORD); -// 10010364: using guessed type int __stdcall SMemAlloc(_DWORD, _DWORD, _DWORD, _DWORD); -// 100103BE: using guessed type int __stdcall SBmpLoadImage(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); +} // ref: 0x10007944 -signed int __fastcall local_10007944(int a1, int a2, _BYTE *a3, int a4, int a5, int a6, int *a7, _DWORD *a8, int a9) { return 0; } -/* { - int v9; // edi - int v10; // eax - int v11; // ST18_4 +BOOL __fastcall local_LoadArtWithPal(HWND hWnd, int a2, char *src, int mask, int flags, const char *pszFileName, BYTE **pBuffer, DWORD *pdwSize, BOOL a9) +{ + BYTE *v10; // eax + DWORD v11; // ST18_4 HPALETTE v13; // edi - struct tagPALETTEENTRY pPalEntries; // [esp+Ch] [ebp-40Ch] - struct tagPALETTEENTRY v15; // [esp+3E4h] [ebp-34h] - int v16; // [esp+40Ch] [ebp-Ch] - int v17; // [esp+410h] [ebp-8h] - int v18; // [esp+414h] [ebp-4h] + tagPALETTEENTRY pPalEntries[256]; // [esp+Ch] [ebp-40Ch] + DWORD pdwWidth; // [esp+410h] [ebp-8h] + DWORD dwHeight; // [esp+414h] [ebp-4h] - v9 = a2; - v16 = a1; - if ( !SBmpLoadImage(a6, 0, 0, 0, &v17, &v18, 0) ) + if ( !SBmpLoadImage(pszFileName, 0, 0, 0, &pdwWidth, &dwHeight, 0) ) return 0; - v10 = SMemAlloc(v18 * v17, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 129, 0); - v11 = v18 * v17; - *a7 = v10; - if ( !SBmpLoadImage(a6, &pPalEntries, v10, v11, 0, 0, 0) - || !SDlgSetBitmapI(v16, v9, a3, a4, a5, *a7, 0, v17, v18, -1) ) + v10 = (BYTE *)SMemAlloc(dwHeight * pdwWidth, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 129, 0); + v11 = dwHeight * pdwWidth; + *pBuffer = v10; + if ( !SBmpLoadImage(pszFileName, pPalEntries, v10, v11, 0, 0, 0) + || !SDlgSetBitmapI(hWnd, a2, src, mask, flags, *pBuffer, 0, pdwWidth, dwHeight, -1) ) { return 0; } - if ( !a3 || !*a3 ) + if ( !src || !*src ) { v13 = (HPALETTE)GetStockObject(15); - GetPaletteEntries(v13, 0, 0xAu, &pPalEntries); - GetPaletteEntries(v13, 0xAu, 0xAu, &v15); - memcpy(&unk_10029CC8, &pPalEntries, 0x400u); + GetPaletteEntries(v13, 0, 0xAu, pPalEntries); + GetPaletteEntries(v13, 0xAu, 0xAu, &pPalEntries[246]); + memcpy(artpal, pPalEntries, 0x400u); if ( a9 ) { - SDrawUpdatePalette(0, 255, &unk_10029CC8, 1); + SDrawUpdatePalette(0, 255, artpal, 1); } else { - local_1000789D((char *)&pPalEntries); - SDrawUpdatePalette(0, 256, &pPalEntries, 1); + local_ClearPalette(pPalEntries); + SDrawUpdatePalette(0, 256, pPalEntries, 1); } } - if ( a8 ) + if ( pdwSize ) { - *a8 = v17; - a8[1] = v18; + *pdwSize = pdwWidth; + pdwSize[1] = dwHeight; } return 1; -} */ -// 10010364: using guessed type int __stdcall SMemAlloc(_DWORD, _DWORD, _DWORD, _DWORD); -// 100103BE: using guessed type int __stdcall SBmpLoadImage(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); +} // 100103FA: using guessed type int __stdcall SDrawUpdatePalette(_DWORD, _DWORD, _DWORD, _DWORD); -// 10010400: using guessed type int __stdcall SDlgSetBitmapI(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // ref: 0x10007A68 -int __fastcall local_10007A68(_DWORD *a1, int a2, int a3) { return 0; } -/* { +void __fastcall local_AdjustRectSize(tagRECT *pRect, int a2, int a3) +{ int v3; // eax - int result; // eax - int v5; // edx - - v3 = a2 - *a1; - *a1 = a2; - a1[2] += v3 - 1; - result = a3; - v5 = a3 - a1[1]; - a1[1] = a3; - a1[3] += v5 - 1; - return result; -} */ + int v4; // edx + + v3 = a2 - pRect->left; + pRect->left = a2; + pRect->right += v3 - 1; + v4 = a3 - pRect->top; + pRect->top = a3; + pRect->bottom += v4 - 1; +} // ref: 0x10007A85 -int __fastcall local_10007A85(HWND hWnd, int nIDDlgItem, int a3, int a4) { return 0; } -/* { +BOOL __fastcall local_SetStaticBmp(HWND hWnd, int nIDDlgItem, BYTE *pBuffer, DWORD *pdwSize) +{ HWND v4; // edi HWND v5; // ebx struct tagRECT Rect; // [esp+Ch] [ebp-10h] @@ -194,156 +164,140 @@ int __fastcall local_10007A85(HWND hWnd, int nIDDlgItem, int a3, int a4) { retur GetWindowRect(v5, &Rect); ScreenToClient(v4, (LPPOINT)&Rect); ScreenToClient(v4, (LPPOINT)&Rect.right); - SDlgSetBitmapI(v5, 0, "Static", -1, 1, a3, &Rect, *(_DWORD *)a4, *(_DWORD *)(a4 + 4), -1); + SDlgSetBitmapI(v5, 0, "Static", -1, 1, pBuffer, (int)&Rect, *pdwSize, pdwSize[1], -1); return 1; -} */ -// 10010400: using guessed type int __stdcall SDlgSetBitmapI(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); +} // ref: 0x10007AEA -signed int local_10007AEA() { return 0; } -/* { - signed int result; // eax - - result = 2139095040; - dword_10029CB8 = 2139095040; - return result; -} */ -// 10029CB8: using guessed type int dword_10029CB8; +void __cdecl local_cpp_init() +{ + local_cpp_float = 0x7F800000; +} +// 10029CB8: using guessed type int local_cpp_float; // ref: 0x10007AF5 -int __fastcall local_10007AF5(int a1, int a2, int a3, int a4, _DWORD *a5) { return 0; } -/* { - return SDlgSetBitmapI(a1, 0, "Button", -1, a2, a4, a3, *a5, a5[1], -1); -} */ -// 10010400: using guessed type int __stdcall SDlgSetBitmapI(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); +BOOL __fastcall local_SetButtonBmp(HWND hWnd, int flags, int a7, void *pBuffer, DWORD *pdwSize) +{ + return SDlgSetBitmapI(hWnd, 0, "Button", -1, flags, pBuffer, a7, *pdwSize, pdwSize[1], -1); +} // ref: 0x10007B1B -int __fastcall local_10007B1B(HWND a1, int *a2, int a3, _DWORD *a4) { return 0; } -/* { - int result; // eax +void __fastcall local_FitButtonDlg(HWND hWnd, int *a2, void *pBuffer, DWORD *pdwSize) +{ + int v4; // eax HWND v5; // esi struct tagRECT Rect; // [esp+0h] [ebp-1Ch] - HWND hDlg; // [esp+10h] [ebp-Ch] - int v8; // [esp+14h] [ebp-8h] + int a3; // [esp+14h] [ebp-8h] int *v9; // [esp+18h] [ebp-4h] - result = *a2; - v8 = 0; + v4 = *a2; + a3 = 0; v9 = a2; - hDlg = a1; - if ( result ) + if ( v4 ) { do { - v5 = GetDlgItem(hDlg, result); + v5 = GetDlgItem(hWnd, v4); if ( v5 ) { GetClientRect(v5, &Rect); - local_10007A68(&Rect, 0, v8); - local_10007AF5((int)v5, 16, (int)&Rect, a3, a4); + local_AdjustRectSize(&Rect, 0, a3); + local_SetButtonBmp(v5, 16, (int)&Rect, pBuffer, pdwSize); ++Rect.bottom; ++Rect.right; - local_10007A68(&Rect, 0, Rect.bottom); - local_10007AF5((int)v5, 64, (int)&Rect, a3, a4); + local_AdjustRectSize(&Rect, 0, Rect.bottom); + local_SetButtonBmp(v5, 64, (int)&Rect, pBuffer, pdwSize); ++Rect.bottom; ++Rect.right; - local_10007A68(&Rect, 0, Rect.bottom); - local_10007AF5((int)v5, 32, (int)&Rect, a3, a4); + local_AdjustRectSize(&Rect, 0, Rect.bottom); + local_SetButtonBmp(v5, 32, (int)&Rect, pBuffer, pdwSize); ++Rect.bottom; ++Rect.right; - local_10007A68(&Rect, 0, Rect.bottom); - local_10007AF5((int)v5, 128, (int)&Rect, a3, a4); + local_AdjustRectSize(&Rect, 0, Rect.bottom); + local_SetButtonBmp(v5, 128, (int)&Rect, pBuffer, pdwSize); ++Rect.bottom; ++Rect.right; - local_10007A68(&Rect, 0, Rect.bottom); - local_10007AF5((int)v5, 1280, (int)&Rect, a3, a4); + local_AdjustRectSize(&Rect, 0, Rect.bottom); + local_SetButtonBmp(v5, 1280, (int)&Rect, pBuffer, pdwSize); ++Rect.bottom; ++Rect.right; - v8 = Rect.bottom; + a3 = Rect.bottom; } ++v9; - result = *v9; + v4 = *v9; } while ( *v9 ); } - return result; -} */ +} // ref: 0x10007C2E -COLORREF UNKCALL local_10007C2E(HDC hdc) { return 0; } -/* { - return SetTextColor(hdc, 0xFFFFu); -} */ +void __fastcall local_SetWhiteText(HDC hdc) +{ + SetTextColor(hdc, 0xFFFFu); +} // ref: 0x10007C3B -BOOL __fastcall local_10007C3B(HWND hWnd, HWND a2, int a3, int a4) { return 0; } -/* { - HWND v4; // edi +BOOL __fastcall local_GetBottomRect(HWND hWnd1, HWND hWnd2, int width, int height) +{ BOOL result; // eax struct tagRECT Rect; // [esp+4h] [ebp-10h] - v4 = hWnd; - if ( hWnd - && a2 - && (GetWindowRect(a2, &Rect), - ScreenToClient(v4, (LPPOINT)&Rect), - ScreenToClient(v4, (LPPOINT)&Rect.right), - a3 >= Rect.left) - && a3 < Rect.right - && a4 >= Rect.top ) + if ( hWnd1 + && hWnd2 + && (GetWindowRect(hWnd2, &Rect), + ScreenToClient(hWnd1, (LPPOINT)&Rect), + ScreenToClient(hWnd1, (LPPOINT)&Rect.right), + width >= Rect.left) + && width < Rect.right + && height >= Rect.top ) { - result = a4 < Rect.bottom; + result = height < Rect.bottom; } else { result = 0; } return result; -} */ +} // ref: 0x10007C95 -int UNKCALL local_10007C95(void *arg) { return 0; } -/* { - void *v1; // esi - char v3; // [esp+4h] [ebp-40h] - - v1 = arg; - SDlgBeginPaint(arg, &v3); - return SDlgEndPaint(v1, &v3); -} */ +void __fastcall local_DlgDoPaint(HWND hWnd) +{ + char v2[64]; // [esp+4h] [ebp-40h] + + SDlgBeginPaint(hWnd, v2); + SDlgEndPaint(hWnd, v2); +} // 10010442: using guessed type int __stdcall SDlgEndPaint(_DWORD, _DWORD); // 10010448: using guessed type int __stdcall SDlgBeginPaint(_DWORD, _DWORD); // ref: 0x10007CB5 -int __fastcall local_10007CB5(HWND hDlg, int *a2) { return 0; } -/* { - int *v2; // edi - HWND v3; // ebx - int result; // eax +void __fastcall local_DoUiWndProc(HWND hWnd, DWORD *pdwMsgTbl) +{ + DWORD *v2; // edi + int i; // eax HWND v5; // eax HWND v6; // esi void *v7; // eax - v2 = a2; - v3 = hDlg; - for ( result = *a2; *v2; result = *v2 ) + v2 = pdwMsgTbl; + for ( i = *pdwMsgTbl; *v2; i = *v2 ) { - v5 = GetDlgItem(v3, result); + v5 = GetDlgItem(hWnd, i); v6 = v5; if ( v5 ) { v7 = (void *)GetWindowLongA(v5, -4); SetPropA(v6, "UIWNDPROC", v7); - SetWindowLongA(v6, -4, (LONG)local_10007D01); + SetWindowLongA(v6, -4, (LONG)local_PostUiWndProc); } ++v2; } - return result; -} */ +} // ref: 0x10007D01 -LRESULT __stdcall local_10007D01(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { return 0; } -/* { +LRESULT __stdcall local_PostUiWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ LRESULT (__stdcall *v4)(HWND, UINT, WPARAM, LPARAM); // ebx HWND v5; // eax HWND v6; // eax @@ -352,21 +306,21 @@ LRESULT __stdcall local_10007D01(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPar BOOL v10; // [esp-4h] [ebp-10h] v4 = (LRESULT (__stdcall *)(HWND, UINT, WPARAM, LPARAM))GetPropA(hWnd, "UIWNDPROC"); - switch ( Msg ) + switch ( uMsg ) { case 2u: RemovePropA(hWnd, "UIWNDPROC"); if ( !v4 ) - return DefWindowProcA(hWnd, Msg, wParam, lParam); + return DefWindowProcA(hWnd, uMsg, wParam, lParam); SetWindowLongA(hWnd, -4, (LONG)v4); goto LABEL_21; case 0xFu: - local_10007C95(hWnd); + local_DlgDoPaint(hWnd); return 0; case 0x87u: return 4; } - if ( Msg != 256 ) + if ( uMsg != 256 ) goto LABEL_21; switch ( wParam ) { @@ -400,62 +354,55 @@ LRESULT __stdcall local_10007D01(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPar SetFocus(v6); LABEL_21: if ( v4 ) - return CallWindowProcA(v4, hWnd, Msg, wParam, lParam); - return DefWindowProcA(hWnd, Msg, wParam, lParam); -} */ + return CallWindowProcA(v4, hWnd, uMsg, wParam, lParam); + return DefWindowProcA(hWnd, uMsg, wParam, lParam); +} // ref: 0x10007DE9 -int __fastcall local_10007DE9(HWND hDlg, int *a2) { return 0; } -/* { - int *v2; // edi - HWND v3; // ebx - int result; // eax +void __fastcall local_DoUiWndProc2(HWND hWnd, DWORD *pdwMsgTbl) +{ + DWORD *v2; // edi + int i; // eax HWND v5; // eax HWND v6; // esi void *v7; // eax - v2 = a2; - v3 = hDlg; - for ( result = *a2; *v2; result = *v2 ) + v2 = pdwMsgTbl; + for ( i = *pdwMsgTbl; *v2; i = *v2 ) { - v5 = GetDlgItem(v3, result); + v5 = GetDlgItem(hWnd, i); v6 = v5; if ( v5 ) { v7 = (void *)GetWindowLongA(v5, -4); SetPropA(v6, "UIWNDPROC", v7); - SetWindowLongA(v6, -4, (LONG)local_10007E35); + SetWindowLongA(v6, -4, (LONG)local_PostUiWndProc2); } ++v2; } - return result; -} */ +} // ref: 0x10007E35 -LRESULT __stdcall local_10007E35(HWND hWnd, HWND a2, WPARAM wParam, LPARAM lParam) { return 0; } -/* { +LRESULT __stdcall local_PostUiWndProc2(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ LRESULT (__stdcall *v4)(HWND, UINT, WPARAM, LPARAM); // ebx WPARAM v5; // ST0C_4 HWND v6; // eax HWND v8; // [esp+18h] [ebp+Ch] v4 = (LRESULT (__stdcall *)(HWND, UINT, WPARAM, LPARAM))GetPropA(hWnd, "UIWNDPROC"); - if ( a2 == (HWND)2 ) + switch ( uMsg ) { - RemovePropA(hWnd, "UIWNDPROC"); - if ( !v4 ) - return DefWindowProcA(hWnd, (UINT)a2, wParam, lParam); - SetWindowLongA(hWnd, -4, (LONG)v4); - } - else - { - if ( a2 == (HWND)15 ) - { - local_10007C95(hWnd); + case 2u: + RemovePropA(hWnd, "UIWNDPROC"); + if ( !v4 ) + return DefWindowProcA(hWnd, uMsg, wParam, lParam); + SetWindowLongA(hWnd, -4, (LONG)v4); + break; + case 0xFu: + local_DlgDoPaint(hWnd); return 0; - } - if ( (HWND)((char *)a2 - 15) == (HWND)498 ) - { + case 0x201u: v8 = GetFocus(); SetFocus(hWnd); InvalidateRect(v8, 0, 0); @@ -466,199 +413,164 @@ LRESULT __stdcall local_10007E35(HWND hWnd, HWND a2, WPARAM wParam, LPARAM lPara v6 = GetParent(hWnd); PostMessageA(v6, 0x111u, v5, (LPARAM)hWnd); return 0; - } } if ( v4 ) - return CallWindowProcA(v4, hWnd, (UINT)a2, wParam, lParam); - return DefWindowProcA(hWnd, (UINT)a2, wParam, lParam); -} */ + return CallWindowProcA(v4, hWnd, uMsg, wParam, lParam); + return DefWindowProcA(hWnd, uMsg, wParam, lParam); +} // ref: 0x10007F04 -BOOL UNKCALL local_10007F04(HWND hWnd) { return 0; } -/* { - HWND v1; // edi +BOOL __fastcall local_DisableKeyWaitMouse(HWND hWnd) +{ BOOL result; // eax struct tagMSG Msg; // [esp+8h] [ebp-1Ch] - v1 = hWnd; do { - while ( PeekMessageA(&Msg, v1, 0x100u, 0x108u, 1u) ) + while ( PeekMessageA(&Msg, hWnd, 0x100u, 0x108u, 1u) ) ; - result = PeekMessageA(&Msg, v1, 0x200u, 0x209u, 1u); + result = PeekMessageA(&Msg, hWnd, 0x200u, 0x209u, 1u); } while ( result ); return result; -} */ +} // ref: 0x10007F46 -int local_10007F46() { return 0; } -/* { - int result; // eax +DWORD *__cdecl local_AllocWndLongData() +{ + DWORD *result; // eax - result = SMemAlloc(272, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 480, 0); + result = (DWORD *)SMemAlloc(0x110u, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 480, 0); if ( result ) { - *(_DWORD *)result = 0; - *(_DWORD *)(result + 4) = 0; - *(_DWORD *)(result + 8) = 0; - *(_DWORD *)(result + 12) = 0; - *(_BYTE *)(result + 16) = 0; + *result = 0; + result[1] = 0; + result[2] = 0; + result[3] = 0; + *((_BYTE *)result + 16) = 0; } return result; -} */ -// 10010364: using guessed type int __stdcall SMemAlloc(_DWORD, _DWORD, _DWORD, _DWORD); +} // ref: 0x10007F72 -void UNKCALL local_10007F72(_DWORD *arg) { return; } -/* { - _DWORD *v1; // esi - - v1 = arg; - if ( arg ) +void __fastcall local_FreeMemPtr(void **p) +{ + if ( p ) { - if ( *arg ) - SMemFree(*arg, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 498, 0); - SMemFree(v1, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 499, 0); + if ( *p ) + SMemFree(*p, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 498, 0); + SMemFree(p, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 499, 0); } -} */ -// 10010340: using guessed type int __stdcall SMemFree(_DWORD, _DWORD, _DWORD, _DWORD); +} // ref: 0x10007FA4 -char *__fastcall local_10007FA4(int a1, const char *a2) { return 0; } -/* { - int v2; // esi - char *result; // eax - - v2 = a1; - if ( a1 ) +void __fastcall local_SetWndLongStr(int WndLongData, const char *pszStr) +{ + if ( WndLongData ) { - if ( a2 ) + if ( pszStr ) { - result = strncpy((char *)(a1 + 16), a2, 0xFFu); - *(_BYTE *)(v2 + 271) = 0; + strncpy((char *)(WndLongData + 16), pszStr, 0xFFu); + *(_BYTE *)(WndLongData + 271) = 0; } else { - *(_BYTE *)(a1 + 16) = 0; + *(_BYTE *)(WndLongData + 16) = 0; } } - return result; -} */ +} // ref: 0x10007FD0 -_BYTE *local_10007FD0() { return 0; } -/* { - _BYTE *result; // eax - int v1; // [esp+8h] [ebp-8h] - int v2; // [esp+Ch] [ebp-4h] +void __cdecl local_LoadArtCursor() +{ + DWORD dwHeight; // [esp+8h] [ebp-8h] + DWORD dwWidth; // [esp+Ch] [ebp-4h] - result = (_BYTE *)SBmpLoadImage("ui_art\\cursor.pcx", 0, 0, 0, &v2, &v1, 0); - if ( result ) + if ( SBmpLoadImage("ui_art\\cursor.pcx", 0, 0, 0, &dwWidth, &dwHeight, 0) ) { - dword_1002A0CC = SMemAlloc(v1 * v2, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 553, 0); - dword_1002A0D0 = SMemAlloc(v1 * v2, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 554, 0); - result = (_BYTE *)SBmpLoadImage("ui_art\\cursor.pcx", 0, dword_1002A0CC, v1 * v2, 0, 0, 0); - if ( result ) + gpCursorArt = (BYTE *)SMemAlloc(dwHeight * dwWidth, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 553, 0); + gpCursorArt2 = (BYTE *)SMemAlloc(dwHeight * dwWidth, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 554, 0); + if ( SBmpLoadImage("ui_art\\cursor.pcx", 0, gpCursorArt, dwHeight * dwWidth, 0, 0, 0) ) { - dword_10029CC0 = v2; - dword_10029CC4 = v1; - result = local_10008062(); + gdwCursWidth = dwWidth; + gdwCursHeight = dwHeight; + local_InitArtCursor(); } } - return result; -} */ -// 10010364: using guessed type int __stdcall SMemAlloc(_DWORD, _DWORD, _DWORD, _DWORD); -// 100103BE: using guessed type int __stdcall SBmpLoadImage(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); -// 10029CC0: using guessed type int dword_10029CC0; -// 10029CC4: using guessed type int dword_10029CC4; -// 1002A0CC: using guessed type int dword_1002A0CC; -// 1002A0D0: using guessed type int dword_1002A0D0; +} +// 10029CC0: using guessed type int gdwCursWidth; +// 10029CC4: using guessed type int gdwCursHeight; // ref: 0x10008062 -_BYTE *local_10008062() { return 0; } -/* { - _BYTE *result; // eax - char *v1; // ecx +void __cdecl local_InitArtCursor() +{ + BYTE *v0; // eax + BYTE *v1; // ecx int i; // esi char v3; // dl - result = (_BYTE *)dword_1002A0D0; - v1 = (char *)dword_1002A0CC; - if ( dword_1002A0D0 ) + v0 = gpCursorArt2; + v1 = gpCursorArt; + if ( gpCursorArt2 ) { - if ( dword_1002A0CC ) + if ( gpCursorArt ) { - for ( i = 0; i < dword_10029CC0 * dword_10029CC4; ++i ) + for ( i = 0; i < gdwCursWidth * gdwCursHeight; ++i ) { v3 = *v1++; if ( v3 ) - *result = 0; + *v0 = 0; else - *result = -1; - ++result; + *v0 = -1; + ++v0; } } } - return result; -} */ -// 10029CC0: using guessed type int dword_10029CC0; -// 10029CC4: using guessed type int dword_10029CC4; -// 1002A0CC: using guessed type int dword_1002A0CC; -// 1002A0D0: using guessed type int dword_1002A0D0; +} +// 10029CC0: using guessed type int gdwCursWidth; +// 10029CC4: using guessed type int gdwCursHeight; // ref: 0x100080AD -int local_100080AD() { return 0; } -/* { - int result; // eax - - if ( dword_1002A0CC ) +void __cdecl local_FreeArtCursor() +{ + if ( gpCursorArt ) { - SMemFree(dword_1002A0CC, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 571, 0); - dword_1002A0CC = 0; + SMemFree(gpCursorArt, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 571, 0); + gpCursorArt = 0; } - result = dword_1002A0D0; - if ( dword_1002A0D0 ) + if ( gpCursorArt2 ) { - result = SMemFree(dword_1002A0D0, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 575, 0); - dword_1002A0D0 = 0; + SMemFree(gpCursorArt2, "C:\\Src\\Diablo\\DiabloUI\\local.cpp", 575, 0); + gpCursorArt2 = 0; } - return result; -} */ -// 10010340: using guessed type int __stdcall SMemFree(_DWORD, _DWORD, _DWORD, _DWORD); -// 1002A0CC: using guessed type int dword_1002A0CC; -// 1002A0D0: using guessed type int dword_1002A0D0; +} // ref: 0x100080F1 -int local_100080F1() { return 0; } -/* { - if ( !dword_1002A0CC ) - local_10007FD0(); - return SDlgSetSystemCursor(dword_1002A0D0, dword_1002A0CC, &dword_10029CC0, 32512); -} */ +void __cdecl local_SetCursorArt() +{ + if ( !gpCursorArt ) + local_LoadArtCursor(); + SDlgSetSystemCursor(gpCursorArt2, gpCursorArt, &gdwCursWidth, 32512); +} // 1001044E: using guessed type int __stdcall SDlgSetSystemCursor(_DWORD, _DWORD, _DWORD, _DWORD); -// 10029CC0: using guessed type int dword_10029CC0; -// 1002A0CC: using guessed type int dword_1002A0CC; -// 1002A0D0: using guessed type int dword_1002A0D0; +// 10029CC0: using guessed type int gdwCursWidth; // ref: 0x1000811B -int local_1000811B() { return 0; } -/* { - return SDlgSetSystemCursor(0, 0, 0, 32512); -} */ +void __cdecl local_SetCursorDefault() +{ + SDlgSetSystemCursor(0, 0, 0, 32512); +} // 1001044E: using guessed type int __stdcall SDlgSetSystemCursor(_DWORD, _DWORD, _DWORD, _DWORD); // ref: 0x1000812B -int UNKCALL local_1000812B(void *arg) { return 0; } -/* { - void *v1; // esi +void __fastcall local_SetDiabloCursor(HWND hWnd) +{ HCURSOR v2; // eax - int v4; // [esp+4h] [ebp-4h] + int v3; // [esp+4h] [ebp-4h] - v4 = 0; - v1 = arg; - local_1000811B(); + v3 = 0; + local_SetCursorDefault(); v2 = LoadCursorA(hInstance, "DIABLOCURSOR"); - return SDlgSetCursor(v1, v2, 32512, &v4); -} */ + SDlgSetCursor(hWnd, v2, 32512, &v3); +} // 10010454: using guessed type int __stdcall SDlgSetCursor(_DWORD, _DWORD, _DWORD, _DWORD); diff --git a/DiabloUI/mainmenu.cpp b/DiabloUI/mainmenu.cpp index a9a45193a..ab042291d 100644 --- a/DiabloUI/mainmenu.cpp +++ b/DiabloUI/mainmenu.cpp @@ -118,7 +118,7 @@ int __stdcall MainMenu_100081E3(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPara // 10029728: using guessed type int dword_10029728; // ref: 0x10008354 -int UNKCALL MainMenu_10008354(HWND hDlg) { return 0; } +void UNKCALL MainMenu_10008354(HWND hDlg) { return; } /* { HWND v1; // esi _DWORD *v2; // eax @@ -142,7 +142,7 @@ int UNKCALL MainMenu_10008391(void *arg) { return 0; } // 1002A118: using guessed type int dword_1002A118; // ref: 0x100083A8 -int UNKCALL MainMenu_100083A8(HWND hWnd) { return 0; } +void UNKCALL MainMenu_100083A8(HWND hWnd) { return; } /* { HWND v1; // esi int v2; // eax diff --git a/DiabloUI/modem.cpp b/DiabloUI/modem.cpp index 287d00896..ffb0400cf 100644 --- a/DiabloUI/modem.cpp +++ b/DiabloUI/modem.cpp @@ -187,7 +187,7 @@ int __stdcall Modem_100086DE(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) // 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow(); // ref: 0x1000879E -_DWORD *UNKCALL Modem_1000879E(HWND hDlg) { return 0; } +void **UNKCALL Modem_1000879E(HWND hDlg) { return 0; } /* { HWND v1; // esi _DWORD *v2; // eax diff --git a/DiabloUI/okcancel.cpp b/DiabloUI/okcancel.cpp index 5eac965ae..7c7f92cba 100644 --- a/DiabloUI/okcancel.cpp +++ b/DiabloUI/okcancel.cpp @@ -126,7 +126,7 @@ HGDIOBJ __stdcall OkCancel_10008FF7(HWND a1, UINT Msg, WPARAM wParam, HWND hWnd) // 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow(); // ref: 0x10009117 -_DWORD *UNKCALL OkCancel_10009117(HWND hWnd) { return 0; } +void **UNKCALL OkCancel_10009117(HWND hWnd) { return 0; } /* { _DWORD *result; // eax _DWORD *v2; // esi diff --git a/DiabloUI/progress.cpp b/DiabloUI/progress.cpp index fda680651..9054b631f 100644 --- a/DiabloUI/progress.cpp +++ b/DiabloUI/progress.cpp @@ -89,7 +89,7 @@ int __stdcall Progress_100094F4(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPara // 10010418: using guessed type int __stdcall SDlgKillTimer(_DWORD, _DWORD); // ref: 0x100095EC -int Progress_100095EC() { return 0; } +void *Progress_100095EC() { return 0; } /* { int result; // eax diff --git a/DiabloUI/selconn.cpp b/DiabloUI/selconn.cpp index 139cd7c0b..34fde3259 100644 --- a/DiabloUI/selconn.cpp +++ b/DiabloUI/selconn.cpp @@ -1,5 +1,5 @@ // ref: 0x1000A082 -int SelConn_1000A082() { return 0; } +void *SelConn_1000A082() { return 0; } /* { return SMemAlloc(272, "C:\\Src\\Diablo\\DiabloUI\\SelConn.cpp", 124, 0); } */ diff --git a/DiabloUI/selhero.cpp b/DiabloUI/selhero.cpp index 2db8ef1fa..2250407a1 100644 --- a/DiabloUI/selhero.cpp +++ b/DiabloUI/selhero.cpp @@ -26,7 +26,7 @@ char *SelHero_1000B7B3() { return 0; } } */ // ref: 0x1000B7B9 -int SelHero_1000B7B9() { return 0; } +void *SelHero_1000B7B9() { return 0; } /* { return SMemAlloc(44, "C:\\Src\\Diablo\\DiabloUI\\SelHero.cpp", 123, 0); } */ diff --git a/DiabloUI/selipx.cpp b/DiabloUI/selipx.cpp index 1aefd9bc6..d41e7cf3b 100644 --- a/DiabloUI/selipx.cpp +++ b/DiabloUI/selipx.cpp @@ -1,5 +1,5 @@ // ref: 0x1000C610 -int SelIPX_1000C610() { return 0; } +void *SelIPX_1000C610() { return 0; } /* { return SMemAlloc(268, "C:\\Src\\Diablo\\DiabloUI\\SelIPX.cpp", 105, 0); } */ @@ -330,7 +330,7 @@ int UNKCALL SelIPX_1000CAC1(void *arg) { return 0; } // 10010340: using guessed type int __stdcall SMemFree(_DWORD, _DWORD, _DWORD, _DWORD); // ref: 0x1000CAD5 -int __stdcall SelIPX_1000CAD5(int a1, char *a2, char *a3) { return 0; } +void *__stdcall SelIPX_1000CAD5(int a1, char *a2, char *a3) { return 0; } /* { _DWORD *v3; // eax int result; // eax diff --git a/DiabloUI/selmodem.cpp b/DiabloUI/selmodem.cpp index 59445fcf7..e06aa82da 100644 --- a/DiabloUI/selmodem.cpp +++ b/DiabloUI/selmodem.cpp @@ -35,7 +35,7 @@ int __fastcall SelModem_1000E435(void *a1, int a2, int a3, char *a4, char *a5) { // 1002A4E8: using guessed type int dword_1002A4E8; // ref: 0x1000E497 -int __stdcall SelModem_1000E497(int a1, char *a2, char *a3) { return 0; } +char *__stdcall SelModem_1000E497(int a1, char *a2, char *a3) { return 0; } /* { int result; // eax int v4; // esi @@ -59,7 +59,7 @@ int __stdcall SelModem_1000E497(int a1, char *a2, char *a3) { return 0; } // 1002A4DC: using guessed type int dword_1002A4DC; // ref: 0x1000E4EC -int SelModem_1000E4EC() { return 0; } +void *SelModem_1000E4EC() { return 0; } /* { return SMemAlloc(264, "C:\\Src\\Diablo\\DiabloUI\\SelModem.cpp", 72, 0); } */ diff --git a/DiabloUI/selregn.cpp b/DiabloUI/selregn.cpp index 257adcc44..8901742e5 100644 --- a/DiabloUI/selregn.cpp +++ b/DiabloUI/selregn.cpp @@ -1,5 +1,5 @@ // ref: 0x1000EF42 -int SelRegn_1000EF42() { return 0; } +void *SelRegn_1000EF42() { return 0; } /* { return SMemAlloc(136, "C:\\Src\\Diablo\\DiabloUI\\SelRegn.cpp", 76, 0); } */ diff --git a/DiabloUI/selyesno.cpp b/DiabloUI/selyesno.cpp index 2d5d7c7f6..fa80a3be1 100644 --- a/DiabloUI/selyesno.cpp +++ b/DiabloUI/selyesno.cpp @@ -124,7 +124,7 @@ HWND UNKCALL SelYesNo_1000FBC7(HWND hDlg) { return 0; } // 1002A504: using guessed type int dword_1002A504; // ref: 0x1000FC1C -int UNKCALL SelYesNo_1000FC1C(HWND hWnd) { return 0; } +void UNKCALL SelYesNo_1000FC1C(HWND hWnd) { return; } /* { HWND v1; // esi HWND v2; // eax diff --git a/DiabloUI/title.cpp b/DiabloUI/title.cpp index c1306cda4..08687c72e 100644 --- a/DiabloUI/title.cpp +++ b/DiabloUI/title.cpp @@ -63,7 +63,7 @@ int Title_1000FEED() { return 0; } // 1002A588: using guessed type int dword_1002A588; // ref: 0x1000FF0F -_DWORD *UNKCALL Title_1000FF0F(HWND hWnd) { return 0; } +void **UNKCALL Title_1000FF0F(HWND hWnd) { return 0; } /* { HWND v1; // esi _DWORD *result; // eax @@ -206,7 +206,7 @@ signed int Title_100100DC() { return 0; } // 1002A588: using guessed type int dword_1002A588; // ref: 0x100100E7 -_DWORD *UNKCALL Title_100100E7(HWND hWnd) { return 0; } +void **UNKCALL Title_100100E7(HWND hWnd) { return 0; } /* { HWND v1; // esi diff --git a/MakefileVC b/MakefileVC index 3a32c938e..63e45535e 100644 --- a/MakefileVC +++ b/MakefileVC @@ -1,20 +1,52 @@ -VC_DIR ?= $(HOME)/DevStudio/VC -VC_BIN_DIR = $(VC_DIR)/bin -VC_INC_DIR = $(VC_DIR)/include -VC_LIB_DIR = $(VC_DIR)/lib -IDE_DIR ?= $(HOME)/DevStudio/SharedIDE +VC5_DIR ?= $(HOME)/DevStudio_5.10/VC + +# The $(VS6_DIR) directory is a copy of the "Microsoft Visual Studio" directory. +# +# To get a working setup on Linux or other "portable" copies of VS, +# the following DLLs have to be compied to the +# $(VS6_DIR)/VC98/Bin directory. +# +# - $(VS6_DIR)/Common/MSDev98/Bin/MSPDB60.DLL +VS6_DIR ?= $(HOME)/VS6 + +VC6_DIR = $(VS6_DIR)/VC98 + +VC6_BIN_DIR = $(VC6_DIR)/Bin +VC6_INC_DIR = $(VC6_DIR)/Include +VC6_LIB_DIR = $(VC6_DIR)/Lib + +VC5_LIB_DIR = $(VC5_DIR)/lib + +IDE_DIR ?= $(VS6_DIR)/Common/MSDev98 IDE_BIN_DIR = $(IDE_DIR)/bin ifeq ($(OS),Windows_NT) - CL = $(VC_BIN_DIR)/CL.EXE + CL = $(VC6_BIN_DIR)/CL.EXE RC = $(IDE_BIN_DIR)/RC.EXE + VC5_LINK = $(VC5_DIR)/bin/link.exe + VC6_LINK = $(VC6_BIN_DIR)/link.exe else - CL = wine $(VC_BIN_DIR)/CL.EXE + CL = wine $(VC6_BIN_DIR)/CL.EXE RC = wine $(IDE_BIN_DIR)/RC.EXE + VC5_LINK = wine $(VC5_DIR)/bin/link.exe + VC6_LINK = wine $(VC6_BIN_DIR)/link.exe endif -all: devilution.exe +CFLAGS=/nologo /c /GX /W3 /O1 /I $(VC6_INC_DIR) /FD /MT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fp"Diablo.pch" /YX /Gm /Zi +LINKFLAGS=/nologo /subsystem:windows /machine:I386 /incremental:no -DIABLO_SRC=$(sort $(wildcard Source/*.cpp)) +ifeq ($(MAKE_BUILD),pdb) + VC_LINK = $(VC6_LINK) + LINKFLAGS += /pdb:"Diablo.pdb" /LIBPATH:$(VC6_LIB_DIR) /debug +else + VC_LINK=$(VC5_LINK) + LINKFLAGS+= /LIBPATH:$(VC5_LIB_DIR) +endif + +all: Diablo.exe + +# fix compilation order to match the VC6 workspace files +DIABLO_SRC=$(sort $(filter-out Source/render.cpp, $(wildcard Source/*.cpp))) +DIABLO_SRC += Source/render.cpp OBJS=$(DIABLO_SRC:.cpp=.obj) PKWARE_SRC=$(sort $(wildcard 3rdParty/PKWare/*.cpp)) @@ -23,23 +55,27 @@ PKWARE_OBJS=$(PKWARE_SRC:.cpp=.obj) STORM_SRC=$(sort $(wildcard 3rdParty/Storm/Source/*.cpp)) STORM_OBJS=$(STORM_SRC:.cpp=.obj) -DIABLOUI_SRC=$(sort $(wildcard DiabloUI/*.cpp)) +DIABLOUI_SRC=DiabloUI/diabloui.cpp DIABLOUI_OBJS=$(DIABLOUI_SRC:.cpp=.obj) -devilution.exe: $(OBJS) $(PKWARE_OBJS) diablo.res DiabloUI/diabloui.lib 3rdParty/Storm/Source/storm.lib - $(CL) /nologo /Fe$@ $(OBJS) $(PKWARE_OBJS) diablo.res /link /LIBPATH:$(VC_LIB_DIR) advapi32.lib gdi32.lib shell32.lib user32.lib version.lib DiabloUI/diabloui.lib 3rdParty/Storm/Source/storm.lib +Diablo.exe: main_files $(PKWARE_OBJS) diablo.res DiabloUI/diabloui.lib 3rdParty/Storm/Source/storm.lib + $(VC_LINK) /OUT:$@ $(LINKFLAGS) $(OBJS) $(PKWARE_OBJS) diablo.res advapi32.lib gdi32.lib shell32.lib user32.lib version.lib DiabloUI/diabloui.lib 3rdParty/Storm/Source/storm.lib -DiabloUI/diabloui.lib: $(DIABLOUI_OBJS) - $(CL) $^ /link /nologo /dll /subsystem:windows /machine:I386 /LIBPATH:$(VC_LIB_DIR) /def:"DiabloUI/diabloui.def" /out:DiabloUI/diabloui.dll +DiabloUI/diabloui.lib: $(DIABLOUI_OBJS) 3rdParty/Storm/Source/storm.lib + $(CL) $^ /link /LINK50COMPAT /nologo /dll /subsystem:windows /machine:I386 /LIBPATH:$(VC6_LIB_DIR) advapi32.lib gdi32.lib shell32.lib user32.lib version.lib 3rdParty/Storm/Source/storm.lib /def:"DiabloUI/diabloui.def" /out:DiabloUI/diabloui.dll 3rdParty/Storm/Source/storm.lib: $(STORM_OBJS) - $(CL) $^ /link /nologo /dll /subsystem:windows /machine:I386 /LIBPATH:$(VC_LIB_DIR) /def:"3rdParty/Storm/Source/storm.def" /out:3rdParty/Storm/Source/storm.dll + $(CL) $^ /link /LINK50COMPAT /nologo /dll /subsystem:windows /machine:I386 /LIBPATH:$(VC6_LIB_DIR) /def:"3rdParty/Storm/Source/storm.def" /out:3rdParty/Storm/Source/storm.dll + +# compiles all main source files with once compiler call +main_files: + $(CL) $(CFLAGS) /FoSource/ $(DIABLO_SRC) %.obj: %.cpp - $(CL) /nologo /c /O1 /W3 /MT /I $(VC_INC_DIR) /Fo$@ $< + $(CL) $(CFLAGS) /Fo$@ $< diablo.res: Diablo.rc - $(RC) /i $(VC_INC_DIR) /i $(VC_DIR)/mfc/include /l 0x409 /fo $@ $< + $(RC) /i $(VC6_INC_DIR) /i $(VC6_DIR)/MFC/Include /l 0x409 /fo $@ $< clean: @$(RM) -v $(OBJS) $(PKWARE_OBJS) $(STORM_OBJS) $(DIABLOUI_OBJS) DiabloUI/diabloui.{exp,lib,dll} 3rdParty/Storm/Source/storm.{exp,lib,dll}