]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added scr_screenshot_jpeg_quality cvar (and added it to the menu)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Dec 2003 10:26:20 +0000 (10:26 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Dec 2003 10:26:20 +0000 (10:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3698 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
cl_screen.h
jpeg.c
menu.c
todo

index e38bb73629c931bb51b8ee701f5847cbb51145d6..5f13493e455d5b6ceee8010a6b24d10b1c9c600e 100644 (file)
@@ -17,8 +17,11 @@ cvar_t scr_printspeed = {0, "scr_printspeed","8"};
 cvar_t vid_conwidth = {CVAR_SAVE, "vid_conwidth", "640"};
 cvar_t vid_conheight = {CVAR_SAVE, "vid_conheight", "480"};
 cvar_t scr_screenshot_jpeg = {CVAR_SAVE, "scr_screenshot_jpeg","0"};
+cvar_t scr_screenshot_jpeg_quality = {CVAR_SAVE, "scr_screenshot_jpeg_quality","0.9"};
 cvar_t cl_avidemo = {0, "cl_avidemo", "0"};
 
+int jpeg_supported = false;
+
 qboolean       scr_initialized;                // ready to draw
 
 float          scr_con_current;
index 53156a92ca994440ffbc86ba361c3e016cc76855..c1edc105f64d34fa7a2bcd9d609b55f88e062584 100644 (file)
@@ -66,6 +66,7 @@ void SHOWLMP_clear(void);
 extern cvar_t vid_conwidth;
 extern cvar_t vid_conheight;
 extern cvar_t scr_screenshot_jpeg;
+extern cvar_t scr_screenshot_jpeg_quality;
 
 void CL_Screen_NewMap(void);
 void CL_Screen_Init(void);
diff --git a/jpeg.c b/jpeg.c
index b65e04a49e8e042137161b655cb657fbf62e76c5..0d33281297e57fa94eccd176b75d19f169c5c43c 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -700,7 +700,7 @@ qboolean JPEG_SaveImage_preflipped (const char *filename, int width, int height,
        cinfo.in_color_space = JCS_RGB;
        cinfo.input_components = 3;
        qjpeg_set_defaults (&cinfo);
-       qjpeg_set_quality (&cinfo, 90, TRUE);  // 90% quality; FIXME: use a cvar
+       qjpeg_set_quality (&cinfo, scr_screenshot_jpeg_quality.value * 100, TRUE);
        qjpeg_start_compress (&cinfo, true);
 
        // Compress each scanline
diff --git a/menu.c b/menu.c
index 4ba5a30ae042fcb56e27979c5d320ac82dac7b93..fae2bb182f471058f6de47c615c54a8e3a4ca797 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -1112,7 +1112,7 @@ void M_DrawCheckbox (int x, int y, int on)
 }
 
 
-#define OPTIONS_ITEMS 33
+#define OPTIONS_ITEMS 34
 
 int options_cursor;
 
@@ -1149,6 +1149,8 @@ void M_Menu_Options_AdjustSliders (int dir)
                Cvar_SetValueQuick (&scr_viewsize, bound(30, scr_viewsize.value + dir * 10, 120));
        else if (options_cursor == optnum++)
                Cvar_SetValueQuick (&scr_screenshot_jpeg, !scr_screenshot_jpeg.integer);
+       else if (options_cursor == optnum++)
+               Cvar_SetValueQuick (&scr_screenshot_jpeg, bound(0, scr_screenshot_jpeg_quality.value + dir * 0.1, 1));
        else if (options_cursor == optnum++)
                Cvar_SetValueQuick (&r_sky, !r_sky.integer);
        else if (options_cursor == optnum++)
@@ -1256,8 +1258,6 @@ void M_Options_Draw (void)
        p = Draw_CachePic("gfx/p_option.lmp");
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
-       // LordHavoc: FIXME: overbright needs to be disabled in GAME_GOODVSBAD2 but combine should not be disabled
-       // LordHavoc: perhaps it's time for Overbright Bits to die, and a r_lightmapintensity option to be added?
        optnum = 0;
        optcursor = options_cursor;
        visible = (vid.conheight - 32) / 8;
@@ -1276,6 +1276,7 @@ void M_Options_Draw (void)
        M_Options_PrintSlider(  "Conback Brightness", true, scr_conbrightness.value, 0, 1);
        M_Options_PrintSlider(  "       Screen size", true, scr_viewsize.value, 30, 120);
        M_Options_PrintCheckbox("  JPEG screenshots", jpeg_dll != NULL, scr_screenshot_jpeg.integer);
+       M_Options_PrintSlider(  "      JPEG quality", jpeg_dll != NULL, scr_screenshot_jpeg_quality.value, 0, 1);
        M_Options_PrintCheckbox("               Sky", true, r_sky.integer);
        M_Options_PrintCheckbox("   Texture Combine", true, gl_combine.integer);
        M_Options_PrintCheckbox("         Dithering", true, gl_dither.integer);
diff --git a/todo b/todo
index 6a2641bb3d6b96bc39a996e8b9cb422616771e91..8adf0f8c8016847de5a879f302596af7739023f7 100644 (file)
--- a/todo
+++ b/todo
@@ -35,6 +35,8 @@
 -n darkplaces: server is starting before the "port" cvar is set by commandline and scripts? (yummyluv)
 -n darkplaces: typing ip in join game menu should show 'trying' and 'no response' after a while, or 'no network' if networking is not initialized (yummyluv)
 -n dpmod: make grapple off-hand (joe hill)
+4 darkplaces: use larger of model box or collision box for linking into areagrid so that bullet tracing can use the model bounding box instead of the collision one?  (Urre)  
+2 darkplaces: use model box size for SOLID_BSP objects in areagrid linking and such, just for optimal consistency.
 0 darkplaces: GAME_FNIGGIUM: console doesn't show unless you manually pull it down
 0 darkplaces: add DP_GFX_QUAKE3MODELTAGS, DP_GFX_SKINFILES, and any other new extensions to the wiki
 d darkplaces: add DP_LITSUPPORT extension and document it