]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/light.c
Merge commit '0fb65a91c7530dc2215dddd13e7accf059c6f453' into garux-merge
[xonotic/netradiant.git] / tools / quake3 / q3map2 / light.c
index 38f5ac4537a738493c54f585bac161aa3bf87458..100bed593a748c7e0e2657ce235b08ab6eef5d7a 100644 (file)
@@ -2409,6 +2409,30 @@ int LightMain( int argc, char **argv ){
                        i++;
                }
 
+               /* Lighting brightness */
+               else if( !strcmp( argv[ i ], "-brightness" ) ){
+                       f = atof( argv[ i + 1 ] );
+                       lightmapBrightness = f;
+                       Sys_Printf( "Lighting brightness set to %f\n", lightmapBrightness );
+                       i++;
+               }
+
+               /* Lighting contrast */
+               else if( !strcmp( argv[ i ], "-contrast" ) ){
+                       f = atof( argv[ i + 1 ] );
+                       lightmapContrast = f;
+                       if( lightmapContrast > 255 ){
+                               lightmapContrast = 255;
+                       }
+                       else if( lightmapContrast < -255 ){
+                               lightmapContrast = -255;
+                       }
+                       Sys_Printf( "Lighting contrast set to %f\n", lightmapContrast );
+                       i++;
+                       /* change to factor in range of 0 to 129.5 */
+                       lightmapContrast = ( 259 * ( lightmapContrast + 255 ) ) / ( 255 * ( 259 - lightmapContrast ) );
+               }
+
                /* ydnar switches */
                else if ( !strcmp( argv[ i ], "-bounce" ) ) {
                        bounce = atoi( argv[ i + 1 ] );