mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
handle up to 512x512 map textures /properly/. would be nicer if the max
could be dynamic
This commit is contained in:
parent
27f9b7a1c0
commit
c44ec1993d
6 changed files with 9 additions and 8 deletions
|
@ -464,7 +464,8 @@ CalcSurfaceExtents (msurface_t *s)
|
|||
|
||||
s->texturemins[i] = bmins[i] * 16;
|
||||
s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
|
||||
if (!(tex->flags & TEX_SPECIAL) && s->extents[i] > 512 /* 256 */ )
|
||||
//FIXME even 512 is really too small, need a saner test
|
||||
if (!(tex->flags & TEX_SPECIAL) && s->extents[i] > 512)
|
||||
Sys_Error ("Bad surface extents: %x %d", tex->flags,
|
||||
s->extents[i]);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ int lightmap_textures;
|
|||
// LordHavoc: changed to be allocated at runtime (typically lower memory usage)
|
||||
byte *lightmaps[MAX_LIGHTMAPS];
|
||||
|
||||
unsigned int blocklights[18 * 18 * 3];
|
||||
unsigned int blocklights[34 * 34 * 3]; //FIXME make dynamic
|
||||
int allocated[MAX_LIGHTMAPS][BLOCK_WIDTH];
|
||||
|
||||
glpoly_t *lightmap_modified[MAX_GLTEXTURES];
|
||||
|
|
|
@ -148,10 +148,10 @@ D_SCAlloc (int width, int size)
|
|||
surfcache_t *new;
|
||||
qboolean wrapped_this_time;
|
||||
|
||||
if ((width < 0) || (width > 256))
|
||||
if ((width < 0) || (width > 512)) // FIXME shouldn't really have a max
|
||||
Sys_Error ("D_SCAlloc: bad cache width %d", width);
|
||||
|
||||
if ((size <= 0) || (size > 0x10000))
|
||||
if ((size <= 0) || (size > 0x40000)) // FIXME ditto
|
||||
Sys_Error ("D_SCAlloc: bad cache size %d", size);
|
||||
|
||||
/* This adds the offset of data[0] in the surfcache_t struct. */
|
||||
|
|
|
@ -60,7 +60,7 @@ static void (*surfmiptable[4]) (void) = {
|
|||
R_DrawSurfaceBlock_mip0, R_DrawSurfaceBlock_mip1,
|
||||
R_DrawSurfaceBlock_mip2, R_DrawSurfaceBlock_mip3};
|
||||
|
||||
unsigned int blocklights[18 * 18];
|
||||
unsigned int blocklights[34 * 34]; //FIXME make dynamic
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -149,10 +149,10 @@ D_SCAlloc (int width, int size)
|
|||
surfcache_t *new;
|
||||
qboolean wrapped_this_time;
|
||||
|
||||
if ((width < 0) || (width > 256))
|
||||
if ((width < 0) || (width > 512)) // FIXME shouldn't really have a max
|
||||
Sys_Error ("D_SCAlloc: bad cache width %d", width);
|
||||
|
||||
if ((size <= 0) || (size > (0x10000 * r_pixbytes)))
|
||||
if ((size <= 0) || (size > (0x40000 * r_pixbytes))) //FIXME ditto
|
||||
Sys_Error ("D_SCAlloc: bad cache size %d", size);
|
||||
|
||||
/* This adds the offset of data[0] in the surfcache_t struct. */
|
||||
|
|
|
@ -86,7 +86,7 @@ static void (*surfmiptable32[4]) (void) = {
|
|||
R_DrawSurfaceBlock32_mip3
|
||||
};
|
||||
|
||||
int blocklights[18 * 18];
|
||||
int blocklights[34 * 34]; //FIXME make dynamic
|
||||
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue