mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Rename STRUCT_TRACKERS_ENABLED preprocessor definition to USE_STRUCT_TRACKERS
This may also fix a minor performance regression introduced in Polymer sometime after we switched to building as C++, caused by confusion between STRUCT_TRACKERS_ENABLED and UNTRACKED_STRUCTS. UNTRACKED_STRUCTS is now named UNTRACT_STRUCTS__ to dissuade use outside of buildtypes.h. git-svn-id: https://svn.eduke32.com/eduke32@7695 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/polymer.cpp
This commit is contained in:
parent
33b122d88a
commit
26a266dfe5
4 changed files with 15 additions and 15 deletions
|
@ -274,10 +274,10 @@ enum {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __cplusplus && (defined USE_OPENGL || defined POLYMER)
|
#if defined __cplusplus && (defined USE_OPENGL || defined POLYMER)
|
||||||
# define STRUCT_TRACKERS_ENABLED
|
# define USE_STRUCT_TRACKERS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static FORCE_INLINE void sector_tracker_hook__(intptr_t address);
|
static FORCE_INLINE void sector_tracker_hook__(intptr_t address);
|
||||||
|
@ -336,9 +336,9 @@ enum {
|
||||||
SPR_ALIGN_MASK = 32+16,
|
SPR_ALIGN_MASK = 32+16,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define UNTRACKED_STRUCTS
|
#define UNTRACKED_STRUCTS__
|
||||||
#include "buildtypes.h"
|
#include "buildtypes.h"
|
||||||
#undef UNTRACKED_STRUCTS
|
#undef UNTRACKED_STRUCTS__
|
||||||
#undef buildtypes_h__
|
#undef buildtypes_h__
|
||||||
#include "buildtypes.h"
|
#include "buildtypes.h"
|
||||||
|
|
||||||
|
@ -608,7 +608,7 @@ EXTERN spritetype sprite[MAXSPRITES];
|
||||||
EXTERN uspritetype tsprite[MAXSPRITESONSCREEN];
|
EXTERN uspritetype tsprite[MAXSPRITESONSCREEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
EXTERN uint32_t sectorchanged[MAXSECTORS + M32_FIXME_SECTORS];
|
EXTERN uint32_t sectorchanged[MAXSECTORS + M32_FIXME_SECTORS];
|
||||||
EXTERN uint32_t wallchanged[MAXWALLS + M32_FIXME_WALLS];
|
EXTERN uint32_t wallchanged[MAXWALLS + M32_FIXME_WALLS];
|
||||||
EXTERN uint32_t spritechanged[MAXSPRITES];
|
EXTERN uint32_t spritechanged[MAXSPRITES];
|
||||||
|
@ -637,7 +637,7 @@ static FORCE_INLINE void yax_setnextwall(int16_t wal, int16_t cf, int16_t thenex
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
static FORCE_INLINE void sector_tracker_hook__(intptr_t const address)
|
static FORCE_INLINE void sector_tracker_hook__(intptr_t const address)
|
||||||
{
|
{
|
||||||
intptr_t const sectnum = (address - (intptr_t)sector) / sizeof(sectortype);
|
intptr_t const sectnum = (address - (intptr_t)sector) / sizeof(sectortype);
|
||||||
|
@ -665,7 +665,7 @@ static FORCE_INLINE void sprite_tracker_hook__(intptr_t const address)
|
||||||
intptr_t const spritenum = (address - (intptr_t)sprite) / sizeof(spritetype);
|
intptr_t const spritenum = (address - (intptr_t)sprite) / sizeof(spritetype);
|
||||||
|
|
||||||
#if DEBUGGINGAIDS
|
#if DEBUGGINGAIDS
|
||||||
Bassert((unsigned)spritenum < MAXSPRITES));
|
Bassert((unsigned)spritenum < MAXSPRITES);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
++spritechanged[spritenum];
|
++spritechanged[spritenum];
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#undef SECTORTYPE
|
#undef SECTORTYPE
|
||||||
#undef SPRITETYPE
|
#undef SPRITETYPE
|
||||||
|
|
||||||
#ifdef UNTRACKED_STRUCTS
|
#ifdef UNTRACKED_STRUCTS__
|
||||||
|
|
||||||
#define StructTracker(tracker, type) type
|
#define StructTracker(tracker, type) type
|
||||||
#define StructName(name) u ## name
|
#define StructName(name) u ## name
|
||||||
|
|
|
@ -9145,7 +9145,7 @@ static void enginePrepareLoadBoard(buildvfs_kfd fil, vec3_t *dapos, int16_t *daa
|
||||||
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
||||||
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
||||||
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
Bmemset(sectorchanged, 0, sizeof(sectorchanged));
|
Bmemset(sectorchanged, 0, sizeof(sectorchanged));
|
||||||
Bmemset(spritechanged, 0, sizeof(spritechanged));
|
Bmemset(spritechanged, 0, sizeof(spritechanged));
|
||||||
Bmemset(wallchanged, 0, sizeof(wallchanged));
|
Bmemset(wallchanged, 0, sizeof(wallchanged));
|
||||||
|
|
|
@ -2928,7 +2928,7 @@ dodefault:
|
||||||
X_ERROR_INVALIDSP();
|
X_ERROR_INVALIDSP();
|
||||||
vm.pSprite->xrepeat = (uint8_t) Gv_GetVar(*(insptr-2));
|
vm.pSprite->xrepeat = (uint8_t) Gv_GetVar(*(insptr-2));
|
||||||
vm.pSprite->yrepeat = (uint8_t) Gv_GetVar(*(insptr-1));
|
vm.pSprite->yrepeat = (uint8_t) Gv_GetVar(*(insptr-1));
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
@ -2937,7 +2937,7 @@ dodefault:
|
||||||
insptr += 2;
|
insptr += 2;
|
||||||
X_ERROR_INVALIDSP();
|
X_ERROR_INVALIDSP();
|
||||||
vm.pSprite->cstat = (int16_t) *(insptr-1);
|
vm.pSprite->cstat = (int16_t) *(insptr-1);
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
@ -2946,7 +2946,7 @@ dodefault:
|
||||||
insptr += 2;
|
insptr += 2;
|
||||||
X_ERROR_INVALIDSP();
|
X_ERROR_INVALIDSP();
|
||||||
vm.pSprite->cstat |= (int16_t) Gv_GetVar(*(insptr-1));
|
vm.pSprite->cstat |= (int16_t) Gv_GetVar(*(insptr-1));
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
@ -2955,7 +2955,7 @@ dodefault:
|
||||||
insptr += 2;
|
insptr += 2;
|
||||||
X_ERROR_INVALIDSP();
|
X_ERROR_INVALIDSP();
|
||||||
vm.pSprite->clipdist = (uint8_t) Gv_GetVar(*(insptr-1));
|
vm.pSprite->clipdist = (uint8_t) Gv_GetVar(*(insptr-1));
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
@ -2964,7 +2964,7 @@ dodefault:
|
||||||
insptr += 2;
|
insptr += 2;
|
||||||
X_ERROR_INVALIDSP();
|
X_ERROR_INVALIDSP();
|
||||||
vm.pSprite->pal = Gv_GetVar(*(insptr-1));
|
vm.pSprite->pal = Gv_GetVar(*(insptr-1));
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
@ -2973,7 +2973,7 @@ dodefault:
|
||||||
insptr += 2;
|
insptr += 2;
|
||||||
X_ERROR_INVALIDSP();
|
X_ERROR_INVALIDSP();
|
||||||
vm.pSprite->picnum = Gv_GetVar(*(insptr-1));
|
vm.pSprite->picnum = Gv_GetVar(*(insptr-1));
|
||||||
#ifdef STRUCT_TRACKERS_ENABLED
|
#ifdef USE_STRUCT_TRACKERS
|
||||||
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue