mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
Merge branch 'master' into Mario/texturebrowser_fix
This commit is contained in:
@@ -302,7 +302,7 @@ DPatch* DPatch::MergePatches( patch_merge_t merge_info, DPatch *p1, DPatch *p2 )
|
||||
|
||||
int newHeight = p1->height + p2->height - 1;
|
||||
if ( newHeight > MAX_PATCH_HEIGHT ) {
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DPatch* newPatch = new DPatch();
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include "debugging/debugging.h"
|
||||
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ typedef enum {
|
||||
#define MAX_QINT 0x7fffffff
|
||||
#define MIN_QINT ( -MAX_QINT - 1 )
|
||||
|
||||
#ifndef max
|
||||
#if !defined(__cplusplus) && !defined(max)
|
||||
#define max( x, y ) ( ( ( x ) > ( y ) ) ? ( x ) : ( y ) )
|
||||
#define min( x, y ) ( ( ( x ) < ( y ) ) ? ( x ) : ( y ) )
|
||||
#endif
|
||||
|
||||
@@ -103,21 +103,21 @@
|
||||
|
||||
{
|
||||
"qfusion", /* -game x */
|
||||
"baseq3", /* default base game data dir */
|
||||
".q3a", /* unix home sub-dir */
|
||||
"quake", /* magic path word */
|
||||
"base", /* default base game data dir */
|
||||
".qfusion", /* unix home sub-dir */
|
||||
"qfusion", /* magic path word */
|
||||
"scripts", /* shader directory */
|
||||
2048, /* max lightmapped surface verts */
|
||||
2048, /* max surface verts */
|
||||
12288, /* max surface indexes */
|
||||
qtrue, /* flares */
|
||||
65535, /* max lightmapped surface verts */
|
||||
65535, /* max surface verts */
|
||||
393210, /* max surface indexes */
|
||||
qfalse, /* flares */
|
||||
"flareshader", /* default flare shader */
|
||||
qfalse, /* wolf lighting model? */
|
||||
512, /* lightmap width/height */
|
||||
1.0f, /* lightmap gamma */
|
||||
qfalse, /* lightmap sRGB */
|
||||
qfalse, /* texture sRGB */
|
||||
qfalse, /* color sRGB */
|
||||
qtrue, /* lightmap sRGB */
|
||||
qtrue, /* texture sRGB */
|
||||
qtrue, /* color sRGB */
|
||||
0.0f, /* lightmap exposure */
|
||||
1.0f, /* lightmap compensate */
|
||||
1.0f, /* lightgrid scale */
|
||||
@@ -125,15 +125,15 @@
|
||||
qtrue, /* light angle attenuation uses half-lambert curve */
|
||||
qtrue, /* disable shader lightstyles hack */
|
||||
qtrue, /* keep light entities on bsp */
|
||||
8, /* default patchMeta subdivisions tolerance */
|
||||
4, /* default patchMeta subdivisions tolerance */
|
||||
qtrue, /* patch casting enabled */
|
||||
qtrue, /* compile deluxemaps */
|
||||
0, /* deluxemaps default mode */
|
||||
256, /* minimap size */
|
||||
512, /* minimap size */
|
||||
1.0f, /* minimap sharpener */
|
||||
0.0f, /* minimap border */
|
||||
1.0f / 66.0f, /* minimap border */
|
||||
qtrue, /* minimap keep aspect */
|
||||
MINIMAP_MODE_WHITE, /* minimap mode */
|
||||
MINIMAP_MODE_GRAY, /* minimap mode */
|
||||
"../minimaps/%s.tga", /* minimap name format */
|
||||
"FBSP", /* bsp file prefix */
|
||||
1, /* bsp file version */
|
||||
|
||||
@@ -1910,14 +1910,14 @@ void LightWorld( const char *BSPFilePath, qboolean fastAllocate ){
|
||||
|
||||
/* find the optional minimum lighting values */
|
||||
GetVectorForKey( &entities[ 0 ], "_color", color );
|
||||
if ( VectorLength( color ) == 0.0f ) {
|
||||
VectorSet( color, 1.0, 1.0, 1.0 );
|
||||
}
|
||||
if ( colorsRGB ) {
|
||||
color[0] = Image_LinearFloatFromsRGBFloat( color[0] );
|
||||
color[1] = Image_LinearFloatFromsRGBFloat( color[1] );
|
||||
color[2] = Image_LinearFloatFromsRGBFloat( color[2] );
|
||||
}
|
||||
if ( VectorLength( color ) == 0.0f ) {
|
||||
VectorSet( color, 1.0, 1.0, 1.0 );
|
||||
}
|
||||
|
||||
/* ambient */
|
||||
f = FloatForKey( &entities[ 0 ], "_ambient" );
|
||||
|
||||
@@ -2310,12 +2310,6 @@ static int CompareRawLightmap( const void *a, const void *b ){
|
||||
/* get min number of surfaces */
|
||||
min = ( alm->numLightSurfaces < blm->numLightSurfaces ? alm->numLightSurfaces : blm->numLightSurfaces );
|
||||
|
||||
/* compare size, allocate bigger first */
|
||||
diff = ( blm->w * blm->h ) - ( alm->w * alm->h );
|
||||
if ( diff != 0 ) {
|
||||
return diff;
|
||||
}
|
||||
|
||||
/* iterate */
|
||||
for ( i = 0; i < min; i++ )
|
||||
{
|
||||
@@ -2338,6 +2332,12 @@ static int CompareRawLightmap( const void *a, const void *b ){
|
||||
return diff;
|
||||
}
|
||||
|
||||
/* compare size */
|
||||
diff = ( blm->w * blm->h ) - ( alm->w * alm->h );
|
||||
if ( diff != 0 ) {
|
||||
return diff;
|
||||
}
|
||||
|
||||
/* must be equivalent */
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user