[Scummvm-cvs-logs] SF.net SVN: scummvm:[47005] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Jan 5 01:54:53 CET 2010


Revision: 47005
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47005&view=rev
Author:   thebluegr
Date:     2010-01-05 00:54:53 +0000 (Tue, 05 Jan 2010)

Log Message:
-----------
SCI: Removed the old graphics code

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/console.h
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/engine/kevent.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/kmenu.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/state.cpp
    scummvm/trunk/engines/sci/engine/state.h
    scummvm/trunk/engines/sci/engine/vm.h
    scummvm/trunk/engines/sci/gui/gui.cpp
    scummvm/trunk/engines/sci/gui/gui_menu.cpp
    scummvm/trunk/engines/sci/gui/gui_menu.h
    scummvm/trunk/engines/sci/module.mk
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/sci/sci.h

Removed Paths:
-------------
    scummvm/trunk/engines/sci/gfx/
    scummvm/trunk/engines/sci/gui32/

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/console.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -35,11 +35,6 @@
 #include "sci/engine/state.h"
 #include "sci/engine/gc.h"
 #include "sci/engine/kernel_types.h"	// for determine_reg_type
-#ifdef INCLUDE_OLDGFX
-#include "sci/gfx/gfx_gui.h"	// for sciw_set_status_bar
-#include "sci/gfx/gfx_state_internal.h"
-#include "sci/gfx/gfx_widgets.h"	// for getPort
-#endif
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 #include "sci/sfx/iterator/songlib.h"	// for SongLibrary
 #include "sci/sfx/iterator/iterator.h"	// for SCI_SONG_ITERATOR_TYPE_SCI0
@@ -111,31 +106,11 @@
 	DCmd_Register("exit",				WRAP_METHOD(Console, cmdExit));
 	DCmd_Register("list_saves",			WRAP_METHOD(Console, cmdListSaves));
 	// Screen
-	DCmd_Register("sci0_palette",		WRAP_METHOD(Console, cmdSci0Palette));
-	DCmd_Register("clear_screen",		WRAP_METHOD(Console, cmdClearScreen));
-	DCmd_Register("redraw_screen",		WRAP_METHOD(Console, cmdRedrawScreen));
-	DCmd_Register("fill_screen",		WRAP_METHOD(Console, cmdFillScreen));
 	DCmd_Register("show_map",			WRAP_METHOD(Console, cmdShowMap));
-	DCmd_Register("update_zone",		WRAP_METHOD(Console, cmdUpdateZone));
-	DCmd_Register("propagate_zone",		WRAP_METHOD(Console, cmdPropagateZone));
-	DCmd_Register("priority_bands",		WRAP_METHOD(Console, cmdPriorityBands));
 	// Graphics
 	DCmd_Register("draw_pic",			WRAP_METHOD(Console, cmdDrawPic));
-	DCmd_Register("draw_rect",			WRAP_METHOD(Console, cmdDrawRect));
-	DCmd_Register("draw_cel",			WRAP_METHOD(Console, cmdDrawCel));
-	DCmd_Register("view_info",			WRAP_METHOD(Console, cmdViewInfo));
 	DCmd_Register("undither",           WRAP_METHOD(Console, cmdUndither));
 	DCmd_Register("play_video",         WRAP_METHOD(Console, cmdPlayVideo));
-	// GUI
-	DCmd_Register("current_port",		WRAP_METHOD(Console, cmdCurrentPort));
-	DCmd_Register("print_port",			WRAP_METHOD(Console, cmdPrintPort));
-	DCmd_Register("visual_state",		WRAP_METHOD(Console, cmdVisualState));
-	DCmd_Register("flush_visual",		WRAP_METHOD(Console, cmdFlushPorts));
-	DCmd_Register("dynamic_views",		WRAP_METHOD(Console, cmdDynamicViews));
-	DCmd_Register("dropped_views",		WRAP_METHOD(Console, cmdDroppedViews));
-#ifdef GFXW_DEBUG_WIDGETS
-	DCmd_Register("print_widget",		WRAP_METHOD(Console, cmdPrintWidget));
-#endif
 	// Segments
 	DCmd_Register("segment_table",		WRAP_METHOD(Console, cmdPrintSegmentTable));
 	DCmd_Register("segtable",			WRAP_METHOD(Console, cmdPrintSegmentTable));	// alias
@@ -330,34 +305,10 @@
 	DebugPrintf(" room - Gets or sets the current room number\n");
 	DebugPrintf(" exit - Exits the game\n");
 	DebugPrintf("\n");
-	DebugPrintf("Screen:\n");
-	DebugPrintf(" sci0_palette - Sets the SCI0 palette to use (EGA, Amiga or grayscale)\n");
-	DebugPrintf(" clear_screen - Clears the screen\n");
-	DebugPrintf(" redraw_screen - Redraws the screen\n");
-	DebugPrintf(" fill_screen - Fills the screen with one of the EGA colors\n");
-	DebugPrintf(" show_map - Shows one of the screen maps (visual, priority or control)\n");
-	DebugPrintf(" update_zone - Propagates a rectangular area from the back buffer to the front buffer\n");
-	DebugPrintf(" propagate_zone - Propagates a rectangular area from a lower graphics buffer to a higher one\n");
-	DebugPrintf(" priority_bands - Shows information about priority bands\n");
-	DebugPrintf("\n");
 	DebugPrintf("Graphics:\n");
 	DebugPrintf(" draw_pic - Draws a pic resource\n");
-	DebugPrintf(" draw_rect - Draws a rectangle to the screen with one of the EGA colors\n");
-	DebugPrintf(" draw_cel - Draws a single view cel to the center of the screen\n");
-	DebugPrintf(" view_info - Displays information for the specified view\n");
 	DebugPrintf(" undither - Enable/disable undithering\n");
 	DebugPrintf("\n");
-	DebugPrintf("GUI:\n");
-	DebugPrintf(" current_port - Shows the ID of the currently active port\n");
-	DebugPrintf(" print_port - Prints information about a port\n");
-	DebugPrintf(" visual_state - Shows the state of the current visual widget\n");
-	DebugPrintf(" flush_visual - Flushes dynamically allocated ports (for memory profiling)\n");
-	DebugPrintf(" dynamic_views - Lists active dynamic views\n");
-	DebugPrintf(" dropped_views - Lists dropped dynamic views\n");
-#ifdef GFXW_DEBUG_WIDGETS
-	DebugPrintf(" print_widget - Shows active widgets (no params) or information on the specified widget indices\n");
-#endif
-	DebugPrintf("\n");
 	DebugPrintf("Segments:\n");
 	DebugPrintf(" segment_table / segtable - Lists all segments\n");
 	DebugPrintf(" segment_info / seginfo - Provides information on the specified segment\n");
@@ -699,22 +650,6 @@
 	return true;
 }
 
-extern int sci0_palette;
-
-bool Console::cmdSci0Palette(int argc, const char **argv) {
-	if (argc != 2) {
-		DebugPrintf("Sets the SCI0 palette to use - 0: EGA, 1: AGI/Amiga, 2: Grayscale\n");
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	sci0_palette = atoi(argv[1]);
-	cmdRedrawScreen(argc, argv);
-#endif
-
-	return false;
-}
-
 bool Console::cmdHexgrep(int argc, const char **argv) {
 	if (argc < 4) {
 		DebugPrintf("Searches some resources for a particular sequence of bytes, represented as hexadecimal numbers.\n");
@@ -832,24 +767,6 @@
 	return true;
 }
 
-bool Console::cmdClearScreen(int argc, const char **argv) {
-#ifdef INCLUDE_OLDGFX
-	gfxop_clear_box(_vm->_gamestate->gfx_state, gfx_rect(0, 0, 320, 200));
-	gfxop_update_box(_vm->_gamestate->gfx_state, gfx_rect(0, 0, 320, 200));
-#endif
-	return false;
-}
-
-bool Console::cmdRedrawScreen(int argc, const char **argv) {
-#ifdef INCLUDE_OLDGFX
-	_vm->_gamestate->visual->draw(Common::Point(0, 0));
-	gfxop_update_box(_vm->_gamestate->gfx_state, gfx_rect(0, 0, 320, 200));
-	gfxop_update(_vm->_gamestate->gfx_state);
-	kernel_sleep(_vm->_gamestate->_event, 0);
-#endif
-	return false;
-}
-
 bool Console::cmdSaveGame(int argc, const char **argv) {
 	if (argc != 2) {
 		DebugPrintf("Saves the current game state to the hard disk\n");
@@ -1055,123 +972,17 @@
 bool Console::cmdDrawPic(int argc, const char **argv) {
 	if (argc < 2) {
 		DebugPrintf("Draws a pic resource\n");
-		DebugPrintf("Usage: %s <nr> [<pal>] [<fl>]\n", argv[0]);
+		DebugPrintf("Usage: %s <nr>\n", argv[0]);
 		DebugPrintf("where <nr> is the number of the pic resource to draw\n");
-		DebugPrintf("<pal> is the optional default palette for the pic (default: 0)\n");
-		DebugPrintf("<fl> are any pic draw flags (default: 1)\n");
 		return true;
 	}
 
-	int flags = 1, default_palette = 0;
-
-	if (argc > 2)
-		default_palette = atoi(argv[2]);
-
-	if (argc == 4)
-		flags = atoi(argv[3]);
-
-#ifdef INCLUDE_OLDGFX
-	gfxop_new_pic(_vm->_gamestate->gfx_state, atoi(argv[1]), flags, default_palette);
-	gfxop_clear_box(_vm->_gamestate->gfx_state, gfx_rect(0, 0, 320, 200));
-	gfxop_update(_vm->_gamestate->gfx_state);
-	kernel_sleep(_vm->_gamestate->_event, 0);
-#else
 	_vm->_gamestate->_gui->drawPicture(atoi(argv[1]), 100, false, false, false, 0);
 	_vm->_gamestate->_gui->animateShowPic();
-#endif
 
 	return false;
 }
 
-bool Console::cmdDrawRect(int argc, const char **argv) {
-	if (argc != 6) {
-		DebugPrintf("Draws a rectangle to the screen with one of the EGA colors\n");
-		DebugPrintf("Usage: %s <x> <y> <width> <height> <color>\n", argv[0]);
-		DebugPrintf("where <color> is the EGA color to use (0-15)\n");
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	int col = CLIP<int>(atoi(argv[5]), 0, 15);
-
-	gfxop_set_clip_zone(_vm->_gamestate->gfx_state, gfx_rect_fullscreen);
-	gfxop_fill_box(_vm->_gamestate->gfx_state, gfx_rect(atoi(argv[1]), atoi(argv[2]),
-										atoi(argv[3]), atoi(argv[4])), _vm->_gamestate->ega_colors[col]);
-	gfxop_update(_vm->_gamestate->gfx_state);
-#endif
-
-	return false;
-}
-
-bool Console::cmdDrawCel(int argc, const char **argv) {
-	if (argc != 4) {
-		DebugPrintf("Draws a single view cel to the center of the screen\n");
-		DebugPrintf("Usage: %s <view> <loop> <cel> <palette>\n", argv[0]);
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	int view = atoi(argv[1]);
-	int loop = atoi(argv[2]);
-	int cel = atoi(argv[3]);
-	int palette = atoi(argv[4]);
-
-	gfxop_set_clip_zone(_vm->_gamestate->gfx_state, gfx_rect_fullscreen);
-	gfxop_draw_cel(_vm->_gamestate->gfx_state, view, loop, cel, Common::Point(160, 100), _vm->_gamestate->ega_colors[0], palette);
-	gfxop_update(_vm->_gamestate->gfx_state);
-#endif
-
-	return false;
-}
-
-bool Console::cmdViewInfo(int argc, const char **argv) {
-	if (argc != 2) {
-		DebugPrintf("Displays the number of loops and cels of each loop\n");
-		DebugPrintf("for the specified view resource and palette.");
-		DebugPrintf("Usage: %s <view> <palette>\n", argv[0]);
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	int view = atoi(argv[1]);
-	int palette = atoi(argv[2]);
-	int loops, i;
-	gfxr_view_t *view_pixmaps = NULL;
-	gfx_color_t transparent = { PaletteEntry(), 0, -1, -1, 0 };
-
-	DebugPrintf("Resource view.%d ", view);
-
-	loops = _vm->_gamestate->_gui->getLoopCount(view);
-
-	if (loops < 0)
-		DebugPrintf("does not exist.\n");
-	else {
-		DebugPrintf("has %d loops:\n", loops);
-
-		for (i = 0; i < loops; i++) {
-			int j, cels = _vm->_gamestate->_gui->getCelCount(view, i);
-
-			DebugPrintf("Loop %d: %d cels.\n", i, cels);
-			for (j = 0; j < cels; j++) {
-				int width;
-				int height;
-				Common::Point mod;
-
-				// Show pixmap on screen
-				view_pixmaps = _vm->_gamestate->gfx_state->gfxResMan->getView(view, &i, &j, palette);
-				gfxop_draw_cel(_vm->_gamestate->gfx_state, view, i, j, Common::Point(0,0), transparent, palette);
-
-				gfxop_get_cel_parameters(_vm->_gamestate->gfx_state, view, i, j, &width, &height, &mod);
-
-				DebugPrintf("   cel %d: size %dx%d, adj+(%d,%d)\n", j, width, height, mod.x, mod.y);
-			}
-		}
-	}
-#endif
-
-	return true;
-}
-
 bool Console::cmdUndither(int argc, const char **argv) {
 	if (argc != 2) {
 		DebugPrintf("Enable/disable undithering.\n");
@@ -1206,117 +1017,6 @@
 	}
 }
 
-bool Console::cmdUpdateZone(int argc, const char **argv) {
-	if (argc != 4) {
-		DebugPrintf("Propagates a rectangular area from the back buffer to the front buffer\n");
-		DebugPrintf("Usage: %s <x> <y> <width> <height>\n", argv[0]);
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	int x = atoi(argv[1]);
-	int y = atoi(argv[2]);
-	int width = atoi(argv[3]);
-	int height = atoi(argv[4]);
-
-	_vm->_gamestate->gfx_state->driver->update(gfx_rect(x, y, width, height), Common::Point(x, y), GFX_BUFFER_FRONT);
-#endif
-
-	return false;
-}
-
-bool Console::cmdPropagateZone(int argc, const char **argv) {
-	if (argc != 5) {
-		DebugPrintf("Propagates a rectangular area from a lower graphics buffer to a higher one\n");
-		DebugPrintf("Usage: %s <x> <y> <width> <height> <map>\n", argv[0]);
-		DebugPrintf("Where <map> can be 0 or 1\n");
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	int x = atoi(argv[1]);
-	int y = atoi(argv[2]);
-	int width = atoi(argv[3]);
-	int height = atoi(argv[4]);
-	int map = CLIP<int>(atoi(argv[5]), 0, 1);
-	rect_t rect = gfx_rect(x, y, width, height);
-
-	gfxop_set_clip_zone(_vm->_gamestate->gfx_state, gfx_rect_fullscreen);
-
-	if (map == 1)
-		gfxop_clear_box(_vm->_gamestate->gfx_state, rect);
-	else
-		gfxop_update_box(_vm->_gamestate->gfx_state, rect);
-	gfxop_update(_vm->_gamestate->gfx_state);
-	kernel_sleep(_vm->_gamestate->_event, 0);
-#endif
-
-	return false;
-}
-
-bool Console::cmdFillScreen(int argc, const char **argv) {
-	if (argc != 2) {
-		DebugPrintf("Fills the screen with one of the EGA colors\n");
-		DebugPrintf("Usage: %s <color>\n", argv[0]);
-		DebugPrintf("where <color> is the EGA color to use (0-15)\n");
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	int col = CLIP<int>(atoi(argv[1]), 0, 15);
-
-	gfxop_set_clip_zone(_vm->_gamestate->gfx_state, gfx_rect_fullscreen);
-	gfxop_fill_box(_vm->_gamestate->gfx_state, gfx_rect_fullscreen, _vm->_gamestate->ega_colors[col]);
-	gfxop_update(_vm->_gamestate->gfx_state);
-#endif
-
-	return false;
-}
-
-bool Console::cmdCurrentPort(int argc, const char **argv) {
-#ifdef INCLUDE_OLDGFX
-	if (!_vm->_gamestate->port)
-		DebugPrintf("There is no port active currently.\n");
-	else
-		DebugPrintf("Current port ID: %d\n", _vm->_gamestate->port->_ID);
-#endif
-
-	return true;
-}
-
-bool Console::cmdPrintPort(int argc, const char **argv) {
-	if (argc != 2) {
-		DebugPrintf("Prints information about a port\n");
-		DebugPrintf("%s current - prints information about the current port\n", argv[0]);
-		DebugPrintf("%s <ID> - prints information about the port with the specified ID\n", argv[0]);
-		return true;
-	}
-
-#ifdef INCLUDE_OLDGFX
-	GfxPort *port;
-	
-	if (!scumm_stricmp(argv[1], "current")) {
-		port = _vm->_gamestate->port;
-		if (!port)
-			DebugPrintf("There is no active port currently\n");
-		else
-			port->print(0);
-	} else {
-		if (!_vm->_gamestate->visual) {
-			DebugPrintf("Visual is uninitialized\n");
-		} else {
-			port = _vm->_gamestate->visual->getPort(atoi(argv[1]));
-			if (!port)
-				DebugPrintf("No such port\n");
-			else
-				port->print(0);
-		}
-	}
-#endif
-
-	return true;
-}
-
 bool Console::cmdParseGrammar(int argc, const char **argv) {
 	DebugPrintf("Parse grammar, in strict GNF:\n");
 
@@ -1325,73 +1025,6 @@
 	return true;
 }
 
-bool Console::cmdVisualState(int argc, const char **argv) {
-	DebugPrintf("State of the current visual widget:\n");
-
-#ifdef INCLUDE_OLDGFX
-	if (_vm->_gamestate->visual)
-		_vm->_gamestate->visual->print(0);
-	else
-		DebugPrintf("The visual widget is uninitialized.\n");
-#endif
-
-	return true;
-}
-
-bool Console::cmdFlushPorts(int argc, const char **argv) {
-#ifdef INCLUDE_OLDGFX
-	_vm->_gamestate->_gui->hideCursor();
-	DebugPrintf("Flushing dynamically allocated ports (for memory profiling)...\n");
-	delete _vm->_gamestate->visual;
-	_vm->_gamestate->gfx_state->gfxResMan->freeAllResources();
-	_vm->_gamestate->visual = NULL;
-#endif
-
-	return true;
-}
-
-bool Console::cmdDynamicViews(int argc, const char **argv) {
-#ifdef INCLUDE_OLDGFX
-	DebugPrintf("List of active dynamic views:\n");
-
-	if (_vm->_gamestate->dyn_views)
-		_vm->_gamestate->dyn_views->print(0);
-	else
-		DebugPrintf("The list is empty.\n");
-#endif
-
-	return true;
-}
-
-bool Console::cmdDroppedViews(int argc, const char **argv) {
-#ifdef INCLUDE_OLDGFX
-	DebugPrintf("List of dropped dynamic views:\n");
-
-	if (_vm->_gamestate->drop_views)
-		_vm->_gamestate->drop_views->print(0);
-	else
-		DebugPrintf("The list is empty.\n");
-#endif
-
-	return true;
-}
-
-bool Console::cmdPriorityBands(int argc, const char **argv) {
-#ifdef INCLUDE_OLDGFX
-	if (argc != 2) {
-		DebugPrintf("Priority bands start at y=%d. They end at y=%d\n", _vm->_gamestate->priority_first, _vm->_gamestate->priority_last);
-		DebugPrintf("Use %s <priority band> to print the start of priority for the specified priority band (0 - 15)\n", argv[0]);
-		return true;
-	}
-
-	int zone = CLIP<int>(atoi(argv[1]), 0, 15);
-
-	DebugPrintf("Zone %x starts at y=%d\n", zone, _find_priority_band(_vm->_gamestate, zone));
-#endif
-
-	return true;
-}
-
 bool Console::cmdPrintSegmentTable(int argc, const char **argv) {
 	DebugPrintf("Segment table:\n");
 
@@ -3145,219 +2778,4 @@
 	return 0;
 }
 
-#define GETRECT(ll, rr, tt, bb) \
-	ll = GET_SELECTOR(pos, ll); \
-	rr = GET_SELECTOR(pos, rr); \
-	tt = GET_SELECTOR(pos, tt); \
-	bb = GET_SELECTOR(pos, bb);
-
-#if 0
-// TODO Re-implement this
-static void viewobjinfo(EngineState *s, HeapPtr pos) {
-	char *signals[16] = {
-		"stop_update",
-		"updated",
-		"no_update",
-		"hidden",
-		"fixed_priority",
-		"always_update",
-		"force_update",
-		"remove",
-		"frozen",
-		"is_extra",
-		"hit_obstacle",
-		"doesnt_turn",
-		"no_cycler",
-		"ignore_horizon",
-		"ignore_actor",
-		"dispose!"
-	};
-
-	int x, y, z, priority;
-	int cel, loop, view, signal;
-	int nsLeft, nsRight, nsBottom, nsTop;
-	int lsLeft, lsRight, lsBottom, lsTop;
-	int brLeft, brRight, brBottom, brTop;
-	int i;
-	int have_rects = 0;
-	Common::Rect nsrect, nsrect_clipped, brrect;
-
-	if (lookup_selector(s->_segMan, pos, s->_kernel->_selectorCache.nsBottom, NULL) == kSelectorVariable) {
-		GETRECT(nsLeft, nsRight, nsBottom, nsTop);
-		GETRECT(lsLeft, lsRight, lsBottom, lsTop);
-		GETRECT(brLeft, brRight, brBottom, brTop);
-		have_rects = 1;
-	}
-
-	GETRECT(view, loop, signal, cel);
-
-	printf("\n-- View information:\ncel %d/%d/%d at ", view, loop, cel);
-
-	x = GET_SELECTOR(pos, x);
-	y = GET_SELECTOR(pos, y);
-	priority = GET_SELECTOR(pos, priority);
-	if (s->_kernel->_selectorCache.z > 0) {
-		z = GET_SELECTOR(pos, z);
-		printf("(%d,%d,%d)\n", x, y, z);
-	} else
-		printf("(%d,%d)\n", x, y);
-
-	if (priority == -1)
-		printf("No priority.\n\n");
-	else
-		printf("Priority = %d (band starts at %d)\n\n", priority, PRIORITY_BAND_FIRST(priority));
-
-	if (have_rects) {
-		printf("nsRect: [%d..%d]x[%d..%d]\n", nsLeft, nsRight, nsTop, nsBottom);
-		printf("lsRect: [%d..%d]x[%d..%d]\n", lsLeft, lsRight, lsTop, lsBottom);
-		printf("brRect: [%d..%d]x[%d..%d]\n", brLeft, brRight, brTop, brBottom);
-	}
-
-	nsrect = get_nsrect(s, pos, 0);
-	nsrect_clipped = get_nsrect(s, pos, 1);
-	//brrect = set_base(s, pos);
-	printf("new nsRect: [%d..%d]x[%d..%d]\n", nsrect.x, nsrect.xend, nsrect.y, nsrect.yend);
-	printf("new clipped nsRect: [%d..%d]x[%d..%d]\n", nsrect_clipped.x, nsrect_clipped.xend, nsrect_clipped.y, nsrect_clipped.yend);
-	printf("new brRect: [%d..%d]x[%d..%d]\n", brrect.x, brrect.xend, brrect.y, brrect.yend);
-	printf("\n signals = %04x:\n", signal);
-
-	for (i = 0; i < 16; i++)
-		if (signal & (1 << i))
-			printf("  %04x: %s\n", 1 << i, signals[i]);
-}
-#endif
-#undef GETRECT
-
-#define GETRECT(ll, rr, tt, bb) \
-	ll = GET_SELECTOR(pos, ll); \
-	rr = GET_SELECTOR(pos, rr); \
-	tt = GET_SELECTOR(pos, tt); \
-	bb = GET_SELECTOR(pos, bb);
-
-#if 0
-// Draws the nsRect and brRect of a dynview object. nsRect is green, brRect is blue.
-// TODO: Re-implement this
-static int c_gfx_draw_viewobj(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
-	HeapPtr pos = (HeapPtr)(cmdParams[0].val);
-	int is_view;
-	int x, y, priority;
-	int nsLeft, nsRight, nsBottom, nsTop;
-	int brLeft, brRight, brBottom, brTop;
-
-	if (!s) {
-		printf("Not in debug state!\n");
-		return 1;
-	}
-
-	if ((pos < 4) || (pos > 0xfff0)) {
-		printf("Invalid address.\n");
-		return 1;
-	}
-
-	if (((int16)READ_LE_UINT16(s->heap + pos + SCRIPT_OBJECT_MAGIC_OFFSET)) != SCRIPT_OBJECT_MAGIC_NUMBER) {
-		printf("Not an object.\n");
-		return 0;
-	}
-
-
-	is_view = (lookup_selector(s->_segMan, pos, s->_kernel->_selectorCache.x, NULL) == kSelectorVariable) &&
-	    (lookup_selector(s->_segMan, pos, s->_kernel->_selectorCache.brLeft, NULL) == kSelectorVariable) &&
-	    (lookup_selector(s->_segMan, pos, s->_kernel->_selectorCache.signal, NULL) == kSelectorVariable) &&
-	    (lookup_selector(s->_segMan, pos, s->_kernel->_selectorCache.nsTop, NULL) == kSelectorVariable);
-
-	if (!is_view) {
-		printf("Not a dynamic View object.\n");
-		return 0;
-	}
-
-	x = GET_SELECTOR(pos, x);
-	y = GET_SELECTOR(pos, y);
-	priority = GET_SELECTOR(pos, priority);
-	GETRECT(brLeft, brRight, brBottom, brTop);
-	GETRECT(nsLeft, nsRight, nsBottom, nsTop);
-	gfxop_set_clip_zone(s->gfx_state, gfx_rect_fullscreen);
-
-	brTop += 10;
-	brBottom += 10;
-	nsTop += 10;
-	nsBottom += 10;
-
-	gfxop_fill_box(s->gfx_state, gfx_rect(nsLeft, nsTop, nsRight - nsLeft + 1, nsBottom - nsTop + 1), s->ega_colors[2]);
-	gfxop_fill_box(s->gfx_state, gfx_rect(brLeft, brTop, brRight - brLeft + 1, brBottom - brTop + 1), s->ega_colors[1]);
-	gfxop_fill_box(s->gfx_state, gfx_rect(x - 1, y - 1, 3, 3), s->ega_colors[0]);
-	gfxop_fill_box(s->gfx_state, gfx_rect(x - 1, y, 3, 1), s->ega_colors[priority]);
-	gfxop_fill_box(s->gfx_state, gfx_rect(x, y - 1, 1, 3), s->ega_colors[priority]);
-	gfxop_update(s->gfx_state);
-
-	return 0;
-}
-#endif
-#undef GETRECT
-
-#if 0
-// Executes one operation skipping over sends
-// TODO Re-implement this
-int c_stepover(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
-	int opcode, opnumber;
-
-	opcode = s->_heap[*p_pc];
-	opnumber = opcode >> 1;
-	if (opnumber == 0x22 /* callb */ || opnumber == 0x23 /* calle */ ||
-	        opnumber == 0x25 /* send */ || opnumber == 0x2a /* self */ || opnumber == 0x2b /* super */) {
-		g_debugState.seeking = kDebugSeekSO;
-		g_debugState.seekLevel = s->_executionStack.size()-1;
-		// Store in g_debugState.seekSpecial the offset of the next command after send
-		switch (opcode) {
-		case 0x46: // calle W
-			g_debugState.seekSpecial = *p_pc + 5;
-			break;
-
-		case 0x44: // callb W
-		case 0x47: // calle B
-		case 0x56: // super W
-			g_debugState.seekSpecial = *p_pc + 4;
-			break;
-
-		case 0x45: // callb B
-		case 0x57: // super B
-		case 0x4A: // send W
-		case 0x54: // self W
-			g_debugState.seekSpecial = *p_pc + 3;
-			break;
-
-		default:
-			g_debugState.seekSpecial = *p_pc + 2;
-		}
-	}
-
-	return 0;
-}
-#endif
-
-#ifdef GFXW_DEBUG_WIDGETS
-extern GfxWidget *debug_widgets[];
-extern int debug_widget_pos;
-
-// If called with no parameters, it shows which widgets are active
-// With parameters, it lists the widget corresponding to the numerical index specified (for each parameter).
-bool Console::cmdPrintWidget(int argc, const char **argv) {
-	if (argc > 1) {
-		for (int i = 0; i < argc; i++) {
-			int widget_nr = atoi(argv[1]);
-
-			DebugPrintf("===== Widget #%d:\n", widget_nr);
-			debug_widgets[widget_nr]->print(0);
-		}
-	} else if (debug_widget_pos > 1) {
-		DebugPrintf("Widgets 0-%d are active\n", debug_widget_pos - 1);
-	} else if (debug_widget_pos == 1) {
-		DebugPrintf("Widget 0 is active\n");
-	} else {
-		DebugPrintf("No widgets are active\n");
-	}
-
-	return true;
-}
-#endif
-
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/console.h
===================================================================
--- scummvm/trunk/engines/sci/console.h	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/console.h	2010-01-05 00:54:53 UTC (rev 47005)
@@ -81,29 +81,11 @@
 	bool cmdExit(int argc, const char **argv);
 	bool cmdListSaves(int argc, const char **argv);
 	// Screen
-	bool cmdSci0Palette(int argc, const char **argv);
-	bool cmdClearScreen(int argc, const char **argv);
-	bool cmdRedrawScreen(int argc, const char **argv);
-	bool cmdFillScreen(int argc, const char **argv);
 	bool cmdShowMap(int argc, const char **argv);
-	bool cmdUpdateZone(int argc, const char **argv);
-	bool cmdPropagateZone(int argc, const char **argv);
-	bool cmdPriorityBands(int argc, const char **argv);
 	// Graphics
 	bool cmdDrawPic(int argc, const char **argv);
-	bool cmdDrawRect(int argc, const char **argv);
-	bool cmdDrawCel(int argc, const char **argv);
-	bool cmdViewInfo(int argc, const char **argv);
 	bool cmdUndither(int argc, const char **argv);
 	bool cmdPlayVideo(int argc, const char **argv);
-	// GUI
-	bool cmdCurrentPort(int argc, const char **argv);
-	bool cmdPrintPort(int argc, const char **argv);
-	bool cmdVisualState(int argc, const char **argv);
-	bool cmdFlushPorts(int argc, const char **argv);
-	bool cmdDynamicViews(int argc, const char **argv);
-	bool cmdDroppedViews(int argc, const char **argv);
-	bool cmdPrintWidget(int argc, const char **argv);
 	// Segments
 	bool cmdPrintSegmentTable(int argc, const char **argv);
 	bool cmdSegmentInfo(int argc, const char **argv);

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -35,10 +35,6 @@
 #include "sci/engine/kernel_types.h"
 #include "sci/engine/message.h"
 #include "sci/gui/gui.h"
-#ifdef INCLUDE_OLDGFX
-#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxVisual
-#include "sci/gfx/menubar.h"
-#endif
 #include "sci/sfx/music.h"
 
 namespace Sci {
@@ -179,133 +175,6 @@
 	return strdup(sierraId.c_str());
 }
 
-#ifdef INCLUDE_OLDGFX
-int _reset_graphics_input(EngineState *s) {
-	Resource *resource;
-	int font_nr;
-	gfx_color_t transparent = { PaletteEntry(), 0, -1, -1, 0 };
-	debug(2, "Initializing graphics");
-
-	if (s->resMan->getViewType() == kViewEga) {
-		for (int i = 0; i < 16; i++) {
-			gfxop_set_color(s->gfx_state, &(s->ega_colors[i]), gfx_sci0_image_colors[sci0_palette][i].r,
-					gfx_sci0_image_colors[sci0_palette][i].g, gfx_sci0_image_colors[sci0_palette][i].b, 0, -1, -1);
-			s->gfx_state->driver->getMode()->palette->makeSystemColor(i, s->ega_colors[i].visual);
-		}
-	} else {
-		// Allocate SCI1 system colors
-		gfx_color_t black = { PaletteEntry(0, 0, 0), 0, 0, 0, GFX_MASK_VISUAL };
-		s->gfx_state->driver->getMode()->palette->makeSystemColor(0, black.visual);
-
-		// Check for Amiga palette file.
-		Common::File file;
-		if (file.open("spal")) {
-			s->gfx_state->gfxResMan->setStaticPalette(gfxr_read_pal1_amiga(file));
-			file.close();
-		} else {
-			resource = s->resMan->findResource(ResourceId(kResourceTypePalette, 999), 1);
-			if (resource) {
-				if (s->resMan->getViewType() != kViewVga11)
-					s->gfx_state->gfxResMan->setStaticPalette(gfxr_read_pal1(999, resource->data, resource->size));
-				else
-					s->gfx_state->gfxResMan->setStaticPalette(gfxr_read_pal11(999, resource->data, resource->size));
-				s->resMan->unlockResource(resource);
-			} else {
-				debug(2, "Couldn't find the default palette!");
-			}
-		}
-	}
-
-	gfxop_fill_box(s->gfx_state, gfx_rect(0, 0, 320, 200), s->ega_colors[0]); // Fill screen black
-	gfxop_update(s->gfx_state);
-
-	s->pic_is_new = 0;
-	s->pic_visible_map = GFX_MASK_NONE; // Other values only make sense for debugging
-	s->dyn_views = NULL; // no DynViews
-	s->drop_views = NULL; // And, consequently, no list for dropped views
-
-	font_nr = -1;
-	do {
-		resource = s->resMan->testResource(ResourceId(kResourceTypeFont, ++font_nr));
-	} while ((!resource) && (font_nr < 65536));
-
-	if (!resource) {
-		debug(2, "No text font was found.");
-		return 1;
-	}
-
-	s->visual = new GfxVisual(s->gfx_state, font_nr);
-
-	s->wm_port = new GfxPort(s->visual, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);
-
-	s->iconbar_port = new GfxPort(s->visual, gfx_rect(0, 0, 320, 200), s->ega_colors[0], transparent);
-	s->iconbar_port->_flags |= GFXW_FLAG_NO_IMPLICIT_SWITCH;
-
-	if (s->resMan->isVGA()) {
-		// This bit sets the foreground and background colors in VGA SCI games
-		gfx_color_t fgcolor;
-		gfx_color_t bgcolor;
-		memset(&fgcolor, 0, sizeof(gfx_color_t));
-		memset(&bgcolor, 0, sizeof(gfx_color_t));
-
-#if 0
-		fgcolor.visual = s->gfx_state->resstate->static_palette[0];
-		fgcolor.mask = GFX_MASK_VISUAL;
-		bgcolor.visual = s->gfx_state->resstate->static_palette[255];
-		bgcolor.mask = GFX_MASK_VISUAL;
-#endif
-		s->titlebar_port = new GfxPort(s->visual, gfx_rect(0, 0, 320, 10), fgcolor, bgcolor);
-	} else {
-		s->titlebar_port = new GfxPort(s->visual, gfx_rect(0, 0, 320, 10), s->ega_colors[0], s->ega_colors[15]);
-	}
-	s->titlebar_port->_color.mask |= GFX_MASK_PRIORITY;
-	s->titlebar_port->_color.priority = 11;
-	s->titlebar_port->_bgcolor.mask |= GFX_MASK_PRIORITY;
-	s->titlebar_port->_bgcolor.priority = 11;
-	s->titlebar_port->_flags |= GFXW_FLAG_NO_IMPLICIT_SWITCH;
-
-	// but this is correct
-	s->picture_port = new GfxPort(s->visual, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);
-
-	s->visual->add((GfxContainer *)s->visual, s->wm_port);
-	s->visual->add((GfxContainer *)s->visual, s->titlebar_port);
-	s->visual->add((GfxContainer *)s->visual, s->picture_port);
-	s->visual->add((GfxContainer *)s->visual, s->iconbar_port);
-	// Add ports to visual
-
-	s->port = s->picture_port; // Currently using the picture port
-
-#if 0
-	s->titlebar_port->_bgcolor.mask |= GFX_MASK_PRIORITY;
-	s->titlebar_port->_bgcolor.priority = 11; // Standard priority for the titlebar port
-#endif
-
-	s->priority_first = 42; // Priority zone 0 ends here
-
-	if (s->usesOldGfxFunctions())
-		s->priority_last = 200;
-	else
-		s->priority_last = 190;
-
-	return 0;
-}
-
-int game_init_graphics(EngineState *s) {
-	return _reset_graphics_input(s);
-}
-
-static void _free_graphics_input(EngineState *s) {
-	debug(2, "Freeing graphics");
-
-	delete s->visual;
-
-	s->wm_port = s->titlebar_port = s->picture_port = NULL;
-	s->visual = NULL;
-	s->dyn_views = NULL;
-	s->port = NULL;
-}
-#endif
-
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 int game_init_sound(EngineState *s, int sound_flags, SciVersion soundVersion) {
 	if (getSciVersion() > SCI_VERSION_0_LATE)
@@ -358,10 +227,6 @@
 
 	debug(2, "Engine initialized");
 
-#ifdef INCLUDE_OLDGFX
-	s->pic_priority_table = NULL;
-#endif
-
 	return 0;
 }
 
@@ -401,10 +266,6 @@
 	s->parserIsValid = false; // Invalidate parser
 	s->parser_event = NULL_REG; // Invalidate parser event
 
-#ifdef INCLUDE_OLDGFX
-	if (s->gfx_state && _reset_graphics_input(s))
-		return 1;
-#endif
 	// Initialize menu TODO: Actually this should be another init()
 	s->_gui->menuReset();
 
@@ -430,10 +291,6 @@
 
 	debug(2, " \"%s\" at %04x:%04x", s->_gameId.c_str(), PRINT_REG(s->_gameObj));
 
-#ifdef INCLUDE_OLDGFX
-	s->_menubar = new Menubar(); // Create menu bar
-#endif
-
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 	if (s->sfx_init_flags & SFX_STATE_FLAG_NOSOUND)
 		game_init_sound(s, 0, s->detectDoSoundType());
@@ -472,12 +329,6 @@
 
 	// TODO Free scripts here
 
-#ifdef INCLUDE_OLDGFX
-	delete s->_menubar;
-
-	_free_graphics_input(s);
-#endif
-
 	// Close all opened file handles
 	s->_fileHandles.clear();
 	s->_fileHandles.resize(5);

Modified: scummvm/trunk/engines/sci/engine/kevent.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kevent.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/kevent.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -26,7 +26,6 @@
 #include "sci/sci.h"
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
-#include "sci/gfx/operations.h"
 #include "sci/console.h"
 #include "sci/debug.h"	// for g_debug_simulated_key
 #include "sci/event.h"

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -33,7 +33,6 @@
 #include "sci/video/seq_decoder.h"
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
-#include "sci/gfx/operations.h"
 #include "sci/gui/gui.h"
 #include "sci/gui/gui_animate.h"
 #include "sci/gui/gui_cursor.h"
@@ -295,9 +294,6 @@
 		warning("Unsupported kGraph() operation %04x", argv[0].toSint16());
 	}
 
-#ifdef INCLUDE_OLDGFX
-	gfxop_update(s->gfx_state);
-#endif
 	return s->r_acc;
 }
 

Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -27,11 +27,6 @@
 #include "sci/resource.h"
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
-#ifdef INCLUDE_OLDGFX
-#include "sci/gfx/gfx_gui.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxVisual
-#include "sci/gfx/menubar.h"
-#endif
 #include "sci/gui/gui.h"
 #include "sci/gui/gui_cursor.h"
 

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -168,10 +168,6 @@
 
 	victim_obj->markAsFreed();
 	
-#ifdef INCLUDE_OLDGFX
-	_k_view_list_mark_free(s, victim_addr); // Free on view list, if neccessary
-#endif
-
 	return s->r_acc;
 }
 

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -31,10 +31,6 @@
 
 #include "sci/sci.h"
 #include "sci/event.h"
-#ifdef INCLUDE_OLDGFX
-#include "sci/gfx/menubar.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxContainer
-#endif
 
 #include "sci/engine/state.h"
 #include "sci/engine/message.h"
@@ -217,39 +213,6 @@
 	sync_reg_t(s, obj);
 }
 
-
-#ifdef INCLUDE_OLDGFX
-
-void MenuItem::saveLoadWithSerializer(Common::Serializer &s) {
-	s.syncAsSint32LE(_type);
-	s.syncString(_keytext);
-	s.skip(4, VER(9), VER(9)); 	// OBSOLETE: Used to be keytext_size
-
-	s.syncAsSint32LE(_flags);
-	s.syncBytes(_said, MENU_SAID_SPEC_SIZE);
-	sync_reg_t(s, _saidPos);
-	s.syncString(_text);
-	sync_reg_t(s, _textPos);
-	s.syncAsSint32LE(_modifiers);
-	s.syncAsSint32LE(_key);
-	s.syncAsSint32LE(_enabled);
-	s.syncAsSint32LE(_tag);
-}
-
-void Menu::saveLoadWithSerializer(Common::Serializer &s) {
-	s.syncString(_title);
-	s.syncAsSint32LE(_titleWidth);
-	s.syncAsSint32LE(_width);
-
-	syncArray<MenuItem>(s, _items);
-}
-
-void Menubar::saveLoadWithSerializer(Common::Serializer &s) {
-	syncArray<Menu>(s, _menus);
-}
-
-#endif
-
 void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
 	s.skip(4, VER(9), VER(9));	// OBSOLETE: Used to be reserved_id
 	s.syncAsSint32LE(_exportsAreWide);
@@ -360,16 +323,6 @@
 	s.syncString(tmp);			// OBSOLETE: Used to be game_version
 	s.skip(4, VER(9), VER(9));	// OBSOLETE: Used to be version
 
-#ifdef INCLUDE_OLDGFX
-	if (s.isLoading()) {
-		//free(menubar);
-		_menubar = new Menubar();
-	} else
-		assert(_menubar);
-	_menubar->saveLoadWithSerializer(s);
-#else
-	// FIXME: This code goes out of sync when loading. Find out why
-
 	// OBSOLETE: Saved menus. Skip all of the saved data
 	if (s.getVersion() < 14) {
 		int totalMenus = 0;
@@ -398,7 +351,6 @@
 			}
 		}
 	}
-#endif
 
 	s.skip(4, VER(12), VER(12));	// obsolete: used to be status_bar_foreground
 	s.skip(4, VER(12), VER(12));	// obsolete: used to be status_bar_background
@@ -416,11 +368,6 @@
 		s.syncAsSint16LE(picPortRect.right);
 		s.syncAsSint16LE(picPortTop);
 		s.syncAsSint16LE(picPortLeft);
-
-		#ifndef USE_OLDGFX
-			if (s.isLoading())
-				_gui->setPortPic(picPortRect, picPortTop, picPortLeft, true);
-		#endif
 	}
 
 	sync_SegManagerPtr(s, resMan, _segMan);
@@ -825,9 +772,6 @@
 		}
 	}
 }
-#ifdef INCLUDE_OLDGFX
-int _reset_graphics_input(EngineState *s);
-#endif
 
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 static void reconstruct_sounds(EngineState *s) {
@@ -912,7 +856,6 @@
 	retval->_event = new SciEvent();
 
 	// Copy some old data
-	retval->gfx_state = s->gfx_state;
 	retval->_soundCmd = s->_soundCmd;
 
 	retval->saveLoadWithSerializer(ser);	// FIXME: Error handling?
@@ -925,10 +868,6 @@
 	retval->execution_stack_base = 0;
 
 	// Now copy all current state information
-#ifdef INCLUDE_OLDGFX
-	// Graphics and input state:
-	retval->old_screen = 0;
-#endif
 
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 	temp = retval->_sound._songlib;
@@ -947,9 +886,6 @@
 	retval->gc_countdown = GC_INTERVAL - 1;
 	retval->sys_strings_segment = retval->_segMan->findSegmentByType(SEG_TYPE_SYS_STRINGS);
 	retval->sys_strings = (SystemStrings *)GET_SEGMENT(*retval->_segMan, retval->sys_strings_segment, SEG_TYPE_SYS_STRINGS);
-#ifdef INCLUDE_OLDGFX
-	_reset_graphics_input(retval);
-#endif
 
 	// Time state:
 	retval->last_wait_time = g_system->getMillis();
@@ -964,9 +900,6 @@
 	retval->bp_list = s->bp_list;
 
 	retval->successor = NULL;
-#ifdef INCLUDE_OLDGFX
-	retval->pic_priority_table = (int *)(retval->gfx_state->pic) ? retval->gfx_state->pic->priorityTable : NULL;
-#endif
 	retval->_gameId = s->_gameId;
 
 #ifdef USE_OLD_MUSIC_FUNCTIONS

Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/state.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -35,37 +35,10 @@
 EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc, SegManager *segMan, SciGui *gui, AudioPlayer *audio)
 : resMan(res), _kernel(kernel), _voc(voc), _segMan(segMan), _gui(gui), _audio(audio), _dirseeker(this) {
 
-	gfx_state = 0;
-
 	sfx_init_flags = 0;
 
 	restarting_flags = 0;
 
-#ifdef INCLUDE_OLDGFX
-	pic_priority_table = 0;
-	pic_not_valid = 0;
-	pic_is_new = 0;
-	old_screen = 0;
-	port = 0;
-	memset(ega_colors, 0, sizeof(ega_colors));
-	visual = 0;
-	titlebar_port = 0;
-	wm_port = 0;
-	picture_port = 0;
-	iconbar_port = 0;
-
-	pic_visible_map = GFX_MASK_NONE;
-	pic_animate = 0;
-
-	dyn_views = 0;
-	drop_views = 0;
-
-	priority_first = 0;
-	priority_last = 0;
-
-	_menubar = 0;
-#endif
-
 	last_wait_time = 0;
 
 	_fileHandles.resize(5);

Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/state.h	2010-01-05 00:54:53 UTC (rev 47005)
@@ -41,7 +41,6 @@
 #include "sci/engine/kernel.h"	// for kfunct_sig_pair_t
 #include "sci/engine/script.h"
 #include "sci/engine/seg_manager.h"
-#include "sci/gfx/gfx_system.h"
 #include "sci/sfx/audio.h"
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 #include "sci/sfx/iterator/core.h"
@@ -148,8 +147,6 @@
 
 	SciEvent *_event; // Event handling
 
-	GfxState *gfx_state; /**< Graphics state and driver */
-
 	AudioPlayer *_audio;
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 	SfxState _sound; /**< sound subsystem */
@@ -159,35 +156,6 @@
 
 	byte restarting_flags; /**< Flags used for restarting */
 
-#ifdef INCLUDE_OLDGFX
-	int *pic_priority_table; /**< 16 entries with priorities or NULL if not present */
-	byte pic_not_valid; /**< Is 0 if the background picture is "valid" */
-	byte pic_is_new; /**< New pic was loaded or port was opened */
-	gfx_pixmap_t *old_screen; /**< Old screen content: Stored during kDrawPic() for kAnimate() */
-
-	GfxPort *port; /**< The currently active port */
-
-	gfx_color_t ega_colors[16]; /**< The 16 EGA colors- for SCI0(1) */
-
-	GfxVisual *visual; /**< A visual widget, containing all ports */
-
-	GfxPort *titlebar_port; /**< Title bar viewport (0,0,9,319) */
-	GfxPort *wm_port; /**< window manager viewport and designated &heap[0] view (10,0,199,319) */
-	GfxPort *picture_port; /**< The background picture viewport (10,0,199,319) */
-	GfxPort *iconbar_port; /**< Full-screen port used for non-clipped icon bar draw in SCI1 */
-
-	gfx_map_mask_t pic_visible_map; /**< The number of the map to display in update commands */
-	int pic_animate; /**< The animation used by Animate() to display the picture */
-
-	GfxList *dyn_views; /**< Pointers to pic and dynamic view lists */
-	GfxList *drop_views; /**< A list Animate() can dump dropped dynviews into */
-
-	int priority_first; /**< The line where priority zone 0 ends */
-	int priority_last; /**< The line where the highest priority zone starts */
-
-	Menubar *_menubar; /**< The menu bar */
-#endif
-
 	uint32 game_start_time; /**< The time at which the interpreter was started */
 	uint32 last_wait_time; /**< The last time the game invoked Wait() */
 
@@ -310,24 +278,6 @@
 	bool _usesCdTrack;
 };
 
-#ifdef INCLUDE_OLDGFX
-
-/**
- * Retrieves the gfx_pixmap_color_t associated with a game color index.
- * @param s			game state
- * @param color		color to look up
- * @return the requested color
- */
-PaletteEntry get_pic_color(EngineState *s, int color);
-
-/* Functions used in gui32\gui32.cpp */
-reg_t graph_save_box(EngineState *s, rect_t area);
-void graph_restore_box(EngineState *s, reg_t handle);
-void assert_primary_widget_lists(EngineState *s);
-void reparentize_primary_widget_lists(EngineState *s, GfxPort *newport);
-
-#endif
-
 } // End of namespace Sci
 
 #endif // SCI_INCLUDE_ENGINE_H

Modified: scummvm/trunk/engines/sci/engine/vm.h
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.h	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/engine/vm.h	2010-01-05 00:54:53 UTC (rev 47005)
@@ -480,17 +480,6 @@
  */
 int game_init(EngineState *s);
 
-#ifdef INCLUDE_OLDGFX
-/**
- * Initializes the graphics part of an SCI game
- * This function may only be called if game_init() did not initialize
- * the graphics data.
- * @param[in] s	The state to initialize the graphics in
- * @return		0 on success, 1 if an error occured
- */
-int game_init_graphics(EngineState *s);
-#endif
-
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 /**
  * Initializes the sound part of an SCI game

Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/gui/gui.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -43,8 +43,6 @@
 #include "sci/gui/gui_transitions.h"
 #include "sci/gui/gui_view.h"
 
-#include "sci/gfx/operations.h"
-
 namespace Sci {
 
 // for debug purposes
@@ -90,7 +88,6 @@
 
 	_gfx->init(_text);
 	_windowMgr->init(_s->_gameId);
-	_menu->init(_s->gfx_state);
 	initPriorityBands();
 }
 
@@ -329,7 +326,6 @@
 void SciGui::menuReset() {
 	delete _menu;
 	_menu = new SciGuiMenu(_s->_event, _s->_segMan, _gfx, _text, _screen, _cursor);
-	_menu->init(_s->gfx_state);
 }
 
 void SciGui::menuAdd(Common::String title, Common::String content, reg_t contentVmPtr) {

Modified: scummvm/trunk/engines/sci/gui/gui_menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_menu.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/gui/gui_menu.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -30,8 +30,6 @@
 #include "sci/sci.h"
 #include "sci/event.h"
 #include "sci/engine/state.h"
-#include "sci/gfx/operations.h"
-#include "sci/gfx/gfx_state_internal.h"
 #include "sci/gui/gui_helpers.h"
 #include "sci/gui/gui_gfx.h"
 #include "sci/gui/gui_cursor.h"
@@ -60,10 +58,6 @@
 	// TODO: deallocate _list and _itemList
 }
 
-void SciGuiMenu::init(GfxState *gfxstate) {
-	_gfxstate = gfxstate;
-}
-
 void SciGuiMenu::add(Common::String title, Common::String content, reg_t contentVmPtr) {
 	GuiMenuEntry *menuEntry;
 	uint16 itemCount = 0;

Modified: scummvm/trunk/engines/sci/gui/gui_menu.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_menu.h	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/gui/gui_menu.h	2010-01-05 00:54:53 UTC (rev 47005)
@@ -81,7 +81,6 @@
 	SciGuiMenu(SciEvent *event, SegManager *segMan, SciGuiGfx *gfx, SciGuiText *text, SciGuiScreen *screen, SciGuiCursor *cursor);
 	~SciGuiMenu();
 
-	void init(GfxState *gfxstate);
 	void reset();
 	void add(Common::String title, Common::String content, reg_t contentVmPtr);
 	void setAttribute(uint16 menuId, uint16 itemId, uint16 attributeId, reg_t value);
@@ -100,7 +99,6 @@
 	GuiMenuItemEntry *interactiveGetItem(uint16 menuId, uint16 itemId, bool menuChanged);
 
 	SciEvent *_event;
-	GfxState *_gfxstate;
 	SegManager *_segMan;
 	SciGuiGfx *_gfx;
 	SciGuiText *_text;

Modified: scummvm/trunk/engines/sci/module.mk
===================================================================
--- scummvm/trunk/engines/sci/module.mk	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/module.mk	2010-01-05 00:54:53 UTC (rev 47005)
@@ -35,17 +35,6 @@
 	engine/static_selectors.o \
 	engine/state.o \
 	engine/vm.o \
-	gfx/gfx_driver.o \
-	gfx/gfx_gui.o \
-	gfx/gfx_pixmap_scale.o \
-	gfx/gfx_resmgr.o \
-	gfx/gfx_resource.o \
-	gfx/gfx_support.o \
-	gfx/gfx_tools.o \
-	gfx/gfx_widgets.o \
-	gfx/menubar.o \
-	gfx/operations.o \
-	gfx/palette.o \
 	gui/gui.o \
 	gui/gui_animate.o \
 	gui/gui_controls.o \
@@ -61,12 +50,6 @@
 	gui/gui_transitions.o \
 	gui/gui_view.o \
 	gui/gui_windowmgr.o \
-	gui32/gui32.o \
-	gui32/font.o \
-	gui32/res_font.o \
-	gui32/res_pal.o \
-	gui32/res_pic.o \
-	gui32/res_view.o \
 	sfx/audio.o \
 	sfx/midiparser.o \
 	sfx/music.o \

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-01-05 00:54:53 UTC (rev 47005)
@@ -36,11 +36,6 @@
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
 
-#include "sci/gfx/operations.h"	// fog GfxState
-#ifdef INCLUDE_OLDGFX
-#include "sci/gfx/gfx_state_internal.h"	// required for GfxContainer, GfxPort, GfxVisual
-#include "sci/gui32/gui32.h"
-#endif
 #include "sci/sfx/audio.h"
 #include "sci/sfx/soundcmd.h"
 #include "sci/gui/gui.h"
@@ -48,9 +43,6 @@
 #include "sci/gui/gui_cursor.h"
 #include "sci/gui/gui_screen.h"
 
-#include "sci/gfx/gfx_resource.h"
-#include "sci/gfx/gfx_tools.h"
-
 namespace Sci {
 
 class GfxDriver;
@@ -146,15 +138,7 @@
 	if (script_init_engine(_gamestate))
 		return Common::kUnknownError;
 
-#ifdef INCLUDE_OLDGFX
-	#ifndef USE_OLDGFX
-		_gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor);    // new
-	#else
-		_gamestate->_gui = new SciGui32(_gamestate, screen, palette, cursor);  // old
-	#endif
-#else
 	_gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor);
-#endif
 
 	if (game_init(_gamestate)) { /* Initialize */
 		warning("Game initialization failed: Aborting...");
@@ -172,22 +156,10 @@
 
 	_gamestate->_soundCmd = new SoundCommandParser(_resMan, segMan, _audio, soundVersion);
 
-	GfxState gfx_state;
-	_gamestate->gfx_state = &gfx_state;
-
 	// Assign default values to the config manager, in case settings are missing
 	ConfMan.registerDefault("undither", "true");
 	screen->unditherSetState(ConfMan.getBool("undither"));
 
-#ifdef INCLUDE_OLDGFX
-	gfxop_init(&gfx_state, _resMan, screen, palette, 1);
-
-	if (game_init_graphics(_gamestate)) { // Init interpreter graphics
-		warning("Game initialization failed: Error in GFX subsystem. Aborting...");
-		return Common::kUnknownError;
-	}
-#endif
-
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 	if (game_init_sound(_gamestate, 0, soundVersion)) {
 		warning("Game initialization failed: Error in sound subsystem. Aborting...");
@@ -213,10 +185,6 @@
 	delete screen;
 	delete _gamestate;
 
-#ifdef INCLUDE_OLDGFX
-	gfxop_exit(&gfx_state);
-#endif
-
 	return Common::kNoError;
 }
 

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2010-01-05 00:31:49 UTC (rev 47004)
+++ scummvm/trunk/engines/sci/sci.h	2010-01-05 00:54:53 UTC (rev 47005)
@@ -43,8 +43,6 @@
 
 // Uncomment this to include old graphics code
 //#define INCLUDE_OLDGFX
-// Uncomment this if you want to use the old graphics code. INCLUDE_OLDGFX must be defined
-//#define USE_OLDGFX
 // Uncomment this to use old music functions
 //#define USE_OLD_MUSIC_FUNCTIONS
 // Uncomment this to use old pathfinding code


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