[quake3-commits] r1848 - trunk/code/renderer
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Feb 4 10:21:15 EST 2011
Author: thilo
Date: 2011-02-04 10:21:15 -0500 (Fri, 04 Feb 2011)
New Revision: 1848
Modified:
trunk/code/renderer/tr_bsp.c
trunk/code/renderer/tr_local.h
Log:
Thanks for the patch, gimhael. (#4576)
Modified: trunk/code/renderer/tr_bsp.c
===================================================================
--- trunk/code/renderer/tr_bsp.c 2011-02-04 15:11:57 UTC (rev 1847)
+++ trunk/code/renderer/tr_bsp.c 2011-02-04 15:21:15 UTC (rev 1848)
@@ -155,9 +155,6 @@
//FIXME: HACK: maps with only one lightmap turn up fullbright for some reason.
//this avoids this, but isn't the correct solution.
tr.numLightmaps++;
- } else if ( tr.numLightmaps >= MAX_LIGHTMAPS ) { // 20051020 misantropia
- ri.Printf( PRINT_WARNING, "WARNING: number of lightmaps > MAX_LIGHTMAPS\n" );
- tr.numLightmaps = MAX_LIGHTMAPS;
}
// if we are in r_vertexLight mode, we don't need the lightmaps at all
@@ -165,6 +162,7 @@
return;
}
+ tr.lightmaps = ri.Hunk_Alloc( tr.numLightmaps * sizeof(image_t *), h_low );
for ( i = 0 ; i < tr.numLightmaps ; i++ ) {
// expand the 24 bit on-disk to 32 bit
buf_p = buf + i * LIGHTMAP_SIZE*LIGHTMAP_SIZE * 3;
Modified: trunk/code/renderer/tr_local.h
===================================================================
--- trunk/code/renderer/tr_local.h 2011-02-04 15:11:57 UTC (rev 1847)
+++ trunk/code/renderer/tr_local.h 2011-02-04 15:21:15 UTC (rev 1848)
@@ -779,7 +779,6 @@
extern refimport_t ri;
#define MAX_DRAWIMAGES 2048
-#define MAX_LIGHTMAPS 256
#define MAX_SKINS 1024
@@ -916,7 +915,7 @@
shader_t *sunShader;
int numLightmaps;
- image_t *lightmaps[MAX_LIGHTMAPS];
+ image_t **lightmaps;
trRefEntity_t *currentEntity;
trRefEntity_t worldEntity; // point currentEntity at this when rendering world
More information about the quake3-commits
mailing list