]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'master' into Mario/texturebrowser_fix
authorMario <mario@smbclan.net>
Sun, 12 Mar 2017 19:56:11 +0000 (05:56 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Mar 2017 19:56:11 +0000 (05:56 +1000)
contrib/bobtoolz/DPatch.cpp
libs/container/hashtable.h
libs/splines/q_shared.h
tools/quake3/q3map2/game_qfusion.h
tools/quake3/q3map2/light.c
tools/quake3/q3map2/lightmaps_ydnar.c

index 5916d7e0e961f48e1394b807a62dc43edbc48706..be49df4ef4ab9aa06f539161164e9bfce751be70 100644 (file)
@@ -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();
index 2c5677ce6d67f657e9d3b03268e921c4dbdef90c..0f174d20e87b813d27ac9cd983b161d0ffa54867 100644 (file)
@@ -25,6 +25,7 @@
 #include <cstddef>
 #include <algorithm>
 #include <functional>
+#include <memory>
 #include "debugging/debugging.h"
 
 
index 6cad80bc97eec9ac4f5e2b8cbaa6e7a1e57874d9..6ebfb99fa3ed25f8f1c2459de5b52806ac4b9d25 100644 (file)
@@ -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
index 3df7e141068d7516dd4ad09f7357117dd17eb412..5cd5b0386648ffc7c493778cfddf107399b2fad4 100644 (file)
 
 {
        "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 */
        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 */
index a408e35a60f8cb120deac63af01a250c833812b7..2571d4d2080cfefb656cd13b5e8e0964f4121fc8 100644 (file)
@@ -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" );
index 19791c4a7118738b539d877e5d2d150c4fc534cd..462331f1ad79ebdef34173719157122209db6f18 100644 (file)
@@ -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;
 }