From deec38c8275c2d589af7eccc7686b359c506578e Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 22 Dec 2019 10:20:22 +0000 Subject: [PATCH] Expose nextvoxid variable This allows game and defs to not overwrite each other's voxels. git-svn-id: https://svn.eduke32.com/eduke32@8471 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/kenbuild/src/bstub.cpp # source/kenbuild/src/game.cpp # source/sw/src/bldscript.cpp # source/sw/src/jnstub.cpp --- source/build/include/build.h | 1 + source/build/src/defs.cpp | 1 - source/sw/src/game.cpp | 1 - source/sw/src/scrip2.cpp | 2 -- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/source/build/include/build.h b/source/build/include/build.h index 0074c6016..9439f5e21 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -1116,6 +1116,7 @@ int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, f extern GrowArray g_clipMapFiles; #endif +EXTERN int32_t nextvoxid; EXTERN intptr_t voxoff[MAXVOXELS][MAXVOXMIPS]; // used in KenBuild EXTERN int8_t voxreserve[(MAXVOXELS+7)>>3]; EXTERN int8_t voxrotate[(MAXVOXELS+7)>>3]; diff --git a/source/build/src/defs.cpp b/source/build/src/defs.cpp index e4548adad..e597c5a31 100644 --- a/source/build/src/defs.cpp +++ b/source/build/src/defs.cpp @@ -130,7 +130,6 @@ enum scripttoken_t }; static int32_t lastmodelid = -1, lastvoxid = -1, modelskin = -1, lastmodelskin = -1, seenframe = 0; -static int32_t nextvoxid = 0; static char *faketilebuffer = NULL; static int32_t faketilebuffersiz = 0; diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 320a79f84..ccc63a336 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -784,7 +784,6 @@ void COVERsetbrightness(int bright, unsigned char *pal) static int firstnet = 0; // JBF -int nextvoxid = 0; // JBF static void SW_FatalEngineError(void) diff --git a/source/sw/src/scrip2.cpp b/source/sw/src/scrip2.cpp index d9b8016a2..80dcddc2d 100644 --- a/source/sw/src/scrip2.cpp +++ b/source/sw/src/scrip2.cpp @@ -49,8 +49,6 @@ BEGIN_SW_NS //#define COMPUTE_TOTALS 1 -extern int nextvoxid; // JBF: in game.c - ParentalStruct aVoxelArray[MAXTILES];