[Scummvm-cvs-logs] SF.net SVN: scummvm:[43894] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Sep 1 22:28:44 CEST 2009
Revision: 43894
http://scummvm.svn.sourceforge.net/scummvm/?rev=43894&view=rev
Author: thebluegr
Date: 2009-09-01 20:28:44 +0000 (Tue, 01 Sep 2009)
Log Message:
-----------
Re-enabled custom graphics options, and read the cursor, view, pic and text filtering algorithm options from the ScummVM ini file (options "cursor_filter", "view_filter", "pic_filter" and "text_filter", 0 - unfiltered, 1 - bilinear filtering, 2 - trilinear filtering)
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
scummvm/trunk/engines/sci/gfx/gfx_options.h
scummvm/trunk/engines/sci/sci.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2009-09-01 19:40:29 UTC (rev 43893)
+++ scummvm/trunk/engines/sci/console.cpp 2009-09-01 20:28:44 UTC (rev 43894)
@@ -183,20 +183,6 @@
DCmd_Register("active_object", WRAP_METHOD(Console, cmdViewActiveObject));
DCmd_Register("acc_object", WRAP_METHOD(Console, cmdViewAccumulatorObject));
- // These were in sci.cpp
- /*
- con_hook_int(&(gfx_options.buffer_pics_nr), "buffer_pics_nr",
- "Number of pics to buffer in LRU storage\n");
- con_hook_int(&(gfx_options.pic0_dither_mode), "pic0_dither_mode",
- "Mode to use for pic0 dithering\n");
- con_hook_int(&(gfx_options.pic0_dither_pattern), "pic0_dither_pattern",
- "Pattern to use for pic0 dithering\n");
- con_hook_int(&(gfx_options.pic0_unscaled), "pic0_unscaled",
- "Whether pic0 should be drawn unscaled\n");
- con_hook_int(&(gfx_options.dirty_frames), "dirty_frames",
- "Dirty frames management\n");
- */
-
scriptState.seeking = kDebugSeekNothing;
scriptState.seekLevel = 0;
scriptState.runningStep = 0;
Modified: scummvm/trunk/engines/sci/gfx/gfx_options.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_options.h 2009-09-01 19:40:29 UTC (rev 43893)
+++ scummvm/trunk/engines/sci/gfx/gfx_options.h 2009-09-01 20:28:44 UTC (rev 43894)
@@ -31,10 +31,7 @@
#include "sci/gfx/gfx_tools.h"
// Define this to enable user-defined custom graphics options
-// TODO: Most of these options don't work in 256-color mode, plus there
-// is currently no way to actually set/change them somehow (other than
-// modifying the code)
-//#define CUSTOM_GRAPHICS_OPTIONS
+#define CUSTOM_GRAPHICS_OPTIONS
#ifdef CUSTOM_GRAPHICS_OPTIONS
#include "sci/gfx/gfx_res_options.h"
@@ -56,13 +53,13 @@
*/
struct gfx_options_t {
#ifdef CUSTOM_GRAPHICS_OPTIONS
- int buffer_pics_nr; /* Number of unused pics to buffer */
+ int buffer_pics_nr; /* Number of unused pics to buffer in LRU storage */
/* SCI0 pic resource options */
int pic0_unscaled; /* Don't draw scaled SCI0 pics */
- int pic0_dither_mode; /* Defined in gfx_resource.h */
- int pic0_dither_pattern; /* Defined in gfx_resource.h */
+ int pic0_dither_mode; /* Mode to use for pic0 dithering, defined in gfx_resource.h */
+ int pic0_dither_pattern; /* Pattern to use for pic0 dithering, defined in gfx_resource.h */
gfx_brush_mode_t pic0_brush_mode;
gfx_line_mode_t pic0_line_mode;
@@ -73,7 +70,7 @@
gfx_xlate_filter_t text_xlate_filter;
gfx_res_fullconf_t res_conf; /* Resource customisation: Per-resource palettes etc. */
- int dirty_frames;
+ int dirty_frames; // Dirty frames management
int workarounds; // Workaround flags - see below
#endif
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2009-09-01 19:40:29 UTC (rev 43893)
+++ scummvm/trunk/engines/sci/sci.cpp 2009-09-01 20:28:44 UTC (rev 43894)
@@ -159,6 +159,12 @@
_gamestate->animation_granularity = 4;
+ // Assign default values to the config manager, in case settings are missing
+ ConfMan.registerDefault("cursor_filter", "0");
+ ConfMan.registerDefault("view_filter", "0");
+ ConfMan.registerDefault("pic_filter", "0");
+ ConfMan.registerDefault("text_filter", "0");
+
// Default config:
gfx_options_t gfx_options;
@@ -169,10 +175,10 @@
gfx_options.pic0_dither_pattern = GFXR_DITHER_PATTERN_SCALED;
gfx_options.pic0_brush_mode = GFX_BRUSH_MODE_RANDOM_ELLIPSES;
gfx_options.pic0_line_mode = GFX_LINE_MODE_CORRECT;
- gfx_options.cursor_xlate_filter = GFX_XLATE_FILTER_NONE;
- gfx_options.view_xlate_filter = GFX_XLATE_FILTER_NONE;
- gfx_options.pic_xlate_filter = GFX_XLATE_FILTER_NONE;
- gfx_options.text_xlate_filter = GFX_XLATE_FILTER_NONE;
+ gfx_options.cursor_xlate_filter = (gfx_xlate_filter_t)ConfMan.getInt("cursor_filter");
+ gfx_options.view_xlate_filter = (gfx_xlate_filter_t)ConfMan.getInt("view_filter");
+ gfx_options.pic_xlate_filter = (gfx_xlate_filter_t)ConfMan.getInt("pic_filter");
+ gfx_options.text_xlate_filter = (gfx_xlate_filter_t)ConfMan.getInt("text_filter");
gfx_options.dirty_frames = GFXOP_DIRTY_FRAMES_CLUSTERS;
for (int i = 0; i < GFX_RESOURCE_TYPES_NR; i++) {
gfx_options.res_conf.assign[i] = NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list