]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
option: -sRGBcolor (unused yet)
authorRudolf Polzer <divverent@alientrap.org>
Wed, 14 Dec 2011 08:27:49 +0000 (09:27 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 14 Dec 2011 08:51:15 +0000 (09:51 +0100)
22 files changed:
tools/quake3/q3map2/bsp.c
tools/quake3/q3map2/game__null.h
tools/quake3/q3map2/game_darkplaces.h
tools/quake3/q3map2/game_dq.h
tools/quake3/q3map2/game_ef.h
tools/quake3/q3map2/game_etut.h
tools/quake3/q3map2/game_ja.h
tools/quake3/q3map2/game_jk2.h
tools/quake3/q3map2/game_nexuiz.h
tools/quake3/q3map2/game_prophecy.h
tools/quake3/q3map2/game_qfusion.h
tools/quake3/q3map2/game_quake3.h
tools/quake3/q3map2/game_quakelive.h
tools/quake3/q3map2/game_reaction.h
tools/quake3/q3map2/game_sof2.h
tools/quake3/q3map2/game_tenebrae.h
tools/quake3/q3map2/game_tremulous.h
tools/quake3/q3map2/game_wolf.h
tools/quake3/q3map2/game_wolfet.h
tools/quake3/q3map2/game_xonotic.h
tools/quake3/q3map2/light.c
tools/quake3/q3map2/q3map2.h

index e1b1e2fdc9c8ba19cf9906c124d34c4864e2a121..8fe5966a399b279ebe7da0b05d6b31b053effb60 100644 (file)
@@ -684,6 +684,7 @@ int BSPMain( int argc, char **argv )
        maxSurfaceIndexes = game->maxSurfaceIndexes;
        emitFlares = game->emitFlares;
        texturesRGB = game->texturesRGB;
+       colorsRGB = game->colorsRGB;
        
        /* process arguments */
        for( i = 1; i < (argc - 1); i++ )
@@ -934,6 +935,16 @@ int BSPMain( int argc, char **argv )
                        texturesRGB = qfalse;
                        Sys_Printf( "Textures are linear\n" );
                }
+               else if( !strcmp( argv[ i ], "-sRGBcolor" ) )
+               {
+                       colorsRGB = qtrue;
+                       Sys_Printf( "Colors are in sRGB\n" );
+               }
+               else if( !strcmp( argv[ i ], "-nosRGBcolor" ) )
+               {
+                       colorsRGB = qfalse;
+                       Sys_Printf( "Colors are linear\n" );
+               }
                else if( !strcmp( argv[ i ], "-altsplit" ) )
                {
                        Sys_Printf( "Alternate BSP splitting (by 27) enabled\n" );
index 5ff6aba7ee80c3008a286339675ceb74fa618cae..0f1a2a711591a33698ac04423c47c15b7b8f9dcd 100644 (file)
@@ -65,6 +65,7 @@ game_t struct
        0,                      /* lightmap gamma */
        qfalse,                 /* lightmap sRGB */
        qfalse,                 /* texture sRGB */
+       qfalse,                 /* color sRGB */
        0,                      /* lightmap exposure */
        0,                      /* lightmap compensate */
        0,                      /* lightgrid scale */
index ab73baa70a8eaed6a4e4adf1d946159a9bbe194a..1e09440f69b8ca8b0c68c68d0c2ed7b62b34f113 100644 (file)
@@ -56,6 +56,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        200.0f,                         /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        0.3f,                           /* lightgrid scale */
index 6507aec17eea9877dd4df5ee0bd386df2f68e9e5..92b40148a97b8567b57b27a1621c0574d8a91385 100644 (file)
@@ -56,6 +56,7 @@ game_t struct
        1.2f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        200.0f,                         /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        0.3f,                           /* lightgrid scale */
index 111366424195d3ed3da4c1689115188e9d258a56..7800f2bb99659b834d346dd98e8ef94bbee35f81 100644 (file)
@@ -115,6 +115,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 38bc083d5337c29d879793c7524335cd12729cf8..ebc0b92ca74a0566e4e949f5f24616ec9f5c7e30 100644 (file)
@@ -150,6 +150,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qtrue,                          /* lightmap sRGB */
        qfalse,                         /* texture sRGB (yes, this is incorrect, but we better match ET:UT) */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 3a1a4d483ab4adf0ca0f247239a3f1a5c20ff192..daf1f803430e7428b88f7a220049bad859659ca6 100644 (file)
@@ -69,6 +69,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 4dd4d845c5bd5c0da790f5fa92d6a59357cdabe2..b56e6e1110dfec9f630b70544708ad56bcaa7fe6 100644 (file)
@@ -66,6 +66,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 386cfd03330a62fb049fbb3f9e0e904a3b3005c9..dcfc0a22f69bb12d1965cd28a609cb79bc29096b 100644 (file)
@@ -65,6 +65,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 6d8b0a2197e80d254c3c58aebcd05fad2d571f05..9de11145a9eee6527624b036a2f164541a9a6941 100644 (file)
@@ -56,6 +56,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        200.0f,                         /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        0.4f,                           /* lightgrid scale */
index 681f75d799df1b268ab687fe6817aae7407bb82d..1a2c926f196f0b946f9ee12fdd03ef0dbe21f143 100644 (file)
@@ -117,6 +117,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 76b3ff3711e330d5c54b751f65f2c410a2eab860..90a066e55f0f28e713256234943c9fe9b1d39014 100644 (file)
@@ -114,6 +114,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index ba781cdca2a276545a1585b418e4e41d89f50f43..e6703fc97e8395ac2d0e02d4fc0b79160c2d9126 100644 (file)
@@ -66,6 +66,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index ea59e3581c15d40463392b225ea03e28ac8b8d24..55b19c3f3afc6e318bf5635981dc75d72efa92db 100644 (file)
@@ -86,6 +86,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 98081da6d6b1c5778dc2efa5e01969df03495bd3..adce6b67f8c829be6184693e2e92f26d5388ca0a 100644 (file)
@@ -141,6 +141,7 @@ game_t struct
        1.0f,                                   /* lightmap gamma */
        qfalse,                                 /* lightmap sRGB */
        qfalse,                                 /* texture sRGB */
+       qfalse,                                 /* color sRGB */
        1.0f,                                   /* lightmap exposure */
        1.0f,                                   /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 9e0658f10c2686a7f8b7ae546d15811b6534aa2b..081c9c4d25fbdfc86155d35c30283b1bccf4ed7a 100644 (file)
@@ -114,6 +114,7 @@ game_t struct
        2.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 08027fe6539e3b627c35d61d6e15cbf5ed5db2d3..a74c539c54e869a487651b7358ad457563eb3892 100644 (file)
@@ -72,6 +72,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 94339e651b8e11b1492c1e16f0655b2eb26d679c..d16e2db5123f2d9af8e5a80f5b40a2fa9a7e84e2 100644 (file)
@@ -131,6 +131,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index bcb30985f32a0c0122e20bf3dc6605810d26366f..f6c69d1d161efb99a1a1217131d02298060f2c86 100644 (file)
@@ -68,6 +68,7 @@ game_t struct
        1.0f,                           /* lightmap gamma */
        qfalse,                         /* lightmap sRGB */
        qfalse,                         /* texture sRGB */
+       qfalse,                         /* color sRGB */
        1.0f,                           /* lightmap exposure */
        1.0f,                           /* lightmap compensate */
        1.0f,                           /* lightgrid scale */
index 2512193073adcd5c899db060c2c20cabbda652c5..3e1320411fc3cf6ae48ecd7374d086e7099cae1a 100644 (file)
@@ -65,6 +65,7 @@ game_t struct
        1.0f, /* lightmap gamma */
        qfalse, /* lightmap sRGB */
        qfalse, /* texture sRGB */
+       qfalse, /* color sRGB */
        1.0f, /* lightmap exposure */
        1.0f, /* lightmap compensate */
        1.0f, /* lightgrid scale */
index f4a735ca9dab7911ff064621e8d6295e16d7c8fe..67c0b4caeed626f93a2d885d4234889134e22c46 100644 (file)
@@ -2083,6 +2083,12 @@ int LightMain( int argc, char **argv )
        else
                Sys_Printf( " texture colorspace: linear\n" );
 
+       colorsRGB = game->colorsRGB;
+       if(colorsRGB)
+               Sys_Printf( " _color colorspace: sRGB\n" );
+       else
+               Sys_Printf( " _color colorspace: linear\n" );
+
        lightmapCompensate = game->lightmapCompensate;
        Sys_Printf( " lightning compensation: %f\n", lightmapCompensate );
 
@@ -2259,6 +2265,18 @@ int LightMain( int argc, char **argv )
                        Sys_Printf( "Textures are linear\n" );
                }
 
+               else if( !strcmp( argv[ i ], "-sRGBcolor" ) )
+               {
+                       colorsRGB = qtrue;
+                       Sys_Printf( "Colors are in sRGB\n" );
+               }
+
+               else if( !strcmp( argv[ i ], "-nosRGBcolor" ) )
+               {
+                       colorsRGB = qfalse;
+                       Sys_Printf( "Colors are linear\n" );
+               }
+
                else if( !strcmp( argv[ i ], "-exposure" ) )
                {
                        f = atof( argv[ i + 1 ] );
index 720d63b1070b895e1eec5cbd99fb125594bafcaa..58a6d2fed2dc0a0df1a7d059c11f4c430b6e162d 100644 (file)
@@ -567,6 +567,7 @@ typedef struct game_s
        float                           lightmapGamma;                                  /* default lightmap gamma */
        qboolean                        lightmapsRGB;                                   /* default lightmap sRGB mode */
        qboolean                        texturesRGB;                                    /* default texture sRGB mode */
+       qboolean                        colorsRGB;                                      /* default color sRGB mode */
        float                           lightmapExposure;                               /* default lightmap exposure */
        float                           lightmapCompensate;                             /* default lightmap compensate value */
        float                           gridScale;                                              /* vortex: default lightgrid scale (affects both directional and ambient spectres) */
@@ -2302,6 +2303,7 @@ Q_EXTERN qboolean                 inGrid Q_ASSIGN(0);
 Q_EXTERN float                         lightmapGamma Q_ASSIGN( 1.0f );
 Q_EXTERN float                         lightmapsRGB Q_ASSIGN( qfalse );
 Q_EXTERN float                         texturesRGB Q_ASSIGN( qfalse );
+Q_EXTERN float                         colorsRGB Q_ASSIGN( qfalse );
 Q_EXTERN float                         lightmapExposure Q_ASSIGN( 1.0f );
 Q_EXTERN float                         lightmapCompensate Q_ASSIGN( 1.0f );