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
This commit is contained in:
helixhorned 2015-01-06 19:56:44 +00:00
parent b5bb86b8e2
commit 5c4f9b1f14

View file

@ -137,14 +137,18 @@ int32_t editorgridextent = 131072;
#define MAXYSIZ 256 #define MAXYSIZ 256
#define MAXZSIZ 255 #define MAXZSIZ 255
#define MAXVOXMIPS 5 #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 intptr_t voxoff[MAXVOXELS][MAXVOXMIPS]; // used in KenBuild
static char voxlock[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];
static int32_t lowrecip[1024], nytooclose; 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 uint32_t *distrecip;
static int32_t *lookups = NULL; static int32_t *lookups = NULL;
@ -8107,7 +8111,7 @@ static void dosetaspect(void)
for (i=1; i<DISTRECIPSIZ; i++) for (i=1; i<DISTRECIPSIZ; i++)
distrecip[i] = (xdimen < 1<<11) ? distrecip[i] = (xdimen < 1<<11) ?
tabledivide32(xdimen<<20, i) : tabledivide32(xdimen<<20, i) :
tabledivide64((uint64_t)xdimen<<20, i); tabledivide64((uint64_t)xdimen<<20, i); // XXX
nytooclose = xdimen*2100; nytooclose = xdimen*2100;
} }