engine cleanup: make pow2char and pow2long const, make voxlock static.

git-svn-id: https://svn.eduke32.com/eduke32@2463 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-13 20:05:20 +00:00
parent 42f5a7d9c9
commit b359d0dce9
5 changed files with 9 additions and 10 deletions

View file

@ -348,7 +348,7 @@ EXTERN int16_t nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES];
EXTERN int16_t tilesizx[MAXTILES], tilesizy[MAXTILES]; EXTERN int16_t tilesizx[MAXTILES], tilesizy[MAXTILES];
EXTERN char picsiz[MAXTILES]; EXTERN char picsiz[MAXTILES];
EXTERN char walock[MAXTILES]; EXTERN char walock[MAXTILES];
EXTERN int32_t pow2long[32]; EXTERN const int32_t pow2long[32];
EXTERN int32_t picanm[MAXTILES]; EXTERN int32_t picanm[MAXTILES];
EXTERN intptr_t waloff[MAXTILES]; // stores pointers to cache -- SA EXTERN intptr_t waloff[MAXTILES]; // stores pointers to cache -- SA

View file

@ -96,7 +96,8 @@ int32_t editorgridextent = 131072;
#define MAXYSIZ 256 #define MAXYSIZ 256
#define MAXZSIZ 255 #define MAXZSIZ 255
#define MAXVOXMIPS 5 #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]; int32_t voxscale[MAXVOXELS];
static int32_t ggxinc[MAXXSIZ+1], ggyinc[MAXXSIZ+1]; static int32_t ggxinc[MAXXSIZ+1], ggyinc[MAXXSIZ+1];
@ -142,7 +143,7 @@ static int32_t lastageclock;
static int32_t artsize = 0, cachesize = 0; 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]; static char *artptrs[MAXTILEFILES];
// GCC 4.6 LTO build fix // GCC 4.6 LTO build fix
@ -154,8 +155,8 @@ static char *artptrs[MAXTILEFILES];
static int16_t radarang2[MAXXDIM]; static int16_t radarang2[MAXXDIM];
B_ENGINE_STATIC uint16_t ATTRIBUTE((used)) sqrtable[4096], ATTRIBUTE((used)) shlookup[4096+256]; 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}; const char pow2char[8] = {1,2,4,8,16,32,64,128};
int32_t pow2long[32] = const int32_t pow2long[32] =
{ {
1L,2L,4L,8L, 1L,2L,4L,8L,
16L,32L,64L,128L, 16L,32L,64L,128L,

View file

@ -23,8 +23,8 @@
extern uint8_t basepalcount; extern uint8_t basepalcount;
extern uint8_t curbasepal; extern uint8_t curbasepal;
extern char pow2char[8]; extern const char pow2char[8];
extern int32_t pow2int[32]; extern const int32_t pow2int[32];
extern int16_t thesector[MAXWALLSB], thewall[MAXWALLSB]; extern int16_t thesector[MAXWALLSB], thewall[MAXWALLSB];
extern int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB]; extern int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB];

View file

@ -41,8 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern El_State g_ElState; extern El_State g_ElState;
#endif #endif
extern char pow2char[];
static int32_t g_whichPalForPlayer = 9; static int32_t g_whichPalForPlayer = 9;
int32_t g_numRealPalettes; int32_t g_numRealPalettes;
int16_t SpriteCacheList[MAXTILES][3]; int16_t SpriteCacheList[MAXTILES][3];

View file

@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define __premap_h__ #define __premap_h__
extern char *g_gameNamePtr; extern char *g_gameNamePtr;
extern char pow2char[]; extern const char pow2char[];
extern int16_t SpriteCacheList[MAXTILES][3]; extern int16_t SpriteCacheList[MAXTILES][3];
extern int32_t g_levelTextTime; extern int32_t g_levelTextTime;