Skip to content

Commit

Permalink
Fix junk (diasurgical#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxyhaxz committed Aug 22, 2018
1 parent 0a3503d commit 5ff8756
Show file tree
Hide file tree
Showing 25 changed files with 117 additions and 117 deletions.
2 changes: 1 addition & 1 deletion 3rdParty/Storm/Source/storm.cpp
Expand Up @@ -36,7 +36,7 @@ BOOL STORMAPI SNetSendTurn(char *data, size_t databytes) rBool;
BOOL STORMAPI SNetSetGameMode(DWORD modeFlags, bool makePublic) rBool;

BOOL STORMAPI SNetEnumGamesEx(int a1, int a2, int (__fastcall *callback)(DWORD, DWORD, DWORD), int *hintnextcall) rBool;
BOOL STORMAPI SNetSetServerChatCommand(const char *command) rBool;
BOOL STORMAPI SNetSendServerChatCommand(const char *command) rBool;

BOOL STORMAPI SNetDisconnectAll(DWORD flags) rBool;
BOOL STORMAPI SNetCreateLadderGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, DWORD dwGameLadderType, DWORD dwGameModeFlags, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID) rBool;
Expand Down
2 changes: 1 addition & 1 deletion 3rdParty/Storm/Source/storm.def
Expand Up @@ -34,7 +34,7 @@ EXPORTS
SNetUnregisterEventHandler @131 NONAME

SNetEnumGamesEx @133 NONAME
SNetSetServerChatCommand @134 NONAME
SNetSendServerChatCommand @134 NONAME
;SNetSendDatagram @135 NONAME
;SNetReceiveDatagram @136 NONAME
SNetDisconnectAll @137 NONAME
Expand Down
2 changes: 1 addition & 1 deletion 3rdParty/Storm/Source/storm.h
Expand Up @@ -432,7 +432,7 @@ SNetSetGameMode(
#define SNMakeGamePublic() SNetSetGameMode( (DWORD mode, SNetGetGameInfo(GAMEINFO_MODEFLAGS, &mode, 4), mode), true)

BOOL STORMAPI SNetEnumGamesEx(int a1, int a2, int (__fastcall *callback)(DWORD, DWORD, DWORD), int *hintnextcall);
BOOL STORMAPI SNetSetServerChatCommand(const char *command);
BOOL STORMAPI SNetSendServerChatCommand(const char *command);

BOOL STORMAPI SNetDisconnectAll(DWORD flags);
BOOL STORMAPI SNetCreateLadderGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, DWORD dwGameLadderType, DWORD dwGameModeFlags, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID);
Expand Down
4 changes: 2 additions & 2 deletions 3rdParty/Storm/Source/storm_gcc.def
Expand Up @@ -51,8 +51,8 @@ EXPORTS
SNetUnregisterEventHandler@8 @131 NONAME

SNetEnumGamesEx @133 NONAME
SNetSetServerChatCommand @134 NONAME
SNetSetServerChatCommand@4 @134 NONAME
SNetSendServerChatCommand @134 NONAME
SNetSendServerChatCommand@4 @134 NONAME
;SNetSendDatagram @135 NONAME
;SNetReceiveDatagram @136 NONAME
SNetDisconnectAll @137 NONAME
Expand Down
2 changes: 1 addition & 1 deletion Diablo.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Diablo.vcxproj
Expand Up @@ -190,7 +190,7 @@
<ClCompile Include="Source\track.cpp" />
<ClCompile Include="Source\trigs.cpp" />
<ClCompile Include="Source\wave.cpp" />
<ClCompile Include="Source\world.cpp" />
<ClCompile Include="Source\render.cpp" />
</ItemGroup>
<ItemGroup>
<Image Include="Diablo.ico" />
Expand Down Expand Up @@ -270,7 +270,7 @@
<ClInclude Include="Source\track.h" />
<ClInclude Include="Source\trigs.h" />
<ClInclude Include="Source\wave.h" />
<ClInclude Include="Source\world.h" />
<ClInclude Include="Source\render.h" />
<ClInclude Include="structs.h" />
<ClInclude Include="types.h" />
</ItemGroup>
Expand All @@ -287,4 +287,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
8 changes: 4 additions & 4 deletions Diablo.vcxproj.filters
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
Expand Down Expand Up @@ -220,7 +220,7 @@
<ClCompile Include="Source\wave.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\world.cpp">
<ClCompile Include="Source\render.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="3rdParty\PKWare\explode.cpp">
Expand Down Expand Up @@ -445,7 +445,7 @@
<ClInclude Include="Source\wave.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\world.h">
<ClInclude Include="Source\render.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="defs.h">
Expand All @@ -464,4 +464,4 @@
<Filter>PKWare</Filter>
</ClInclude>
</ItemGroup>
</Project>
</Project>
67 changes: 31 additions & 36 deletions DiabloUI/diabloui.h
@@ -1,45 +1,40 @@
/*
* Diablo(TM)
*
* Copyright (C) 1996 Blizzard Entertainment
* All Rights Reserved.
*
* DiabloUI.h
* definitions for DiabloUI
*/

//HEADER_GOES_HERE
#ifndef __DIABLOUI_H__
#define __DIABLOUI_H__

#ifdef __GNUC__
extern "C" {
#endif

void __cdecl UiDestroy(); // { return; }
void __stdcall UiTitleDialog(int a1); // { return; }
void __cdecl UiInitialize(); // { return; }
void __stdcall UiCopyProtError(int a1); // { return; }
void __stdcall UiAppActivate(int a1); // { return; }
int __stdcall UiValidPlayerName(char *a1); // { return 0; }
int __stdcall UiSelHeroMultDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, int *a6, char *name); // { return 0; }
int __stdcall UiSelHeroSingDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, char *name, int *difficulty); // { return 0; }
void __stdcall UiCreditsDialog(int a1); // { return; }
int __stdcall UiMainMenuDialog(char *name, int *a2, void *fnSound, int a4); // { return 0; }
int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5); // { return 0; }
int __cdecl UiProfileGetString(); // { return; }
void __cdecl UiProfileCallback(); // { return; }
void __cdecl UiProfileDraw(); // { return; }
void __cdecl UiCategoryCallback(); // { return; }
void __cdecl UiGetDataCallback(); // { return; }
void __cdecl UiAuthCallback(); // { return; }
void __cdecl UiSoundCallback(); // { return; }
void __cdecl UiMessageBoxCallback(); // { return; }
void __cdecl UiDrawDescCallback(); // { return; }
void __cdecl UiCreateGameCallback(); // { return; }
void __cdecl UiArtCallback(); // { return; }
int __stdcall UiSelectGame(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *a6); // { return 0; }
int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *type); // { return 0; }
int __stdcall UiCreatePlayerDescription(_uiheroinfo *info, int mode, char *desc); // { return 0; }
int __stdcall UiSetupPlayerInfo(char *str, _uiheroinfo *info, int mode); // { return 0; }
void __cdecl UiDestroy();
void __stdcall UiTitleDialog(int a1);
void __cdecl UiInitialize();
void __stdcall UiCopyProtError(int a1);
void __stdcall UiAppActivate(int a1);
int __stdcall UiValidPlayerName(char *a1);
int __stdcall UiSelHeroMultDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, int *a6, char *name);
int __stdcall UiSelHeroSingDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, char *name, int *difficulty);
void __stdcall UiCreditsDialog(int a1);
int __stdcall UiMainMenuDialog(char *name, int *a2, void *fnSound, int a4);
int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5);
int __cdecl UiProfileGetString();
void __cdecl UiProfileCallback();
void __cdecl UiProfileDraw();
void __cdecl UiCategoryCallback();
void __cdecl UiGetDataCallback();
void __cdecl UiAuthCallback();
void __cdecl UiSoundCallback();
void __cdecl UiMessageBoxCallback();
void __cdecl UiDrawDescCallback();
void __cdecl UiCreateGameCallback();
void __cdecl UiArtCallback();
int __stdcall UiSelectGame(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *a6);
int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *type);
int __stdcall UiCreatePlayerDescription(_uiheroinfo *info, int mode, char *desc);
int __stdcall UiSetupPlayerInfo(char *str, _uiheroinfo *info, int mode);

#ifdef __GNUC__
}
#endif

#endif /* __DIABLOUI_H__ */
4 changes: 2 additions & 2 deletions Source/capture.cpp
Expand Up @@ -14,7 +14,7 @@ void __cdecl CaptureScreen()
lpDDPalette->GetEntries(0, 0, 256, palette);
RedPalette(palette);

dx_lock_mutex();
lock_buf_priv();
bool success = CaptureHdr(hObject, 640, 480);
if (success)
{
Expand All @@ -24,7 +24,7 @@ void __cdecl CaptureScreen()
success = CapturePal(hObject, palette);
}
}
dx_unlock_mutex();
unlock_buf_priv();
CloseHandle(hObject);

if (!success)
Expand Down
8 changes: 4 additions & 4 deletions Source/dx.cpp
Expand Up @@ -184,7 +184,7 @@ HRESULT __fastcall dx_DirectDrawCreate(GUID *guid, IDirectDraw **DD, void *unkno
return ((int (__stdcall *)(GUID *, IDirectDraw **, void *))v5)(v8, v3, unknown);
}

void __cdecl dx_lock_mutex()
void __cdecl lock_buf_priv()
{
Screen *v0; // eax
int v1; // eax
Expand Down Expand Up @@ -215,7 +215,7 @@ void __cdecl dx_lock_mutex()
}
// 69CF0C: using guessed type int screen_buf_end;

void __cdecl dx_unlock_mutex()
void __cdecl unlock_buf_priv()
{
Screen *v0; // eax
int v1; // eax
Expand Down Expand Up @@ -287,12 +287,12 @@ void __cdecl dx_reinit()
ClearCursor();
v0 = sgdwLockCount;
while ( sgdwLockCount )
dx_unlock_mutex();
unlock_buf_priv();
dx_cleanup();
drawpanflag = 255;
dx_init(ghMainWnd);
for ( ; v0; --v0 )
dx_lock_mutex();
lock_buf_priv();
LeaveCriticalSection(&sgMemCrit);
}
// 52571C: using guessed type int drawpanflag;
8 changes: 4 additions & 4 deletions Source/dx.h
Expand Up @@ -23,10 +23,10 @@ void __fastcall dx_init(HWND hWnd);
void __cdecl dx_create_back_buffer();
void __cdecl dx_create_primary_surface();
HRESULT __fastcall dx_DirectDrawCreate(GUID *guid, IDirectDraw **DD, void *unknown);
void __cdecl j_dx_lock_mutex();
void __cdecl dx_lock_mutex();
void __cdecl j_dx_unlock_mutex();
void __cdecl dx_unlock_mutex();
void __cdecl j_lock_buf_priv();
void __cdecl lock_buf_priv();
void __cdecl j_unlock_buf_priv();
void __cdecl unlock_buf_priv();
void __cdecl dx_cleanup();
void __cdecl dx_reinit();
void __cdecl j_dx_reinit();
Expand Down
4 changes: 2 additions & 2 deletions Source/gamemenu.cpp
Expand Up @@ -109,7 +109,7 @@ void __cdecl gamemenu_quit_game()

void __cdecl gamemenu_load_game()
{
LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi
WNDPROC saveProc; // edi

saveProc = SetWindowProc(DisableInputWndProc);
gamemenu_off();
Expand All @@ -132,7 +132,7 @@ void __cdecl gamemenu_load_game()

void __cdecl gamemenu_save_game()
{
LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi
WNDPROC saveProc; // edi

if ( pcurs == CURSOR_HAND )
{
Expand Down
4 changes: 2 additions & 2 deletions Source/gamemenu.h
Expand Up @@ -9,8 +9,8 @@ void __cdecl gamemenu_off();
void __cdecl gamemenu_handle_previous();
void __cdecl gamemenu_new_game();
void __cdecl gamemenu_quit_game();
void __cdecl gamemenu_load_game();
void __cdecl gamemenu_save_game();
void __cdecl gamemenu_load_game(); // should have 1-2 args
void __cdecl gamemenu_save_game(); // should have 1-2 args
void __cdecl gamemenu_restart_town();
void __cdecl gamemenu_options();
void __cdecl gamemenu_get_music();
Expand Down
6 changes: 3 additions & 3 deletions Source/interfac.cpp
Expand Up @@ -49,7 +49,7 @@ void __cdecl DrawCutscene()
{
unsigned int v0; // esi

dx_lock_mutex();
lock_buf_priv();
CelDecodeOnly(64, 639, sgpBackCel, 1, 640);
v0 = 0;
if ( sgdwProgress )
Expand All @@ -61,7 +61,7 @@ void __cdecl DrawCutscene()
progress_id);
while ( v0 < sgdwProgress );
}
dx_unlock_mutex();
unlock_buf_priv();
drawpanflag = 255;
scrollrt_draw_game_screen(0);
}
Expand All @@ -85,7 +85,7 @@ void __fastcall DrawProgress(int screen_x, int screen_y, int progress_id)

void __fastcall ShowProgress(int uMsg)
{
LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi
WNDPROC saveProc; // edi
bool v3; // cl
int v4; // eax
int v5; // edx
Expand Down
2 changes: 1 addition & 1 deletion Source/movie.cpp
Expand Up @@ -21,7 +21,7 @@ struct movie_cpp_init
void __fastcall play_movie(char *pszMovie, bool user_can_close)
{
char *v2; // esi
LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi
WNDPROC saveProc; // edi
//int v4; // eax
MSG Msg; // [esp+8h] [ebp-24h]
BOOL v6; // [esp+24h] [ebp-8h]
Expand Down
2 changes: 2 additions & 0 deletions Source/mpqapi.cpp
Expand Up @@ -12,6 +12,8 @@ bool save_archive_open; // weak

int mpqapi_inf = 0x7F800000; // weak

//note: 32872 = 32768 + 104 (sizeof(TMPQHEADER))

/* rdata */

HANDLE sghArchive = (HANDLE)0xFFFFFFFF; // idb
Expand Down
2 changes: 1 addition & 1 deletion Source/msgcmd.cpp
Expand Up @@ -62,7 +62,7 @@ void __cdecl msgcmd_send_chat()
if ( (unsigned int)(v1 - sgdwMsgCmdTimer) >= 2000 )
{
sgdwMsgCmdTimer = v1;
SNetSetServerChatCommand(v0->command);
SNetSendServerChatCommand(v0->command);
msgcmd_delete_server_cmd_W(&sgChat_Cmd, v0);
}
}
Expand Down
14 changes: 7 additions & 7 deletions Source/objects.cpp
Expand Up @@ -2838,24 +2838,24 @@ void __fastcall Obj_BCrossDamage(int i)
int v4; // edx
char v5; // al
int v6; // ecx
int damage[5]; // [esp+4h] [ebp-18h]
int damage[4]; // [esp+4h] [ebp-18h]
int v8; // [esp+18h] [ebp-4h]

v1 = myplr;
v8 = i;
v2 = plr[myplr]._pmode == PM_DEATH;
damage[1] = 6;
damage[2] = 8;
damage[3] = 10;
damage[4] = 12;
damage[0] = 6;
damage[1] = 8;
damage[2] = 10;
damage[3] = 12;
if ( !v2 )
{
v3 = plr[v1]._pFireResist;
if ( v3 > 0 )
damage[(unsigned char)leveltype] -= v3 * damage[(unsigned char)leveltype] / 100;
damage[(unsigned char)leveltype-1] -= v3 * damage[(unsigned char)leveltype-1] / 100;
if ( plr[v1].WorldX == object[v8]._ox && plr[v1].WorldY == object[v8]._oy - 1 )
{
v4 = damage[(unsigned char)leveltype];
v4 = damage[(unsigned char)leveltype-1];
plr[v1]._pHitPoints -= v4;
plr[v1]._pHPBase -= v4;
if ( (signed int)(plr[v1]._pHitPoints & 0xFFFFFFC0) <= 0 )
Expand Down

0 comments on commit 5ff8756

Please sign in to comment.