From eefb443f87fb7fee2225711529b4fa507a9ced45 Mon Sep 17 00:00:00 2001 From: ChaosMarc Date: Wed, 10 Oct 2018 13:31:50 +0200 Subject: [PATCH] fix VC build --- 3rdParty/Storm/Source/storm.h | 2 +- Source/automap.cpp | 4 ++-- Source/engine.cpp | 2 +- Source/pfile.cpp | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/3rdParty/Storm/Source/storm.h b/3rdParty/Storm/Source/storm.h index 369bf349d..8434276ce 100644 --- a/3rdParty/Storm/Source/storm.h +++ b/3rdParty/Storm/Source/storm.h @@ -1295,7 +1295,7 @@ void __cdecl SDrawDestroy(void); bool __cdecl StormDestroy(void); bool __stdcall SFileSetBasePath(char *); void __cdecl SDrawRealizePalette(void); -bool __cdecl SVidPlayContinue(void); +BOOL __cdecl SVidPlayContinue(void); bool __stdcall SNetGetOwnerTurnsWaiting(int *); void * __stdcall SNetUnregisterEventHandler(int,void (__stdcall*)(struct _SNETEVENT *)); void * __stdcall SNetRegisterEventHandler(int,void (__stdcall*)(struct _SNETEVENT *)); diff --git a/Source/automap.cpp b/Source/automap.cpp index 50bcf2d7a..23295b291 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -5,8 +5,8 @@ #ifndef NO_GLOBALS USHORT automaptype[512]; #endif -STATIC int MapX; -STATIC int MapY; +static int MapX; +static int MapY; #ifndef NO_GLOBALS bool automapflag; // idb char AMbyte_4B7E4C[32]; diff --git a/Source/engine.cpp b/Source/engine.cpp index 63259e091..24c3c8f5d 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -11,7 +11,7 @@ int orgseed; // weak int sgnWidth; int sglGameSeed; // weak #endif -STATIC CRITICAL_SECTION sgMemCrit; +static CRITICAL_SECTION sgMemCrit; #ifndef NO_GLOBALS int SeedCount; // weak int dword_52B99C; // bool valid - if x/y are in bounds diff --git a/Source/pfile.cpp b/Source/pfile.cpp index 255969328..3d8963713 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -5,8 +5,8 @@ #define PASSWORD_SINGLE "xrgyrkj1" #define PASSWORD_MULTI "szqnlsk1" -STATIC int pfile_cpp_init_value; -STATIC char hero_names[MAX_CHARACTERS][PLR_NAME_LEN]; +static int pfile_cpp_init_value; +static char hero_names[MAX_CHARACTERS][PLR_NAME_LEN]; #ifndef NO_GLOBALS BOOL gbValidSaveFile; // idb #endif @@ -281,7 +281,7 @@ BOOL __stdcall pfile_ui_set_hero_infos(BOOL (__stdcall *ui_add_hero_info)(_uiher break; GetSaveDirectory(FileName, 260, (int)lpSrcStr); v1 = strrchr(FileName, '\\') + 1; - if ( v1 != (char *)1 && OpenFile(FileName, &ReOpenBuff, 0x4000u) != INVALID_HANDLE ) + if ( v1 != (char *)1 && OpenFile(FileName, &ReOpenBuff, 0x4000u) != HFILE_ERROR ) { if ( !SRegLoadString("Diablo\\Converted", (const char *)v1, 0, NewFileName, 260) ) { @@ -289,7 +289,7 @@ BOOL __stdcall pfile_ui_set_hero_infos(BOOL (__stdcall *ui_add_hero_info)(_uiher { v3 = save_num++; pfile_get_save_path(NewFileName, 260, v3); - if ( OpenFile(NewFileName, &ReOpenBuff, 0x4000u) == INVALID_HANDLE ) + if ( OpenFile(NewFileName, &ReOpenBuff, 0x4000u) == HFILE_ERROR ) break; if ( (unsigned int)save_num >= MAX_CHARACTERS ) goto LABEL_13;