[Scummvm-cvs-logs] SF.net SVN: scummvm:[45378] scummvm/trunk

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Oct 25 21:53:07 CET 2009


Revision: 45378
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45378&view=rev
Author:   thebluegr
Date:     2009-10-25 20:53:07 +0000 (Sun, 25 Oct 2009)

Log Message:
-----------
- Removed graphics options code from the old GUI. Almost all of them are not supposed to be modified by the user (e.g. the way lines and brushes are drawn), and we can implement any of them again if needed in the new GUI (but they shouldn't really be needed).
- Added a config option to disable dithering in the new GUI if requested, called "undither", which is set to true by default and can be changed to false if needed per game
- The per-resource palette code has been removed for now, to be replaced by regular hashmaps (once the FreeSCI scifx reading code has been converted)

Modified Paths:
--------------
    scummvm/trunk/dists/msvc8/sci.vcproj
    scummvm/trunk/dists/msvc9/sci.vcproj
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.h
    scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
    scummvm/trunk/engines/sci/gfx/gfx_system.h
    scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
    scummvm/trunk/engines/sci/gfx/gfx_tools.h
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/operations.h
    scummvm/trunk/engines/sci/gui32/res_pic.cpp
    scummvm/trunk/engines/sci/module.mk
    scummvm/trunk/engines/sci/sci.cpp

Removed Paths:
-------------
    scummvm/trunk/engines/sci/gfx/gfx_options.h
    scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
    scummvm/trunk/engines/sci/gfx/gfx_res_options.h

Modified: scummvm/trunk/dists/msvc8/sci.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/sci.vcproj	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/dists/msvc8/sci.vcproj	2009-10-25 20:53:07 UTC (rev 45378)
@@ -60,10 +60,7 @@
 			<File RelativePath="..\..\engines\sci\gfx\gfx_driver.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_gui.cpp" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_gui.h" />
-			<File RelativePath="..\..\engines\sci\gfx\gfx_options.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_pixmap_scale.cpp" />
-			<File RelativePath="..\..\engines\sci\gfx\gfx_res_options.cpp" />
-			<File RelativePath="..\..\engines\sci\gfx\gfx_res_options.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_resmgr.cpp" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_resmgr.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_resource.cpp" />

Modified: scummvm/trunk/dists/msvc9/sci.vcproj
===================================================================
--- scummvm/trunk/dists/msvc9/sci.vcproj	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/dists/msvc9/sci.vcproj	2009-10-25 20:53:07 UTC (rev 45378)
@@ -61,10 +61,7 @@
 			<File RelativePath="..\..\engines\sci\gfx\gfx_driver.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_gui.cpp" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_gui.h" />
-			<File RelativePath="..\..\engines\sci\gfx\gfx_options.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_pixmap_scale.cpp" />
-			<File RelativePath="..\..\engines\sci\gfx\gfx_res_options.cpp" />
-			<File RelativePath="..\..\engines\sci\gfx\gfx_res_options.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_resmgr.cpp" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_resmgr.h" />
 			<File RelativePath="..\..\engines\sci\gfx\gfx_resource.cpp" />

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -283,14 +283,6 @@
 }
 
 int game_init_graphics(EngineState *s) {
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-#ifndef WITH_PIC_SCALING
-	if (s->gfx_state->options->pic0_unscaled == 0)
-		warning("Pic scaling was disabled; your version of ScummVM has no support for scaled pic drawing built in.");
-
-	s->gfx_state->options->pic0_unscaled = 1;
-#endif
-#endif
 	return _reset_graphics_input(s);
 }
 

Deleted: scummvm/trunk/engines/sci/gfx/gfx_options.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-10-25 20:53:07 UTC (rev 45378)
@@ -1,63 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-
-#ifndef SCI_GFX_GFX_OPTIONS_H
-#define SCI_GFX_GFX_OPTIONS_H
-
-#include "sci/gfx/gfx_resource.h"
-#include "sci/gfx/gfx_tools.h"
-
-// Define this to enable user-defined custom graphics options
-#define CUSTOM_GRAPHICS_OPTIONS
-
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-#include "sci/gfx/gfx_res_options.h"
-#endif
-
-namespace Sci {
-
-/**
- * All user options to the rendering pipeline
- *
- * See note in sci_conf.h for config_entry_t before changing types of
- * variables
- */
-struct gfx_options_t {
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	/* SCI0 pic resource options */
-	int pic0_unscaled; /* Don't draw scaled SCI0 pics */
-	DitherMode pic0_dither_mode; /* Mode to use for pic0 dithering, defined in gfx_resource.h */
-
-	gfx_brush_mode_t pic0_brush_mode;
-	gfx_line_mode_t pic0_line_mode;
-
-	gfx_res_fullconf_t res_conf; /* Resource customisation: Per-resource palettes etc. */
-#endif
-};
-
-} // End of namespace Sci
-
-#endif // SCI_GFX_GFX_OPTIONS_H

Modified: scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -99,13 +99,8 @@
 		}
 	}
 
-	if (pxm->flags & GFX_PIXMAP_FLAG_SCALED_INDEX) {
-		pxm->width = pxm->index_width;
-		pxm->height = pxm->index_height;
-	} else {
-		pxm->width = pxm->index_width * mode->scaleFactor;
-		pxm->height = pxm->index_height * mode->scaleFactor;
-	}
+	pxm->width = pxm->index_width;
+	pxm->height = pxm->index_height;
 }
 
 
@@ -123,7 +118,7 @@
 			pxm->alpha_map = (byte*)malloc(mode->scaleFactor * mode->scaleFactor * pxm->index_width * pxm->index_height + 1);
 	}
 
-	_gfx_xlate_pixmap_unfiltered(mode, pxm, !(pxm->flags & GFX_PIXMAP_FLAG_SCALED_INDEX));
+	_gfx_xlate_pixmap_unfiltered(mode, pxm, false);
 
 	if (pxm->palette)
 		pxm->palette_revision = pxm->palette->getRevision();

Deleted: scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -1,140 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#include "sci/sci.h"
-#include "sci/gfx/gfx_system.h"
-#include "sci/gfx/gfx_options.h"
-#include "sci/gfx/gfx_resmgr.h"
-
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-
-namespace Sci {
-
-static bool matches_patternlist(gfx_res_pattern_t *patterns, int nr, int val) {
-	for (int i = 0; i < nr; i++)
-		if (patterns[i].min <= val && patterns[i].max >= val)
-			return true;
-
-	return false;
-}
-
-static bool resource_matches_patternlists(gfx_res_conf_t *conf, int type, int nr, int loop, int cel) {
-	int loc;
-	if (conf->patterns_nr && !matches_patternlist(conf->patterns, conf->patterns_nr, nr))
-		return false;
-
-	if (type == GFX_RESOURCE_TYPE_CURSOR)
-		return true;
-
-	/* Otherwise, we must match at least the loop (pic)
-	** and, for views, the cel as well  */
-	loc = conf->patterns_nr;
-	if (conf->loops_nr &&
-	        !matches_patternlist(conf->patterns + loc,
-	                             conf->loops_nr,
-	                             loop))
-		return false;
-
-	if (type != GFX_RESOURCE_TYPE_VIEW)
-		return true;
-
-	loc += conf->loops_nr;
-
-	if (!conf->cels_nr)
-		return true;
-
-	return matches_patternlist(conf->patterns + loc, conf->cels_nr, cel);
-}
-
-static gfx_res_conf_t *find_match(gfx_res_conf_t *conflist, int type, int nr, int loop, int cel) {
-	while (conflist) {
-		if (resource_matches_patternlists(conflist, type, nr, loop, cel))
-			return conflist;
-
-		conflist = conflist->next;
-	}
-
-	return NULL;
-}
-
-void apply_mod(byte rFactor, byte gFactor, byte bFactor, gfx_pixmap_t *pxm) {
-	Palette *pal = pxm->palette;
-	int i, pal_size = pal ? pal->size() : 0;
-
-	// Id the pixmap's palette is shared, duplicate it
-	if (pal && pal->isShared()) {
-		pal = pxm->palette->copy();
-		pxm->palette->free();
-		pxm->palette = pal;
-	}
-
-	for (i = 0; i < pal_size; i++) {
-		PaletteEntry c = pal->getColor(i);
-		c.r = CLIP<int>((c.r * rFactor) >> 4, 0, 255);
-		c.g = CLIP<int>((c.g * gFactor) >> 4, 0, 255);
-		c.b = CLIP<int>((c.b * bFactor) >> 4, 0, 255);
-		pal->setColor(i, c.r, c.g, c.b);
-	}
-}
-
-int gfx_get_res_config(gfx_res_fullconf_t res_conf, gfx_pixmap_t *pxm) {
-	int restype = GFXR_RES_TYPE(pxm->ID);
-	int nr = GFXR_RES_NR(pxm->ID);
-	int loop = pxm->loop;
-	int cel = pxm->cel;
-
-	gfx_res_conf_t *conf;
-
-	if (pxm->ID < 0 || restype < 0 || restype >= GFX_RESOURCE_TYPES_NR)
-		return 1; // Not appropriate
-
-	// Find assignment config, if available
-	conf = find_match(res_conf.assign[restype], restype, nr, loop, cel);
-	if (conf) {
-		// Assign palette
-		if (pxm->palette)
-			pxm->palette->free();
-
-		pxm->palette = new Palette(conf->colors,
-								   conf->colors_nr);
-		pxm->palette->name = "res";
-	}
-
-	// Find mod config, if available
-	conf = res_conf.mod[restype];
-	while (conf) {
-		conf = find_match(conf, restype, nr, loop, cel);
-		if (conf) {
-			apply_mod(conf->rFactor, conf->gFactor, conf->bFactor, pxm);
-			conf = conf->next;
-		}
-	}
-
-	return 0;
-}
-
-} // End of namespace Sci
-
-#endif

Deleted: scummvm/trunk/engines/sci/gfx/gfx_res_options.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_res_options.h	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_res_options.h	2009-10-25 20:53:07 UTC (rev 45378)
@@ -1,91 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#ifndef SCI_GFX_GFX_RES_OPTIONS_H
-#define SCI_GFX_GFX_RES_OPTIONS_H
-
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-
-#include "sci/sci.h"
-#include "sci/gfx/gfx_resource.h"
-#include "sci/gfx/gfx_resmgr.h"
-
-namespace Sci {
-/** @name Configuration options for per-resource customisations */
-/** @{ */
-
-struct gfx_res_pattern_t {
-	int min, max;
-};
-
-/**
- * GFX resource modifications/
- */
-struct gfx_res_conf_t {
-	int type; /**< Resource type-- only one allowed */
-
-	/* If any of the following is 0, it means that there is no restriction.
-	** Otherwise, one of the patterns associated with them must match. */
-	int patterns_nr; /**< Number of patterns (only 'view' patterns for views) */
-	int loops_nr, cels_nr; /**< Number of loop/cel patterns, for views only.
-			       ** For pics, loops_nr identifies the palette. */
-
-	gfx_res_pattern_t *patterns;
-
-	int colors_nr;
-	PaletteEntry *colors;
-	byte rFactor, gFactor, bFactor;
-
-	gfx_res_conf_t *next;
-};
-
-
-struct gfx_res_fullconf_t {
-	gfx_res_conf_t *assign[GFX_RESOURCE_TYPES_NR];
-	gfx_res_conf_t *mod[GFX_RESOURCE_TYPES_NR];
-};
-
-
-struct gfx_options_t;
-
-/**
- * Configures a graphical pixmap according to config options.
- *
- * Modifies pxm as considered appropriate by configuration options. Does
- * not do anything in colour index mode.
- *
- * @param[in] res_conf	The resource options according to which modifications
- * 						should be performed
- * @param[in] pxm		The pixmap to configure
- * @return				0 on success, non-zero otherwise
- */
-int gfx_get_res_config(gfx_res_fullconf_t res_conf, gfx_pixmap_t *pxm);
-
-/** @} */
-} // End of namespace Sci
-
-#endif
-
-#endif // SCI_GFX_GFX_RES_OPTIONS_H

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -44,16 +44,13 @@
 
 namespace Sci {
 
-// Invalid hash mode: Used to invalidate modified pics
-#define MODE_INVALID -1
-
 struct param_struct {
 	int args[4];
 	GfxDriver *driver;
 };
 
-GfxResManager::GfxResManager(gfx_options_t *options, GfxDriver *driver, ResourceManager *resMan, SciGuiScreen *screen, SciGuiPalette *palette) :
-				_options(options), _driver(driver), _resMan(resMan), _screen(screen), _palette(palette),
+GfxResManager::GfxResManager(GfxDriver *driver, ResourceManager *resMan, SciGuiScreen *screen, SciGuiPalette *palette) :
+				_driver(driver), _resMan(resMan), _screen(screen), _palette(palette),
 				_lockCounter(0), _tagLockCounter(0), _staticPalette(0) {
 	gfxr_init_static_palette();
 
@@ -86,14 +83,8 @@
 
 	basic_style.line_mode = GFX_LINE_MODE_CORRECT;
 	basic_style.brush_mode = GFX_BRUSH_MODE_SCALED;
-
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	style.line_mode = _options->pic0_line_mode;
-	style.brush_mode = _options->pic0_brush_mode;
-#else
 	style.line_mode = GFX_LINE_MODE_CORRECT;
 	style.brush_mode = GFX_BRUSH_MODE_RANDOM_ELLIPSES;
-#endif
 
 	if (!res || !res->data)
 		error("calculatePic(): pic number %d not found", nr);
@@ -122,11 +113,7 @@
 
 		memcpy(scaled_pic->undithered_buffer, scaled_pic->visual_map->index_data, scaled_pic->undithered_buffer_size);
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-		gfxr_dither_pic0(scaled_pic, _options->pic0_dither_mode);
-#else
 		gfxr_dither_pic0(scaled_pic, kDitherNone);
-#endif
 	}
 
 	// Mark default palettes
@@ -137,41 +124,6 @@
 		unscaled_pic->visual_map->loop = default_palette;
 }
 
-int GfxResManager::getOptionsHash(gfx_resource_type_t type) {
-	switch (type) {
-	case GFX_RESOURCE_TYPE_VIEW:
-		// This should never happen
-		error("getOptionsHash called on a VIEW resource");
-
-	case GFX_RESOURCE_TYPE_PIC:
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-		if (_resMan->isVGA())
-			// NOTE: here, it is assumed that the upper port bound is always 10, but this doesn't seem to matter for the
-			// generated options hash anyway
-			return 10;
-		else
-			return (_options->pic0_unscaled) ? 0x10000 : 
-					 (_options->pic0_dither_mode << 12) |
-					 (_options->pic0_brush_mode << 4) |
-				     (_options->pic0_line_mode);
-#else
-		if (_resMan->isVGA())
-			return 10;
-		else
-			return 0x10000 | (GFX_BRUSH_MODE_RANDOM_ELLIPSES << 4) | GFX_LINE_MODE_CORRECT;
-#endif
-
-	case GFX_RESOURCE_TYPE_FONT:
-	case GFX_RESOURCE_TYPE_CURSOR:
-		return 0;
-
-	case GFX_RESOURCE_TYPES_NR:
-	default:
-		error("Invalid resource type: %d", type);
-		return -1;
-	}
-}
-
 #define FREEALL(freecmd, type) \
 	if (resource->scaled_data.type) \
 		freecmd(resource->scaled_data.type); \
@@ -299,8 +251,7 @@
 		} \
 	}
 
-static gfxr_pic_t *gfxr_pic_xlate_common(gfx_resource_t *res, int maps, int scaled, int force, gfx_mode_t *mode,
-										 gfx_options_t *options) {
+static gfxr_pic_t *gfxr_pic_xlate_common(gfx_resource_t *res, int maps, int scaled, int force, gfx_mode_t *mode) {
 
 	XLATE_AS_APPROPRIATE(GFX_MASK_VISUAL, visual_map);
 	XLATE_AS_APPROPRIATE(GFX_MASK_PRIORITY, priority_map);
@@ -324,27 +275,16 @@
 	gfxr_pic_t *npic = NULL;
 	IntResMap &resMap = _resourceMaps[GFX_RESOURCE_TYPE_PIC];
 	gfx_resource_t *res = NULL;
-	int hash = getOptionsHash(GFX_RESOURCE_TYPE_PIC);
 	int need_unscaled = (_driver->getMode()->scaleFactor != 1);
 
-	hash |= (flags << 20) | ((default_palette & 0x7) << 28);
-
 	res = resMap.contains(num) ? resMap[num] : NULL;
 
-	if (!res || res->mode != hash) {
+	if (!res) {
 		gfxr_pic_t *pic = NULL;
 		gfxr_pic_t *unscaled_pic = NULL;
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-		if (_options->pic0_unscaled) {
-			need_unscaled = 0;
-			pic = gfxr_init_pic(&mode_1x1_color_index, GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, num), _resMan->isVGA());
-		} else
-			pic = gfxr_init_pic(_driver->getMode(), GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, num), _resMan->isVGA());
-#else
 		need_unscaled = 0;
 		pic = gfxr_init_pic(_driver->getMode(), GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, num), _resMan->isVGA());
-#endif
 
 		if (!pic) {
 			error("Failed to allocate scaled pic");
@@ -375,22 +315,14 @@
 				gfxr_free_pic(res->unscaled_data.pic);
 		}
 
-		res->mode = hash;
 		res->scaled_data.pic = pic;
 		res->unscaled_data.pic = unscaled_pic;
 	} else {
 		res->lock_sequence_nr = 0;
 	}
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	npic = gfxr_pic_xlate_common(res, maps, scaled || _options->pic0_unscaled, 0, _driver->getMode(),
-	                             _options);
-#else
-	npic = gfxr_pic_xlate_common(res, maps, 1, 0, _driver->getMode(),
-	                             _options);
-#endif
+	npic = gfxr_pic_xlate_common(res, maps, 1, 0, _driver->getMode());
 
-
 	return npic;
 }
 
@@ -417,44 +349,15 @@
 		return res->unscaled_data.pic->visual_map->ID;
 }
 
-static void _gfxr_unscale_pixmap_index_data(gfx_pixmap_t *pxm, gfx_mode_t *mode) {
-	int xmod = mode->scaleFactor; // Step size horizontally
-	int ymod = pxm->index_width * mode->scaleFactor; // Vertical step size
-	int maxpos = pxm->index_width * pxm->index_height;
-	int pos;
-	byte *dest = pxm->index_data;
-
-	if (!(pxm->flags & GFX_PIXMAP_FLAG_SCALED_INDEX))
-		return; // It's not scaled!
-
-	for (pos = 0; pos < maxpos; pos += ymod) {
-		int c;
-
-		for (c = 0; c < pxm->index_width; c += xmod)
-			*dest++ = pxm->index_data[pos + c];
-			// No overwrite since line and offset readers move much faster (proof by in-duction, trivial
-			// and left to the reader)
-	}
-
-	pxm->index_width /= mode->scaleFactor;
-	pxm->index_height /= mode->scaleFactor;
-	pxm->flags &= ~GFX_PIXMAP_FLAG_SCALED_INDEX;
-}
-
 gfxr_pic_t *GfxResManager::addToPic(int old_nr, int new_nr, int flags, int old_default_palette, int default_palette) {
 	IntResMap &resMap = _resourceMaps[GFX_RESOURCE_TYPE_PIC];
 	gfxr_pic_t *pic = NULL;
 	gfx_resource_t *res = NULL;
-	int hash = getOptionsHash(GFX_RESOURCE_TYPE_PIC);
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	int need_unscaled = !(_options->pic0_unscaled) && (_driver->getMode()->scaleFactor != 1 || _driver->getMode()->scaleFactor != 1);
-#else
 	int need_unscaled = 1;
-#endif
 
 	res = resMap.contains(old_nr) ? resMap[old_nr] : NULL;
 
-	if (!res || (res->mode != MODE_INVALID && res->mode != hash)) {
+	if (!res) {
 		getPic(old_nr, 0, flags, old_default_palette, 1);
 
 		res = resMap.contains(old_nr) ? resMap[old_nr] : NULL;
@@ -465,31 +368,15 @@
 		}
 	}
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	if (_options->pic0_unscaled) // Unscale priority map, if we scaled it earlier
-#endif
-		_gfxr_unscale_pixmap_index_data(res->scaled_data.pic->priority_map, _driver->getMode());
-
 	// The following two operations are needed when returning scaled maps (which is always the case here)
 	res->lock_sequence_nr = 0;
 	calculatePic(res->scaled_data.pic, need_unscaled ? res->unscaled_data.pic : NULL,
 		                               flags | DRAWPIC01_FLAG_OVERLAID_PIC, default_palette, new_nr);
 
-	res->mode = MODE_INVALID; // Invalidate
-
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	if (_options->pic0_unscaled) // Scale priority map again, if needed
-#endif
-		res->scaled_data.pic->priority_map = gfx_pixmap_scale_index_data(res->scaled_data.pic->priority_map, _driver->getMode());
-
 	{
 		int old_ID = get_pic_id(res);
 		set_pic_id(res, GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, new_nr)); // To ensure that our graphical translation options work properly
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-		pic = gfxr_pic_xlate_common(res, GFX_MASK_VISUAL, 1, 1, _driver->getMode(), _options);
-#else
-		pic = gfxr_pic_xlate_common(res, GFX_MASK_VISUAL, 1, 1, _driver->getMode(), _options);
-#endif
+		pic = gfxr_pic_xlate_common(res, GFX_MASK_VISUAL, 1, 1, _driver->getMode());
 		set_pic_id(res, old_ID);
 	}
 
@@ -506,7 +393,7 @@
 	gfxr_loop_t *loop_data = NULL;
 	gfx_pixmap_t *cel_data = NULL;
 
-	if (!res || res->mode != hash) {
+	if (!res) {
 		// Wrapper code for the new view decoder
 		view = (gfxr_view_t *)malloc(sizeof(gfxr_view_t));
 
@@ -575,13 +462,11 @@
 			res->scaled_data.view = NULL;
 			res->ID = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr);
 			res->lock_sequence_nr = _tagLockCounter;
-			res->mode = hash;
 			resMap[nr] = res;
 		} else {
 			gfxr_free_view(res->unscaled_data.view);
 		}
 
-		res->mode = hash;
 		res->unscaled_data.view = view;
 
 	} else {
@@ -595,7 +480,6 @@
 	cel_data = loop_data->cels[*cel];
 
 	if (!cel_data->data) {
-		gfx_get_res_config(_options->res_conf, cel_data);
 		gfx_xlate_pixmap(cel_data, _driver->getMode());
 	}
 
@@ -605,7 +489,6 @@
 gfx_bitmap_font_t *GfxResManager::getFont(int num, bool scaled) {
 	IntResMap &resMap = _resourceMaps[GFX_RESOURCE_TYPE_FONT];
 	gfx_resource_t *res = NULL;
-	int hash = getOptionsHash(GFX_RESOURCE_TYPE_FONT);
 
 	// Workaround: lsl1sci mixes its own internal fonts with the global
 	// SCI ones, so we translate them here, by removing their extra bits
@@ -614,7 +497,7 @@
 
 	res = resMap.contains(num) ? resMap[num] : NULL;
 
-	if (!res || res->mode != hash) {
+	if (!res) {
 		Resource *fontRes = _resMan->findResource(ResourceId(kResourceTypeFont, num), 0);
 		if (!fontRes || !fontRes->data)
 			return NULL;
@@ -626,7 +509,6 @@
 			res->scaled_data.font = NULL;
 			res->ID = GFXR_RES_ID(GFX_RESOURCE_TYPE_FONT, num);
 			res->lock_sequence_nr = _tagLockCounter;
-			res->mode = hash;
 			resMap[num] = res;
 		} else {
 			gfxr_free_font(res->unscaled_data.font);

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.h	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.h	2009-10-25 20:53:07 UTC (rev 45378)
@@ -64,7 +64,6 @@
 struct gfx_resource_t {
 	int ID; 				/**< Resource ID */
 	int lock_sequence_nr;	/**< See description of lock_counter in GfxResManager */
-	int mode;				/**< A mode type hash */
 
 	/** Scaled pic */
 	union {
@@ -92,29 +91,10 @@
 /** Graphics resource manager */
 class GfxResManager {
 public:
-	GfxResManager(gfx_options_t *options, GfxDriver *driver, ResourceManager *resMan, SciGuiScreen *screen, SciGuiPalette *palette);
+	GfxResManager(GfxDriver *driver, ResourceManager *resMan, SciGuiScreen *screen, SciGuiPalette *palette);
 	~GfxResManager();
 
-	/**
-	 * Calculates a unique hash value for the specified options/type
-	 * setup.
-	 *
-	 * Covering more entries than relevant may slow down the system when
-	 * options are changed, while covering less may result in invalid
-	 * cached data being used.
-	 * Only positive values may be returned, as negative values are used
-	 * internally by the generic resource manager code.
-	 * Also, only the lower 20 bits are available to the interpreter.
-	 * (Yes, this isn't really a "hash" in the traditional sense...)
-	 *
-	 * @param[in] type	The type the hash is to be generated for
-	 * @return			A hash over the values of the options entries,
-	 * 					covering entries iff they are relevant for the
-	 * 					specified type.
-	 */
-	int getOptionsHash(gfx_resource_type_t type);
 
-
 	/**
 	 * 'Tags' all resources for deletion.
 	 *
@@ -284,7 +264,6 @@
 	}
 
 private:
-	gfx_options_t *_options;
 	GfxDriver *_driver;
 	Palette *_staticPalette;
 	int _lockCounter;	/**< Global lock counter; increased for each new

Modified: scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_state_internal.h	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_state_internal.h	2009-10-25 20:53:07 UTC (rev 45378)
@@ -28,7 +28,6 @@
 
 #include "sci/engine/vm.h"
 #include "sci/gfx/gfx_tools.h"
-#include "sci/gfx/gfx_options.h"
 #include "sci/gfx/operations.h"
 #include "sci/gfx/gfx_resmgr.h"
 #include "sci/gfx/gfx_system.h"

Modified: scummvm/trunk/engines/sci/gfx/gfx_system.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-10-25 20:53:07 UTC (rev 45378)
@@ -130,9 +130,6 @@
 
 #define GFX_PIC_COLORS 256
 
-#define GFX_PIXMAP_FLAG_SCALED_INDEX	(1<<0) /* Index data is scaled already */
-#define GFX_PIXMAP_FLAG_INSTALLED		(1<<2) /* Pixmap has been registered */
-
 #define GFX_PIXMAP_COLOR_KEY_NONE -1 /* No transpacency colour key */
 #define GFX_CURSOR_TRANSPARENT 255 // Cursor colour key
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -144,13 +144,8 @@
 		return pixmap;
 	}
 
-	if (pixmap->flags & GFX_PIXMAP_FLAG_SCALED_INDEX) {
-		pixmap->width = pixmap->index_width;
-		pixmap->height = pixmap->index_height;
-	} else {
-		pixmap->width = pixmap->index_width * mode->scaleFactor;
-		pixmap->height = pixmap->index_height * mode->scaleFactor;
-	}
+	pixmap->width = pixmap->index_width;
+	pixmap->height = pixmap->index_height;
 
 	size = pixmap->width * pixmap->height;
 	if (!size)
@@ -160,65 +155,4 @@
 	return pixmap;
 }
 
-gfx_pixmap_t *gfx_pixmap_scale_index_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode) {
-	byte *old_data, *new_data, *initial_new_data;
-	byte *linestart;
-	int linewidth;
-	int xl, yl;
-	int i, yc;
-	int xfact = mode->scaleFactor;
-	int yfact = mode->scaleFactor;
-
-	if (xfact == 1 && yfact == 1)
-		return pixmap;
-
-	if (!pixmap)
-		return NULL;
-
-	if (pixmap->flags & GFX_PIXMAP_FLAG_SCALED_INDEX)
-		return pixmap; // Already done
-
-	old_data = pixmap->index_data;
-
-	if (!old_data) {
-		error("Attempt to scale index data without index data!\n");
-		return pixmap;
-	}
-
-	xl = pixmap->index_width;
-	yl = pixmap->index_height;
-	linewidth = xfact * xl;
-	initial_new_data = new_data = (byte *)malloc(linewidth * yfact * yl);
-
-	for (yc = 0; yc < yl; yc++) {
-
-		linestart = new_data;
-
-		if (xfact == 1) {
-			memcpy(new_data, old_data, linewidth);
-			new_data += linewidth;
-			old_data += linewidth;
-		} else for (i = 0; i < xl; i++) {
-				byte fillc = *old_data++;
-				memset(new_data, fillc, xfact);
-				new_data += xfact;
-			}
-
-		for (i = 1; i < yfact; i++) {
-			memcpy(new_data, linestart, linewidth);
-			new_data += linewidth;
-		}
-	}
-
-	free(pixmap->index_data);
-	pixmap->index_data = initial_new_data;
-
-	pixmap->flags |= GFX_PIXMAP_FLAG_SCALED_INDEX;
-
-	pixmap->index_width = linewidth;
-	pixmap->index_height *= yfact;
-
-	return pixmap;
-}
-
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_tools.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_tools.h	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/gfx_tools.h	2009-10-25 20:53:07 UTC (rev 45378)
@@ -180,15 +180,6 @@
 	byte *priority_dest, int priority_line_width, int priority_skip);
 
 
-/**
- * Scales the index data associated with a pixmap
- *
- * @param[in] pixmap	The pixmap whose index data should be scaled
- * @param[in] mode		The mode to scale it to
- * @return				The pixmap
- */
-gfx_pixmap_t *gfx_pixmap_scale_index_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode);
-
 /** @} */
 } // End of namespace Sci
 

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -354,12 +354,9 @@
 	(*pixmap)->palette = new Palette(default_colors, DEFAULT_COLORS_NR);
 }
 
-void gfxop_init(GfxState *state,
-				gfx_options_t *options, ResourceManager *resMan,
+void gfxop_init(GfxState *state, ResourceManager *resMan,
 				SciGuiScreen *screen, SciGuiPalette *palette, int scaleFactor) {
-	state->options = options;
 	state->visible_map = GFX_MASK_VISUAL;
-	state->options = options;
 	state->disable_dirty = 0;
 	state->_events.clear();
 	state->pic = state->pic_unscaled = NULL;
@@ -370,7 +367,7 @@
 
 	state->driver = new GfxDriver(screen, scaleFactor);
 
-	state->gfxResMan = new GfxResManager(state->options, state->driver, resMan, screen, palette);
+	state->gfxResMan = new GfxResManager(state->driver, resMan, screen, palette);
 
 	gfxop_set_clip_zone(state, gfx_rect(0, 0, 320, 200));
 
@@ -1382,10 +1379,6 @@
 		_gfxop_install_pixmap(state->driver, state->pic->visual_map);
 	}
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	if (state->options->pic0_unscaled)
-#endif
-		state->pic->priority_map = gfx_pixmap_scale_index_data(state->pic->priority_map, state->driver->getMode());
 	state->driver->setStaticBuffer(state->pic->visual_map, state->pic->priority_map);
 }
 

Modified: scummvm/trunk/engines/sci/gfx/operations.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.h	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gfx/operations.h	2009-10-25 20:53:07 UTC (rev 45378)
@@ -30,7 +30,6 @@
 
 #include "sci/gfx/gfx_resmgr.h"
 #include "sci/gfx/gfx_tools.h"
-#include "sci/gfx/gfx_options.h"
 #include "sci/gfx/gfx_system.h"
 #include "sci/uinput.h"
 
@@ -89,8 +88,6 @@
 
 
 struct GfxState {
-	gfx_options_t *options;
-
 	rect_t clip_zone_unscaled; /**< The current UNSCALED clipping zone */
 	rect_t clip_zone; /**< The current SCALED clipping zone; a cached scaled version of clip_zone_unscaled */
 
@@ -131,11 +128,9 @@
  * @param[in] state			The state to initialize
  * @param[in] scaleFactor	Scale factor
  * @param[in] mode			Graphics mode to use
- * @param[in] options		Rendering options
  * @param[in] resMan		Resource manager to use
  */
-void gfxop_init(GfxState *state, 
-		gfx_options_t *options, ResourceManager *resMan,
+void gfxop_init(GfxState *state, ResourceManager *resMan,
 		SciGuiScreen *screen, SciGuiPalette *palette, int scaleFactor = 1);
 
 /**

Modified: scummvm/trunk/engines/sci/gui32/res_pic.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui32/res_pic.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/gui32/res_pic.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -167,11 +167,6 @@
 	pic->visual_map->flags = 0;
 	pic->priority_map->flags = 0;
 	pic->control_map->flags = 0;
-	if (mode->scaleFactor > 1) {
-		pic->visual_map->flags |= GFX_PIXMAP_FLAG_SCALED_INDEX;
-		pic->priority_map->flags |= GFX_PIXMAP_FLAG_SCALED_INDEX;
-	}
-
 	pic->priority_map->palette = gfx_sci0_image_pal[sci0_palette]->getref();
 	pic->control_map->palette = gfx_sci0_image_pal[sci0_palette]->getref();
 
@@ -314,28 +309,6 @@
 
 #undef LINEMACRO
 
-#ifdef WITH_PIC_SCALING
-static void _gfxr_auxbuf_propagate_changes(gfxr_pic_t *pic, int bitmask) {
-	// Propagates all filled bits into the planes described by bitmask
-	unsigned long *data = (unsigned long *)pic->aux_map;
-	unsigned long clearmask = 0x07070707;
-	unsigned long andmask = (bitmask << 3) | (bitmask << (3 + 8)) | (bitmask << (3 + 16)) | (bitmask << (3 + 24));
-
-	if (sizeof(unsigned long) == 8) { // UltraSparc, Alpha, newer MIPSens, etc
-		andmask |= (andmask << 32);
-		clearmask |= (clearmask << 32);
-	}
-
-	for (int i = 0; i < GFXR_AUX_MAP_SIZE / sizeof(unsigned long); i++) {
-		unsigned long temp = *data & andmask;
-		temp >>= 3;
-		*data = (temp | *data) & clearmask;
-		++data;
-	}
-}
-#endif
-
-
 /*** Regular drawing operations ***/
 
 #define PATTERN_FLAG_RECTANGLE 0x10
@@ -878,113 +851,8 @@
 }
 
 
-#define IS_FILL_BOUNDARY(x) (((x) & legalmask) != legalcolor)
-
-#ifdef WITH_PIC_SCALING
-
-#define TEST_POINT(xx, yy) \
-	if (pic->aux_map[(yy) * 320 + (xx)] & FRESH_PAINT) { \
-		mpos = (((yy) * 320 * pic->mode->scaleFactor) + (xx)) * pic->mode->scaleFactor; \
-		for (iy = 0; iy < pic->mode->scaleFactor; iy++) { \
-			for (ix = 0; ix < pic->mode->scaleFactor; ix++) { \
-				if (!IS_FILL_BOUNDARY(test_map[mpos + ix])) { \
-					*x = ix + (xx) * pic->mode->scaleFactor; \
-					*y = iy + (yy) * pic->mode->scaleFactor; \
-					return 0; \
-				} \
-				mpos += linewidth; \
-			} \
-		} \
-	}
-
-static int _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, int max_x, int max_y, int x_320,
-	int y_200, int color, int drawenable, int *x, int *y) {
-	// returns -1 on failure, 0 on success
-	int linewidth = pic->mode->scaleFactor * 320;
-	int mpos, ix, iy;
-	int size_x = (max_x - min_x + 1) >> 1;
-	int size_y = (max_y - min_y + 1) >> 1;
-	int mid_x = min_x + size_x;
-	int mid_y = min_y + size_y;
-	int max_size = (size_x > size_y) ? size_x : size_y;
-	int size;
-	int legalcolor;
-	int legalmask;
-	byte *test_map;
-	*x = x_320 * pic->mode->scaleFactor;
-	*y = y_200 * pic->mode->scaleFactor;
-
-	if (size_x < 0 || size_y < 0)
-		return 0;
-
-	if (drawenable & GFX_MASK_VISUAL) {
-		test_map = pic->visual_map->index_data;
-
-		if ((color & 0xf) == 0xf // When dithering with white, do more
-								// conservative checks
-		        || (color & 0xf0) == 0xf0)
-			legalcolor = 0xff;
-		else
-			legalcolor = 0xf0; // Only check the second color
-
-		legalmask = legalcolor;
-	} else if (drawenable & GFX_MASK_PRIORITY) {
-		test_map = pic->priority_map->index_data;
-		legalcolor = 0;
-		legalmask = 0xf;
-	} else return -3;
-
-	TEST_POINT(x_320, y_200); // Most likely candidate
-	TEST_POINT(mid_x, mid_y); // Second most likely candidate
-
-	for (size = 1; size <= max_size; size++) {
-		int i;
-
-		if (size <= size_y) {
-			int limited_size = (size > size_x) ? size_x : size;
-
-			for (i = mid_x - limited_size; i <= mid_x + limited_size; i++) {
-				TEST_POINT(i, mid_y - size);
-				TEST_POINT(i, mid_y + size);
-			}
-		}
-
-		if (size <= size_x) {
-			int limited_size = (size - 1 > size_y) ? size_y : size - 1;
-
-			for (i = mid_y - limited_size; i <= mid_y + limited_size; i++) {
-				TEST_POINT(mid_x - size, i);
-				TEST_POINT(mid_x + size, i);
-			}
-		}
-	}
-
-	return -1;
-}
-
-#undef TEST_POINT
-
 } // End of namespace Sci
 
-// Now include the actual filling code (with scaling support)
-#define FILL_FUNCTION _gfxr_fill_any
-#define FILL_FUNCTION_RECURSIVE _gfxr_fill_any_recursive
-#define AUXBUF_FILL_HELPER _gfxr_auxbuf_fill_any_recursive
-#define AUXBUF_FILL _gfxr_auxbuf_fill_any
-#define DRAW_SCALED
-# include "picfill.cpp"
-#undef DRAW_SCALED
-#undef AUXBUF_FILL
-#undef AUXBUF_FILL_HELPER
-#undef FILL_FUNCTION_RECURSIVE
-#undef FILL_FUNCTION
-
-namespace Sci {
-
-#endif // defined(WITH_PIC_SCALING)
-
-} // End of namespace Sci
-
 // Include again, but this time without support for scaling
 #define FILL_FUNCTION _gfxr_fill_1
 #define FILL_FUNCTION_RECURSIVE _gfxr_fill_1_recursive
@@ -1280,19 +1148,10 @@
 		case PIC_OP_FILL:
 			debugC(2, kDebugLevelSci0Pic, "Fill @%d\n", pos);
 			while (*(resource + pos) < PIC_OP_FIRST) {
-				//fprintf(stderr,"####################\n");
 				GET_ABS_COORDS(x, y);
 				debugC(2, kDebugLevelSci0Pic, "Abs coords %d,%d\n", x, y);
-				//fprintf(stderr,"C=(%d,%d)\n", x, y + titlebar_size);
-#ifdef WITH_PIC_SCALING
-				if (pic->mode->scaleFactor > 1)
-					_gfxr_fill_any(pic, x, y + titlebar_size, (flags & DRAWPIC01_FLAG_FILL_NORMALLY) ?
-					               color : 0, priority, control, drawenable, titlebar_size);
-
-				else
-#endif
-					_gfxr_fill_1(pic, x, y + titlebar_size, (flags & DRAWPIC01_FLAG_FILL_NORMALLY) ?
-					             color : 0, priority, control, drawenable, titlebar_size);
+				_gfxr_fill_1(pic, x, y + titlebar_size, (flags & DRAWPIC01_FLAG_FILL_NORMALLY) ?
+				             color : 0, priority, control, drawenable, titlebar_size);
 			}
 			goto end_op_loop;
 

Modified: scummvm/trunk/engines/sci/module.mk
===================================================================
--- scummvm/trunk/engines/sci/module.mk	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/module.mk	2009-10-25 20:53:07 UTC (rev 45378)
@@ -38,7 +38,6 @@
 	gfx/gfx_driver.o \
 	gfx/gfx_gui.o \
 	gfx/gfx_pixmap_scale.o \
-	gfx/gfx_res_options.o \
 	gfx/gfx_resmgr.o \
 	gfx/gfx_resource.o \
 	gfx/gfx_support.o \

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-10-25 20:46:14 UTC (rev 45377)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-10-25 20:53:07 UTC (rev 45378)
@@ -138,25 +138,11 @@
 	_gamestate->gfx_state = &gfx_state;
 
 	// Assign default values to the config manager, in case settings are missing
-	ConfMan.registerDefault("dither_mode", "0");
+	ConfMan.registerDefault("undither", "true");
+	screen->unditherSetState(ConfMan.getBool("undither"));
 
-	// Default config:
-	gfx_options_t gfx_options;
+	gfxop_init(&gfx_state, _resMan, screen, palette, 1);
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	gfx_options.pic0_unscaled = 1;
-	gfx_options.pic0_dither_mode = (DitherMode)ConfMan.getInt("dither_mode");
-	gfx_options.pic0_brush_mode = GFX_BRUSH_MODE_RANDOM_ELLIPSES;
-	gfx_options.pic0_line_mode = GFX_LINE_MODE_CORRECT;
-	for (int i = 0; i < GFX_RESOURCE_TYPES_NR; i++) {
-		gfx_options.res_conf.assign[i] = NULL;
-		gfx_options.res_conf.mod[i] = NULL;
-	}
-	// Default config ends
-#endif
-
-	gfxop_init(&gfx_state, &gfx_options, _resMan, screen, palette, 1);
-
 	if (game_init_graphics(_gamestate)) { // Init interpreter graphics
 		warning("Game initialization failed: Error in GFX subsystem. Aborting...");
 		return Common::kUnknownError;


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