From 98b0b5e71f4090fb1b33a1388689a2ecec23a8ef Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 6 Jan 2019 00:54:50 +0100 Subject: [PATCH] Compile mpqapi.cpp as C (#554) * Fix mpqapi header * Compile mpqapi.cpp as C --- MakefileVC | 2 +- Source/mpqapi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MakefileVC b/MakefileVC index 5da1f69df..c8c50c469 100644 --- a/MakefileVC +++ b/MakefileVC @@ -58,7 +58,7 @@ DIABLO_SRC += Source/render.cpp OBJS=$(DIABLO_SRC:.cpp=.obj) # hardcoded list of src files, because only some of them are ready to be compiled as C instead of C++ # once all files compile as C we should use the /TC flag abd DIABLO_SRC instead -DIABLO_SRC_FIXED = Source/appfat.cpp /TcSource/automap.cpp /TcSource/capture.cpp /TcSource/codec.cpp Source/control.cpp /TcSource/cursor.cpp /TcSource/dead.cpp /TcSource/debug.cpp /TcSource/diablo.cpp /TcSource/doom.cpp /TcSource/drlg_l1.cpp /TcSource/drlg_l2.cpp Source/drlg_l3.cpp /TcSource/drlg_l4.cpp Source/dthread.cpp Source/dx.cpp /TcSource/effects.cpp /TcSource/encrypt.cpp Source/engine.cpp /TcSource/error.cpp Source/fault.cpp /TcSource/gamemenu.cpp /TcSource/gendung.cpp /TcSource/gmenu.cpp /TcSource/help.cpp /TcSource/init.cpp /TcSource/interfac.cpp /TcSource/inv.cpp Source/items.cpp Source/lighting.cpp /TcSource/loadsave.cpp Source/logging.cpp /TcSource/mainmenu.cpp /TcSource/minitext.cpp /TcSource/missiles.cpp Source/monster.cpp /TcSource/movie.cpp Source/mpqapi.cpp /TcSource/msg.cpp Source/msgcmd.cpp /TcSource/multi.cpp Source/nthread.cpp Source/objects.cpp /TcSource/pack.cpp /TcSource/palette.cpp /TcSource/path.cpp /TcSource/pfile.cpp /TcSource/player.cpp /TcSource/plrmsg.cpp /TcSource/portal.cpp /TcSource/quests.cpp /TcSource/restrict.cpp /TcSource/scrollrt.cpp /TcSource/setmaps.cpp /TcSource/sha.cpp /TcSource/sound.cpp /TcSource/spells.cpp Source/stores.cpp /TcSource/sync.cpp /TcSource/textdat.cpp /TcSource/themes.cpp /TcSource/tmsg.cpp /TcSource/town.cpp /TcSource/towners.cpp /TcSource/track.cpp /TcSource/trigs.cpp /TcSource/wave.cpp /TcSource/render.cpp +DIABLO_SRC_FIXED = Source/appfat.cpp /TcSource/automap.cpp /TcSource/capture.cpp /TcSource/codec.cpp Source/control.cpp /TcSource/cursor.cpp /TcSource/dead.cpp /TcSource/debug.cpp /TcSource/diablo.cpp /TcSource/doom.cpp /TcSource/drlg_l1.cpp /TcSource/drlg_l2.cpp Source/drlg_l3.cpp /TcSource/drlg_l4.cpp Source/dthread.cpp Source/dx.cpp /TcSource/effects.cpp /TcSource/encrypt.cpp Source/engine.cpp /TcSource/error.cpp Source/fault.cpp /TcSource/gamemenu.cpp /TcSource/gendung.cpp /TcSource/gmenu.cpp /TcSource/help.cpp /TcSource/init.cpp /TcSource/interfac.cpp /TcSource/inv.cpp Source/items.cpp Source/lighting.cpp /TcSource/loadsave.cpp Source/logging.cpp /TcSource/mainmenu.cpp /TcSource/minitext.cpp /TcSource/missiles.cpp Source/monster.cpp /TcSource/movie.cpp /TcSource/mpqapi.cpp /TcSource/msg.cpp Source/msgcmd.cpp /TcSource/multi.cpp Source/nthread.cpp Source/objects.cpp /TcSource/pack.cpp /TcSource/palette.cpp /TcSource/path.cpp /TcSource/pfile.cpp /TcSource/player.cpp /TcSource/plrmsg.cpp /TcSource/portal.cpp /TcSource/quests.cpp /TcSource/restrict.cpp /TcSource/scrollrt.cpp /TcSource/setmaps.cpp /TcSource/sha.cpp /TcSource/sound.cpp /TcSource/spells.cpp Source/stores.cpp /TcSource/sync.cpp /TcSource/textdat.cpp /TcSource/themes.cpp /TcSource/tmsg.cpp /TcSource/town.cpp /TcSource/towners.cpp /TcSource/track.cpp /TcSource/trigs.cpp /TcSource/wave.cpp /TcSource/render.cpp PKWARE_SRC=$(sort $(wildcard 3rdParty/PKWare/*.cpp)) PKWARE_OBJS=$(PKWARE_SRC:.cpp=.obj) diff --git a/Source/mpqapi.h b/Source/mpqapi.h index c95bf88fe..0ad24d385 100644 --- a/Source/mpqapi.h +++ b/Source/mpqapi.h @@ -9,7 +9,7 @@ extern BOOLEAN save_archive_modified; // weak extern _BLOCKENTRY *sgpBlockTbl; extern BOOLEAN save_archive_open; // weak -BOOL __fastcall mpqapi_set_hidden(char *pszArchive, BOOL hidden); +BOOL __fastcall mpqapi_set_hidden(const char *pszArchive, BOOL hidden); void __fastcall mpqapi_store_creation_time(const char *pszArchive, int dwChar); BOOLEAN __fastcall mpqapi_reg_load_modification_time(char *dst, int size); void __fastcall mpqapi_xor_buf(char *pbData);