[quake3-commits] r2196 - in trunk/code: cgame renderer
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Nov 4 21:02:36 EDT 2011
Author: ztm
Date: 2011-11-04 21:02:35 -0400 (Fri, 04 Nov 2011)
New Revision: 2196
Modified:
trunk/code/cgame/cg_particles.c
trunk/code/renderer/tr_local.h
trunk/code/renderer/tr_main.c
trunk/code/renderer/tr_types.h
Log:
Fixed usage of various entity defines.
Modified: trunk/code/cgame/cg_particles.c
===================================================================
--- trunk/code/cgame/cg_particles.c 2011-11-05 00:56:26 UTC (rev 2195)
+++ trunk/code/cgame/cg_particles.c 2011-11-05 01:02:35 UTC (rev 2196)
@@ -1703,7 +1703,7 @@
CG_Trace (&trace, this_pos, NULL, NULL, end_pos, -1, CONTENTS_SOLID);
- if (trace.entityNum < (MAX_ENTITIES - 1)) // may only land on world
+ if (trace.entityNum < ENTITYNUM_WORLD) // may only land on world
return qfalse;
if (!(!trace.startsolid && trace.fraction < 1))
Modified: trunk/code/renderer/tr_local.h
===================================================================
--- trunk/code/renderer/tr_local.h 2011-11-05 00:56:26 UTC (rev 2195)
+++ trunk/code/renderer/tr_local.h 2011-11-05 01:02:35 UTC (rev 2196)
@@ -836,7 +836,7 @@
*/
#define QSORT_FOGNUM_SHIFT 2
#define QSORT_ENTITYNUM_SHIFT 7
-#define QSORT_SHADERNUM_SHIFT (QSORT_ENTITYNUM_SHIFT+GENTITYNUM_BITS)
+#define QSORT_SHADERNUM_SHIFT (QSORT_ENTITYNUM_SHIFT+ENTITYNUM_BITS)
#if (QSORT_SHADERNUM_SHIFT+SHADERNUM_BITS) > 32
#error "Need to update sorting, too many bits."
#endif
Modified: trunk/code/renderer/tr_main.c
===================================================================
--- trunk/code/renderer/tr_main.c 2011-11-05 00:56:26 UTC (rev 2195)
+++ trunk/code/renderer/tr_main.c 2011-11-05 01:02:35 UTC (rev 2196)
@@ -1127,7 +1127,7 @@
int *fogNum, int *dlightMap ) {
*fogNum = ( sort >> QSORT_FOGNUM_SHIFT ) & 31;
*shader = tr.sortedShaders[ ( sort >> QSORT_SHADERNUM_SHIFT ) & (MAX_SHADERS-1) ];
- *entityNum = ( sort >> QSORT_ENTITYNUM_SHIFT ) & (MAX_GENTITIES-1);
+ *entityNum = ( sort >> QSORT_ENTITYNUM_SHIFT ) & MAX_ENTITIES;
*dlightMap = sort & 3;
}
Modified: trunk/code/renderer/tr_types.h
===================================================================
--- trunk/code/renderer/tr_types.h 2011-11-05 00:56:26 UTC (rev 2195)
+++ trunk/code/renderer/tr_types.h 2011-11-05 01:02:35 UTC (rev 2196)
@@ -25,8 +25,10 @@
#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces
-#define MAX_ENTITIES 1023 // can't be increased without changing drawsurf bit packing
+#define ENTITYNUM_BITS 10 // can't be increased without changing drawsurf bit packing
+#define MAX_ENTITIES ((1<<ENTITYNUM_BITS) - 1)
+
// renderfx flags
#define RF_MINLIGHT 0x0001 // allways have some light (viewmodel, some items)
#define RF_THIRD_PERSON 0x0002 // don't draw through eyes, only mirrors (player bodies, chat sprites)
More information about the quake3-commits
mailing list