From c591711fe8011dcd760393c62bc059afdcb7750a Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 11 Jan 2015 04:52:15 +0000 Subject: [PATCH] MSVC C++ build fixes. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4890 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/polymer.h | 7 +++---- polymer/eduke32/build/src/build.c | 1 + polymer/eduke32/build/src/engine.c | 3 +-- polymer/eduke32/build/src/osd.c | 2 +- polymer/eduke32/build/src/sdlayer.c | 1 + polymer/eduke32/build/src/winlayer.c | 1 + polymer/eduke32/source/game.h | 5 ----- polymer/eduke32/source/global.c | 9 +++++++++ 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/polymer/eduke32/build/include/polymer.h b/polymer/eduke32/build/include/polymer.h index c22d29478..b16d49d39 100644 --- a/polymer/eduke32/build/include/polymer.h +++ b/polymer/eduke32/build/include/polymer.h @@ -330,18 +330,17 @@ void polymer_texinvalidate(void); void polymer_definehighpalookup(char basepalnum, char palnum, char *fn); int32_t polymer_havehighpalookup(int32_t basepalnum, int32_t palnum); + +extern _prsprite *prsprites[MAXSPRITES]; static inline void polymer_invalidatesprite(int32_t i) { - extern _prsprite *prsprites[MAXSPRITES]; - if (prsprites[i]) prsprites[i]->hash = 0xDEADBEEF; } +extern GLuint prartmaps[MAXTILES]; static inline void polymer_invalidateartmap(int32_t tilenum) { - extern GLuint prartmaps[MAXTILES]; - if (prartmaps[tilenum]) { bglDeleteTextures(1, &prartmaps[tilenum]); diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index dd94c693b..eb516ed0a 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -83,6 +83,7 @@ static int32_t hvel, vel, svel, angvel; int32_t g_doHardcodedMovement = 1; static int32_t mousexsurp = 0, mouseysurp = 0; +double msens = 1.0; int32_t grponlymode = 0; int32_t graphicsmode = 0; diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index d7092223b..806efbff0 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -13,6 +13,7 @@ #endif #include "compat.h" #include "build.h" +#include "editor.h" #include "pragmas.h" #include "cache1d.h" #include "a.h" @@ -2397,8 +2398,6 @@ int16_t searchsector, searchwall, searchstat; //search output // When aiming at a 2-sided wall, 1 if aiming at the bottom part, 0 else int16_t searchbottomwall, searchisbottom; -double msens = 1.0; - static char artfilename[20]; static char mapartfilename[BMAX_PATH]; // map-specific ART file name static int32_t mapartfnXXofs; // byte offset to 'XX' (the number part) in the above diff --git a/polymer/eduke32/build/src/osd.c b/polymer/eduke32/build/src/osd.c index 1ade6fb70..7100b8167 100644 --- a/polymer/eduke32/build/src/osd.c +++ b/polymer/eduke32/build/src/osd.c @@ -12,7 +12,7 @@ #include "crc32.h" #include "xxhash.h" #include "common.h" - +#include "editor.h" static symbol_t *symbols = NULL; static symbol_t *addnewsymbol(const char *name); diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index d72efb2cd..36c17df2d 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -19,6 +19,7 @@ #include "a.h" #include "build.h" #include "osd.h" +#include "engine_priv.h" #ifdef USE_OPENGL # include "glbuild.h" diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index bf149d0bd..abf4fe750 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -75,6 +75,7 @@ #include "mutex.h" #include "winbits.h" +#include "engine_priv.h" // undefine to restrict windowed resolutions to conventional sizes #define ANY_WINDOWED_SIZE diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index b20177686..42c8bce13 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -270,7 +270,6 @@ extern int32_t althud_flashing; extern int32_t althud_numberpal; extern int32_t althud_numbertile; extern int32_t althud_shadows; -extern int32_t cacnum; extern int32_t g_Shareware; #if !defined LUNATIC @@ -399,10 +398,6 @@ static inline int32_t G_GetTeamPalette(int32_t team) return pal[team]; } -#ifdef USE_OPENGL -extern char forcegl; -#endif - #define minitextshade(x, y, t, s, p, sb) minitext_(x,y,t,s,p,sb) #define minitext(x, y, t, p, sb) minitext_(x,y,t,0,p,sb) #define menutext(x,y,s,p,t) menutext_(x,y,s,p,(char *)OSD_StripColors(menutextbuf,t),10+16) diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 2e5945e0b..de8e96704 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -28,6 +28,10 @@ user_defs ud; const char *s_buildDate = "20120522"; +#ifdef __cplusplus +extern "C" { +#endif + // JBF: g_spriteGravity modified to default to Atomic ed. default when using 1.3d CONs int32_t g_spriteGravity=176; @@ -92,3 +96,8 @@ int32_t g_lastSaveSlot = -1; char CheatKeys[2] = { sc_D, sc_N }; char setupfilename[BMAX_PATH] = SETUPFILENAME; + +#ifdef __cplusplus +} +#endif +