diff --git a/source/build/include/build.h b/source/build/include/build.h index bd67e1482..c13ef89eb 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -274,10 +274,10 @@ enum { #endif #if defined __cplusplus && (defined USE_OPENGL || defined POLYMER) -# define STRUCT_TRACKERS_ENABLED +# define USE_STRUCT_TRACKERS #endif -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS extern "C" { static FORCE_INLINE void sector_tracker_hook__(intptr_t address); @@ -336,9 +336,9 @@ enum { SPR_ALIGN_MASK = 32+16, }; -#define UNTRACKED_STRUCTS +#define UNTRACKED_STRUCTS__ #include "buildtypes.h" -#undef UNTRACKED_STRUCTS +#undef UNTRACKED_STRUCTS__ #undef buildtypes_h__ #include "buildtypes.h" @@ -608,7 +608,7 @@ EXTERN spritetype sprite[MAXSPRITES]; EXTERN uspritetype tsprite[MAXSPRITESONSCREEN]; #endif -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS EXTERN uint32_t sectorchanged[MAXSECTORS + M32_FIXME_SECTORS]; EXTERN uint32_t wallchanged[MAXWALLS + M32_FIXME_WALLS]; 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 -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS static FORCE_INLINE void sector_tracker_hook__(intptr_t const address) { 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); #if DEBUGGINGAIDS - Bassert((unsigned)spritenum < MAXSPRITES)); + Bassert((unsigned)spritenum < MAXSPRITES); #endif ++spritechanged[spritenum]; diff --git a/source/build/include/buildtypes.h b/source/build/include/buildtypes.h index 831e3e329..2e4636577 100644 --- a/source/build/include/buildtypes.h +++ b/source/build/include/buildtypes.h @@ -5,7 +5,7 @@ #undef SECTORTYPE #undef SPRITETYPE -#ifdef UNTRACKED_STRUCTS +#ifdef UNTRACKED_STRUCTS__ #define StructTracker(tracker, type) type #define StructName(name) u ## name diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index db2d3736c..edeadf667 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -9145,7 +9145,7 @@ static void enginePrepareLoadBoard(buildvfs_kfd fil, vec3_t *dapos, int16_t *daa Bmemset(show2dsector, 0, sizeof(show2dsector)); Bmemset(show2dsprite, 0, sizeof(show2dsprite)); Bmemset(show2dwall, 0, sizeof(show2dwall)); -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS Bmemset(sectorchanged, 0, sizeof(sectorchanged)); Bmemset(spritechanged, 0, sizeof(spritechanged)); Bmemset(wallchanged, 0, sizeof(wallchanged)); diff --git a/source/duke3d/src/m32exec.cpp b/source/duke3d/src/m32exec.cpp index 7b2187ee0..1ca0b76cc 100644 --- a/source/duke3d/src/m32exec.cpp +++ b/source/duke3d/src/m32exec.cpp @@ -2928,7 +2928,7 @@ dodefault: X_ERROR_INVALIDSP(); vm.pSprite->xrepeat = (uint8_t) Gv_GetVar(*(insptr-2)); vm.pSprite->yrepeat = (uint8_t) Gv_GetVar(*(insptr-1)); -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++; #endif continue; @@ -2937,7 +2937,7 @@ dodefault: insptr += 2; X_ERROR_INVALIDSP(); vm.pSprite->cstat = (int16_t) *(insptr-1); -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++; #endif continue; @@ -2946,7 +2946,7 @@ dodefault: insptr += 2; X_ERROR_INVALIDSP(); vm.pSprite->cstat |= (int16_t) Gv_GetVar(*(insptr-1)); -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++; #endif continue; @@ -2955,7 +2955,7 @@ dodefault: insptr += 2; X_ERROR_INVALIDSP(); vm.pSprite->clipdist = (uint8_t) Gv_GetVar(*(insptr-1)); -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++; #endif continue; @@ -2964,7 +2964,7 @@ dodefault: insptr += 2; X_ERROR_INVALIDSP(); vm.pSprite->pal = Gv_GetVar(*(insptr-1)); -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++; #endif continue; @@ -2973,7 +2973,7 @@ dodefault: insptr += 2; X_ERROR_INVALIDSP(); vm.pSprite->picnum = Gv_GetVar(*(insptr-1)); -#ifdef STRUCT_TRACKERS_ENABLED +#ifdef USE_STRUCT_TRACKERS if (vm.spriteNum != -1) spritechanged[vm.spriteNum]++; #endif continue;