mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 12:01:10 +00:00
properly ignore caulk
This commit is contained in:
parent
e089323ef2
commit
3081387877
4 changed files with 36 additions and 19 deletions
|
@ -2774,9 +2774,10 @@ void IlluminateVertexes( int num ){
|
||||||
determines opaque brushes in the world and find sky shaders for sunlight calculations
|
determines opaque brushes in the world and find sky shaders for sunlight calculations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void SetupBrushesFlags( int mask, int test )
|
void SetupBrushesFlags( unsigned int mask_any, unsigned int test_any, unsigned int mask_all, unsigned int test_all )
|
||||||
{
|
{
|
||||||
int i, j, b, compileFlags;
|
int i, j, b;
|
||||||
|
unsigned int compileFlags, allCompileFlags;
|
||||||
qboolean inside;
|
qboolean inside;
|
||||||
bspBrush_t *brush;
|
bspBrush_t *brush;
|
||||||
bspBrushSide_t *side;
|
bspBrushSide_t *side;
|
||||||
|
@ -2806,6 +2807,7 @@ void SetupBrushesFlags( int mask, int test )
|
||||||
/* check all sides */
|
/* check all sides */
|
||||||
inside = qtrue;
|
inside = qtrue;
|
||||||
compileFlags = 0;
|
compileFlags = 0;
|
||||||
|
allCompileFlags = ~(0u);
|
||||||
for ( j = 0; j < brush->numSides && inside; j++ )
|
for ( j = 0; j < brush->numSides && inside; j++ )
|
||||||
{
|
{
|
||||||
/* do bsp shader calculations */
|
/* do bsp shader calculations */
|
||||||
|
@ -2813,7 +2815,7 @@ void SetupBrushesFlags( int mask, int test )
|
||||||
shader = &bspShaders[ side->shaderNum ];
|
shader = &bspShaders[ side->shaderNum ];
|
||||||
|
|
||||||
/* get shader info */
|
/* get shader info */
|
||||||
si = ShaderInfoForShader( shader->shader );
|
si = ShaderInfoForShaderNull( shader->shader );
|
||||||
if ( si == NULL ) {
|
if ( si == NULL ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2823,7 +2825,7 @@ void SetupBrushesFlags( int mask, int test )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* determine if this brush is opaque to light */
|
/* determine if this brush is opaque to light */
|
||||||
if( (compileFlags & mask) == test )
|
if( (compileFlags & mask_any) == test_any && (allCompileFlags & mask_all) == test_all )
|
||||||
{
|
{
|
||||||
opaqueBrushes[ b >> 3 ] |= (1 << (b & 7));
|
opaqueBrushes[ b >> 3 ] |= (1 << (b & 7));
|
||||||
numOpaqueBrushes++;
|
numOpaqueBrushes++;
|
||||||
|
@ -2836,7 +2838,7 @@ void SetupBrushesFlags( int mask, int test )
|
||||||
}
|
}
|
||||||
void SetupBrushes( void )
|
void SetupBrushes( void )
|
||||||
{
|
{
|
||||||
SetupBrushesFlags(C_TRANSLUCENT, 0);
|
SetupBrushesFlags(C_TRANSLUCENT, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,10 @@ determines solid non-sky brushes in the world
|
||||||
|
|
||||||
void MiniMapSetupBrushes( void )
|
void MiniMapSetupBrushes( void )
|
||||||
{
|
{
|
||||||
SetupBrushesFlags(C_SOLID | C_SKY, C_SOLID);
|
SetupBrushesFlags(C_SOLID | C_SKY, C_SOLID, C_NODRAW, 0);
|
||||||
|
// at least one must be solid
|
||||||
|
// none may be sky
|
||||||
|
// not all may be nodraw
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean MiniMapEvaluateSampleOffsets(int *bestj, int *bestk, float *bestval)
|
qboolean MiniMapEvaluateSampleOffsets(int *bestj, int *bestk, float *bestval)
|
||||||
|
@ -744,6 +747,8 @@ int MiniMapBSPMain( int argc, char **argv )
|
||||||
if(v > ma)
|
if(v > ma)
|
||||||
ma = v;
|
ma = v;
|
||||||
}
|
}
|
||||||
|
if(ma > mi)
|
||||||
|
{
|
||||||
s = 1 / (ma - mi);
|
s = 1 / (ma - mi);
|
||||||
o = mi / (ma - mi);
|
o = mi / (ma - mi);
|
||||||
|
|
||||||
|
@ -759,6 +764,9 @@ int MiniMapBSPMain( int argc, char **argv )
|
||||||
Sys_Printf( "Auto level: Brightness changed to %f\n", minimap.brightness );
|
Sys_Printf( "Auto level: Brightness changed to %f\n", minimap.brightness );
|
||||||
Sys_Printf( "Auto level: Contrast changed to %f\n", minimap.contrast );
|
Sys_Printf( "Auto level: Contrast changed to %f\n", minimap.contrast );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Sys_Printf( "Auto level: failed because all pixels are the same value\n" );
|
||||||
|
}
|
||||||
|
|
||||||
if(minimap.brightness != 0 || minimap.contrast != 1)
|
if(minimap.brightness != 0 || minimap.contrast != 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1764,7 +1764,7 @@ void DirtyRawLightmap( int num );
|
||||||
void IlluminateRawLightmap( int num );
|
void IlluminateRawLightmap( int num );
|
||||||
void IlluminateVertexes( int num );
|
void IlluminateVertexes( int num );
|
||||||
|
|
||||||
void SetupBrushesFlags( int mask, int test );
|
void SetupBrushesFlags( int mask_any, int test_any, int mask_all, int test_all );
|
||||||
void SetupBrushes( void );
|
void SetupBrushes( void );
|
||||||
void SetupClusters( void );
|
void SetupClusters( void );
|
||||||
qboolean ClusterVisible( int a, int b );
|
qboolean ClusterVisible( int a, int b );
|
||||||
|
@ -1820,6 +1820,7 @@ void EmitVertexRemapShader( char *from, char *to );
|
||||||
|
|
||||||
void LoadShaderInfo( void );
|
void LoadShaderInfo( void );
|
||||||
shaderInfo_t *ShaderInfoForShader( const char *shader );
|
shaderInfo_t *ShaderInfoForShader( const char *shader );
|
||||||
|
shaderInfo_t *ShaderInfoForShaderNull( const char *shader );
|
||||||
|
|
||||||
|
|
||||||
/* bspfile_abstract.c */
|
/* bspfile_abstract.c */
|
||||||
|
|
|
@ -801,6 +801,12 @@ static void LoadShaderImages( shaderInfo_t *si ){
|
||||||
finds a shaderinfo for a named shader
|
finds a shaderinfo for a named shader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
shaderInfo_t *ShaderInfoForShaderNull( const char *shaderName ){
|
||||||
|
if(!strcmp(shaderName, "noshader"))
|
||||||
|
return NULL;
|
||||||
|
return ShaderInfoForShader(shaderName);
|
||||||
|
}
|
||||||
|
|
||||||
shaderInfo_t *ShaderInfoForShader( const char *shaderName ){
|
shaderInfo_t *ShaderInfoForShader( const char *shaderName ){
|
||||||
int i;
|
int i;
|
||||||
shaderInfo_t *si;
|
shaderInfo_t *si;
|
||||||
|
|
Loading…
Reference in a new issue