From 4b26129c47eb52345d8136cfd6c1ea07b2b9c135 Mon Sep 17 00:00:00 2001 From: Garux Date: Sat, 3 Feb 2024 17:34:58 +0600 Subject: [PATCH] minor tweaks --- tools/quake3/q3map2/lightmaps_ydnar.cpp | 14 +++++++------- tools/quake3/q3map2/surface.cpp | 2 -- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tools/quake3/q3map2/lightmaps_ydnar.cpp b/tools/quake3/q3map2/lightmaps_ydnar.cpp index 81a44d82..33a9941f 100644 --- a/tools/quake3/q3map2/lightmaps_ydnar.cpp +++ b/tools/quake3/q3map2/lightmaps_ydnar.cpp @@ -3316,8 +3316,8 @@ void StoreSurfaceLightmaps( bool fastAllocate, bool storeForReal ){ /* store it */ //% Sys_Printf( "Emitting: %s (%d", csi->shader, strlen( csi->shader ) ); - int cont = bspShaders[ ds->shaderNum ].contentFlags; - int surf = bspShaders[ ds->shaderNum ].surfaceFlags; + const int cont = bspShaders[ ds->shaderNum ].contentFlags; + const int surf = bspShaders[ ds->shaderNum ].surfaceFlags; ds->shaderNum = EmitShader( csi->shader, &cont, &surf ); //% Sys_Printf( ")\n" ); } @@ -3336,17 +3336,17 @@ void StoreSurfaceLightmaps( bool fastAllocate, bool storeForReal ){ /* store it */ //% Sys_Printf( "Emitting: %s (%d", csi->shader, strlen( csi->shader ) ); - int cont = bspShaders[ ds->shaderNum ].contentFlags; - int surf = bspShaders[ ds->shaderNum ].surfaceFlags; + const int cont = bspShaders[ ds->shaderNum ].contentFlags; + const int surf = bspShaders[ ds->shaderNum ].surfaceFlags; ds->shaderNum = EmitShader( csi->shader, &cont, &surf ); //% Sys_Printf( ")\n" ); } /* use the normal plain-jane shader */ else{ - int cont = bspShaders[ ds->shaderNum ].contentFlags; - int surf = bspShaders[ ds->shaderNum ].surfaceFlags; - ds->shaderNum = EmitShader( info->si->shader, &cont, &surf ); + const int cont = bspShaders[ ds->shaderNum ].contentFlags; + const int surf = bspShaders[ ds->shaderNum ].surfaceFlags; + ds->shaderNum = EmitShader( info->si->shader, &cont, &surf ); } } diff --git a/tools/quake3/q3map2/surface.cpp b/tools/quake3/q3map2/surface.cpp index 977eb824..791c104a 100644 --- a/tools/quake3/q3map2/surface.cpp +++ b/tools/quake3/q3map2/surface.cpp @@ -1890,8 +1890,6 @@ static int FilterFaceIntoTree( mapDrawSurface_t *ds, tree_t& tree ){ subdivides a patch into an approximate curve and filters it into the tree */ -#define FILTER_SUBDIVISION 8 - static int FilterPatchIntoTree( mapDrawSurface_t *ds, tree_t& tree ){ int refs = 0;