diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 20752be07..34b9b4c85 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -348,7 +348,7 @@ EXTERN int16_t nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES]; EXTERN int16_t tilesizx[MAXTILES], tilesizy[MAXTILES]; EXTERN char picsiz[MAXTILES]; EXTERN char walock[MAXTILES]; -EXTERN int32_t pow2long[32]; +EXTERN const int32_t pow2long[32]; EXTERN int32_t picanm[MAXTILES]; EXTERN intptr_t waloff[MAXTILES]; // stores pointers to cache -- SA diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 7bd76abd4..9de65ddd4 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -96,7 +96,8 @@ int32_t editorgridextent = 131072; #define MAXYSIZ 256 #define MAXZSIZ 255 #define MAXVOXMIPS 5 -static intptr_t voxoff[MAXVOXELS][MAXVOXMIPS]; char voxlock[MAXVOXELS][MAXVOXMIPS]; +static intptr_t voxoff[MAXVOXELS][MAXVOXMIPS]; +static char voxlock[MAXVOXELS][MAXVOXMIPS]; int32_t voxscale[MAXVOXELS]; static int32_t ggxinc[MAXXSIZ+1], ggyinc[MAXXSIZ+1]; @@ -142,7 +143,7 @@ static int32_t lastageclock; static int32_t artsize = 0, cachesize = 0; -// maximum number of ART files +// Whole ART file contents loaded from ZIPs in memory. static char *artptrs[MAXTILEFILES]; // GCC 4.6 LTO build fix @@ -154,8 +155,8 @@ static char *artptrs[MAXTILEFILES]; static int16_t radarang2[MAXXDIM]; B_ENGINE_STATIC uint16_t ATTRIBUTE((used)) sqrtable[4096], ATTRIBUTE((used)) shlookup[4096+256]; -char pow2char[8] = {1,2,4,8,16,32,64,128}; -int32_t pow2long[32] = +const char pow2char[8] = {1,2,4,8,16,32,64,128}; +const int32_t pow2long[32] = { 1L,2L,4L,8L, 16L,32L,64L,128L, diff --git a/polymer/eduke32/build/src/engine_priv.h b/polymer/eduke32/build/src/engine_priv.h index eebb4e78e..79160d42c 100644 --- a/polymer/eduke32/build/src/engine_priv.h +++ b/polymer/eduke32/build/src/engine_priv.h @@ -23,8 +23,8 @@ extern uint8_t basepalcount; extern uint8_t curbasepal; -extern char pow2char[8]; -extern int32_t pow2int[32]; +extern const char pow2char[8]; +extern const int32_t pow2int[32]; extern int16_t thesector[MAXWALLSB], thewall[MAXWALLSB]; extern int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB]; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 859f76ce8..242666e76 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -41,8 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern El_State g_ElState; #endif -extern char pow2char[]; - static int32_t g_whichPalForPlayer = 9; int32_t g_numRealPalettes; int16_t SpriteCacheList[MAXTILES][3]; diff --git a/polymer/eduke32/source/premap.h b/polymer/eduke32/source/premap.h index 7b2101dc8..b2b283f7c 100644 --- a/polymer/eduke32/source/premap.h +++ b/polymer/eduke32/source/premap.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __premap_h__ extern char *g_gameNamePtr; -extern char pow2char[]; +extern const char pow2char[]; extern int16_t SpriteCacheList[MAXTILES][3]; extern int32_t g_levelTextTime;