From 5c4f9b1f14d703222e7434815a3a42109ab99126 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 6 Jan 2015 19:56:44 +0000 Subject: [PATCH] engine.c: on non-touch devices, roughly double maximum voxel drawing distance. By setting DISTRECIPSIZ to 131072, as far as I can see the absolute maximum that's possible with the integer scaling convention of the voxel drawing code. BUILD_LUNATIC. git-svn-id: https://svn.eduke32.com/eduke32@4881 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 2de50ec67..3c6878a12 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -137,14 +137,18 @@ int32_t editorgridextent = 131072; #define MAXYSIZ 256 #define MAXZSIZ 255 #define MAXVOXMIPS 5 -#define DISTRECIPSIZ (65536+256) +#ifdef EDUKE32_TOUCH_DEVICES +# define DISTRECIPSIZ (65536+256) +#else +# define DISTRECIPSIZ 131072 +#endif intptr_t voxoff[MAXVOXELS][MAXVOXMIPS]; // used in KenBuild static char voxlock[MAXVOXELS][MAXVOXMIPS]; int32_t voxscale[MAXVOXELS]; static int32_t ggxinc[MAXXSIZ+1], ggyinc[MAXXSIZ+1]; static int32_t lowrecip[1024], nytooclose; -static const int32_t nytoofar = 65536*16384-1048576; +static const int32_t nytoofar = DISTRECIPSIZ*16384ull - 1048576; static uint32_t *distrecip; static int32_t *lookups = NULL; @@ -8107,7 +8111,7 @@ static void dosetaspect(void) for (i=1; i