diff options
| -rw-r--r-- | engines/sci/console.cpp | 14 | ||||
| -rw-r--r-- | engines/sci/gfx/gfx_options.h | 13 | ||||
| -rw-r--r-- | engines/sci/sci.cpp | 14 | 
3 files changed, 15 insertions, 26 deletions
| diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index c05b088eab..da461970d5 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -183,20 +183,6 @@ Console::Console(SciEngine *vm) : GUI::Debugger() {  	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; diff --git a/engines/sci/gfx/gfx_options.h b/engines/sci/gfx/gfx_options.h index 2e2b853562..babd9654e3 100644 --- a/engines/sci/gfx/gfx_options.h +++ b/engines/sci/gfx/gfx_options.h @@ -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 @@ enum {   */  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 @@ struct gfx_options_t {  	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 diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 94312e516c..e077a3fc2a 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -159,6 +159,12 @@ Common::Error SciEngine::run() {  	_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 @@ Common::Error SciEngine::run() {  	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; | 
