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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jun 15 17:44:24 CEST 2010


Revision: 49860
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49860&view=rev
Author:   m_kiewitz
Date:     2010-06-15 15:44:24 +0000 (Tue, 15 Jun 2010)

Log Message:
-----------
SCI: SciGui/SciGui32 gone for good...

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/engine/kernel32.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/kmisc.cpp
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/graphics/cache.h
    scummvm/trunk/engines/sci/graphics/compare.h
    scummvm/trunk/engines/sci/graphics/frameout.h
    scummvm/trunk/engines/sci/graphics/menu.cpp
    scummvm/trunk/engines/sci/graphics/menu.h
    scummvm/trunk/engines/sci/graphics/paint.h
    scummvm/trunk/engines/sci/graphics/paint16.cpp
    scummvm/trunk/engines/sci/graphics/paint16.h
    scummvm/trunk/engines/sci/graphics/paint32.cpp
    scummvm/trunk/engines/sci/graphics/paint32.h
    scummvm/trunk/engines/sci/graphics/portrait.cpp
    scummvm/trunk/engines/sci/graphics/portrait.h
    scummvm/trunk/engines/sci/graphics/robot.cpp
    scummvm/trunk/engines/sci/graphics/robot.h
    scummvm/trunk/engines/sci/graphics/transitions.cpp
    scummvm/trunk/engines/sci/graphics/transitions.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/graphics/gui.cpp
    scummvm/trunk/engines/sci/graphics/gui.h
    scummvm/trunk/engines/sci/graphics/gui32.cpp
    scummvm/trunk/engines/sci/graphics/gui32.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/console.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -43,12 +43,11 @@
 #include "sci/sound/music.h"
 #endif
 #include "sci/sound/drivers/mididriver.h"
-#include "sci/graphics/gui.h"
-#include "sci/graphics/gui32.h"
 #include "sci/graphics/cursor.h"
 #include "sci/graphics/screen.h"
 #include "sci/graphics/paint.h"
 #include "sci/graphics/paint16.h"
+#include "sci/graphics/paint32.h"
 #include "sci/graphics/palette.h"
 
 #include "sci/parser/vocabulary.h"
@@ -1299,7 +1298,11 @@
 
 	uint16 resourceId = atoi(argv[1]);
 
-	_engine->_gui32->drawRobot(resourceId);
+	if (_engine->_gfxPaint32) {
+		_engine->_gfxPaint32->debugDrawRobot(resourceId);
+	} else {
+		DebugPrintf("command not available in non-sci32 games");
+	}
 	return true;
 }
 #endif

Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -30,8 +30,6 @@
 #include "sci/engine/segment.h"
 #include "sci/engine/state.h"
 #include "sci/engine/selector.h"
-#include "sci/graphics/gui.h"
-#include "sci/graphics/gui32.h"
 #include "sci/graphics/frameout.h"
 #include "sci/graphics/screen.h"
 

Modified: scummvm/trunk/engines/sci/engine/kevent.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kevent.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/engine/kevent.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -31,8 +31,6 @@
 #include "sci/console.h"
 #include "sci/debug.h"	// for g_debug_simulated_key
 #include "sci/event.h"
-#include "sci/graphics/gui.h"
-#include "sci/graphics/gui32.h"
 #include "sci/graphics/coordadjuster.h"
 #include "sci/graphics/cursor.h"
 

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -37,8 +37,6 @@
 #include "sci/engine/state.h"
 #include "sci/engine/selector.h"
 #include "sci/engine/kernel.h"
-#include "sci/graphics/gui.h"
-#include "sci/graphics/gui32.h"
 #include "sci/graphics/animate.h"
 #include "sci/graphics/cache.h"
 #include "sci/graphics/compare.h"
@@ -634,7 +632,8 @@
 reg_t kPalVary(EngineState *s, int argc, reg_t *argv) {
 	uint16 operation = argv[0].toUint16();
 
-	if (!g_sci->_gui)
+	// Exit for SCI32 for now
+	if (!g_sci->_gfxPaint16)
 		return s->r_acc;
 
 	switch (operation) {

Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -27,7 +27,6 @@
 #include "sci/resource.h"
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
-#include "sci/graphics/gui.h"
 #include "sci/graphics/cursor.h"
 #include "sci/graphics/menu.h"
 

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -31,7 +31,6 @@
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
 #include "sci/engine/gc.h"
-#include "sci/graphics/gui.h"
 #include "sci/graphics/maciconbar.h"
 
 namespace Sci {

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -39,7 +39,6 @@
 #include "sci/engine/selector.h"
 #include "sci/engine/vm_types.h"
 #include "sci/engine/script.h"	// for SCI_OBJ_EXPORTS and SCI_OBJ_SYNONYMS
-#include "sci/graphics/gui.h"
 #include "sci/graphics/ports.h"
 #include "sci/sound/audio.h"
 #ifdef USE_OLD_MUSIC_FUNCTIONS
@@ -49,10 +48,6 @@
 #include "sci/sound/music.h"
 #endif
 
-#ifdef ENABLE_SCI32
-#include "sci/graphics/gui32.h"
-#endif
-
 #include "gui/message.h"
 
 namespace Sci {

Modified: scummvm/trunk/engines/sci/graphics/cache.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/cache.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/cache.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -26,8 +26,6 @@
 #ifndef SCI_GRAPHICS_CACHE_H
 #define SCI_GRAPHICS_CACHE_H
 
-#include "sci/graphics/gui.h"
-
 #include "common/hashmap.h"
 
 namespace Sci {

Modified: scummvm/trunk/engines/sci/graphics/compare.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/compare.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -26,8 +26,6 @@
 #ifndef SCI_GRAPHICS_GFX_H
 #define SCI_GRAPHICS_GFX_H
 
-#include "sci/graphics/gui.h"
-
 #include "common/hashmap.h"
 
 namespace Sci {

Modified: scummvm/trunk/engines/sci/graphics/frameout.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/frameout.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/frameout.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -44,7 +44,10 @@
 typedef Common::List<FrameoutEntry *> FrameoutList;
 
 class GfxCache;
+class GfxCoordAdjuster32;
 class GfxPaint32;
+class GfxPalette;
+class GfxScreen;
 /**
  * Frameout class, kFrameout and relevant functions for SCI32 games
  */

Deleted: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -1,89 +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 "common/timer.h"
-#include "common/util.h"
-
-#include "sci/sci.h"
-#include "sci/debug.h"	// for g_debug_sleeptime_factor
-#include "sci/event.h"
-#include "sci/engine/state.h"
-#include "sci/engine/selector.h"
-#include "sci/graphics/gui.h"
-#include "sci/graphics/screen.h"
-#include "sci/graphics/palette.h"
-#include "sci/graphics/cursor.h"
-#include "sci/graphics/ports.h"
-#include "sci/graphics/paint16.h"
-#include "sci/graphics/cache.h"
-#include "sci/graphics/compare.h"
-#include "sci/graphics/coordadjuster.h"
-#include "sci/graphics/animate.h"
-#include "sci/graphics/controls.h"
-#include "sci/graphics/menu.h"
-#include "sci/graphics/text16.h"
-#include "sci/graphics/transitions.h"
-#include "sci/graphics/view.h"
-#include "sci/sound/audio.h"
-
-namespace Sci {
-
-SciGui::SciGui(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio)
-	: _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor), _ports(ports), _audio(audio) {
-
-	// FIXME/TODO: If SciGui inits all the stuff below, then it should *own* it,
-	// not SciEngine. Conversely, if we want SciEngine to own this stuff,
-	// then it should init it!
-	_coordAdjuster = new GfxCoordAdjuster16(_ports);
-	g_sci->_gfxCoordAdjuster = _coordAdjuster;
-	_cursor->init(_coordAdjuster, g_sci->getEventManager());
-	_compare = new GfxCompare(_s->_segMan, g_sci->getKernel(), _cache, _screen, _coordAdjuster);
-	g_sci->_gfxCompare = _compare;
-	_transitions = new GfxTransitions(this, _screen, _palette, g_sci->getResMan()->isVGA());
-	_paint16 = new GfxPaint16(g_sci->getResMan(), _s->_segMan, g_sci->getKernel(), this, _cache, _ports, _coordAdjuster, _screen, _palette, _transitions, _audio);
-	g_sci->_gfxPaint = _paint16;
-	g_sci->_gfxPaint16 = _paint16;
-	_animate = new GfxAnimate(_s, _cache, _ports, _paint16, _screen, _palette, _cursor, _transitions);
-	g_sci->_gfxAnimate = _animate;
-	_text16 = new GfxText16(g_sci->getResMan(), _cache, _ports, _paint16, _screen);
-	g_sci->_gfxText16 = _text16;
-	_controls = new GfxControls(_s->_segMan, _ports, _paint16, _text16, _screen);
-	g_sci->_gfxControls = _controls;
-	_menu = new GfxMenu(g_sci->getEventManager(), _s->_segMan, this, _ports, _paint16, _text16, _screen, _cursor);
-	g_sci->_gfxMenu = _menu;
-}
-
-SciGui::~SciGui() {
-	delete _menu;
-	delete _controls;
-	delete _text16;
-	delete _animate;
-	delete _paint16;
-	delete _transitions;
-	delete _compare;
-	delete _coordAdjuster;
-}
-
-} // End of namespace Sci

Deleted: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/gui.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -1,76 +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_GRAPHICS_GUI_H
-#define SCI_GRAPHICS_GUI_H
-
-#include "sci/graphics/helpers.h"
-
-namespace Sci {
-
-class GfxScreen;
-class GfxPalette;
-class GfxCursor;
-class GfxCache;
-class GfxCompare;
-class GfxCoordAdjuster16;
-class GfxPorts;
-class GfxPaint16;
-class GfxAnimate;
-class GfxControls;
-class GfxMenu;
-class GfxText16;
-class GfxTransitions;
-
-class SciGui {
-public:
-	SciGui(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio);
-	virtual ~SciGui();
-
-protected:
-	GfxCursor *_cursor;
-	EngineState *_s;
-	GfxScreen *_screen;
-	GfxPalette *_palette;
-	GfxCache *_cache;
-	GfxCoordAdjuster16 *_coordAdjuster;
-	GfxCompare *_compare;
-	GfxPorts *_ports;
-	GfxPaint16 *_paint16;
-
-private:
-	AudioPlayer *_audio;
-	GfxAnimate *_animate;
-	GfxControls *_controls;
-	GfxMenu *_menu;
-	GfxText16 *_text16;
-	GfxTransitions *_transitions;
-
-	bool _usesOldGfxFunctions;
-};
-
-} // End of namespace Sci
-
-#endif

Deleted: scummvm/trunk/engines/sci/graphics/gui32.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui32.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/gui32.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -1,75 +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 "common/timer.h"
-#include "common/util.h"
-
-#include "sci/sci.h"
-#include "sci/event.h"
-#include "sci/engine/state.h"
-#include "sci/engine/selector.h"
-#include "sci/graphics/gui32.h"
-#include "sci/graphics/screen.h"
-#include "sci/graphics/palette.h"
-#include "sci/graphics/cursor.h"
-#include "sci/graphics/cache.h"
-#include "sci/graphics/compare.h"
-#include "sci/graphics/coordadjuster.h"
-#include "sci/graphics/frameout.h"
-#include "sci/graphics/paint32.h"
-#include "sci/graphics/picture.h"
-#include "sci/graphics/robot.h"
-#include "sci/graphics/view.h"
-
-namespace Sci {
-
-SciGui32::SciGui32(SegManager *segMan, EventManager *event, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor)
-	: _screen(screen), _palette(palette), _cache(cache), _cursor(cursor) {
-
-	_coordAdjuster = new GfxCoordAdjuster32(segMan);
-	g_sci->_gfxCoordAdjuster = _coordAdjuster;
-	_cursor->init(_coordAdjuster, event);
-	_compare = new GfxCompare(segMan, g_sci->getKernel(), _cache, _screen, _coordAdjuster);
-	g_sci->_gfxCompare = _compare;
-	_paint32 = new GfxPaint32(g_sci->getResMan(), segMan, g_sci->getKernel(), _coordAdjuster, _cache, _screen, _palette);
-	g_sci->_gfxPaint = _paint32;
-	_frameout = new GfxFrameout(segMan, g_sci->getResMan(), _coordAdjuster, _cache, _screen, _palette, _paint32);
-	g_sci->_gfxFrameout = _frameout;
-}
-
-SciGui32::~SciGui32() {
-	delete _frameout;
-	delete _paint32;
-	delete _compare;
-	delete _coordAdjuster;
-}
-
-void SciGui32::drawRobot(GuiResourceId robotId) {
-	Robot *test = new Robot(g_sci->getResMan(), _screen, robotId);
-	test->draw();
-	delete test;
-}
-
-} // End of namespace Sci

Deleted: scummvm/trunk/engines/sci/graphics/gui32.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui32.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/gui32.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -1,64 +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_GRAPHICS_GUI32_H
-#define SCI_GRAPHICS_GUI32_H
-
-#include "sci/graphics/helpers.h"
-
-namespace Sci {
-
-class GfxCursor;
-class GfxScreen;
-class GfxPalette;
-class GfxCache;
-class GfxCoordAdjuster32;
-class GfxCompare;
-class GfxFrameout;
-class GfxPaint32;
-
-class SciGui32 {
-public:
-	SciGui32(SegManager *segMan, EventManager *event, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor);
-	~SciGui32();
-
-	void drawRobot(GuiResourceId robotId);
-
-protected:
-	GfxCursor *_cursor;
-	GfxScreen *_screen;
-	GfxPalette *_palette;
-	GfxCache *_cache;
-	GfxCoordAdjuster32 *_coordAdjuster;
-	GfxCompare *_compare;
-	GfxFrameout *_frameout;
-	GfxPaint32 *_paint32;
-
-private:
-};
-
-} // End of namespace Sci
-
-#endif

Modified: scummvm/trunk/engines/sci/graphics/menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/menu.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -31,7 +31,6 @@
 #include "sci/event.h"
 #include "sci/engine/state.h"
 #include "sci/engine/selector.h"
-#include "sci/graphics/gui.h"
 #include "sci/graphics/ports.h"
 #include "sci/graphics/paint16.h"
 #include "sci/graphics/animate.h"
@@ -43,8 +42,8 @@
 
 namespace Sci {
 
-GfxMenu::GfxMenu(EventManager *event, SegManager *segMan, SciGui *gui, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, GfxCursor *cursor)
-	: _event(event), _segMan(segMan), _gui(gui), _ports(ports), _paint16(paint16), _text16(text16), _screen(screen), _cursor(cursor) {
+GfxMenu::GfxMenu(EventManager *event, SegManager *segMan, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, GfxCursor *cursor)
+	: _event(event), _segMan(segMan), _ports(ports), _paint16(paint16), _text16(text16), _screen(screen), _cursor(cursor) {
 
 	_menuSaveHandle = NULL_REG;
 	_barSaveHandle = NULL_REG;

Modified: scummvm/trunk/engines/sci/graphics/menu.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/menu.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -83,7 +83,7 @@
  */
 class GfxMenu {
 public:
-	GfxMenu(EventManager *event, SegManager *segMan, SciGui *gui, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, GfxCursor *cursor);
+	GfxMenu(EventManager *event, SegManager *segMan, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, GfxCursor *cursor);
 	~GfxMenu();
 
 	void reset();
@@ -113,7 +113,6 @@
 
 	EventManager *_event;
 	SegManager *_segMan;
-	SciGui *_gui;
 	GfxPorts *_ports;
 	GfxPaint16 *_paint16;
 	GfxText16 *_text16;

Modified: scummvm/trunk/engines/sci/graphics/paint.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/paint.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -26,8 +26,6 @@
 #ifndef SCI_GRAPHICS_PAINT_H
 #define SCI_GRAPHICS_PAINT_H
 
-#include "sci/graphics/gui.h"
-
 #include "common/hashmap.h"
 
 namespace Sci {

Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -48,8 +48,8 @@
 
 namespace Sci {
 
-GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, SciGui *gui, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio)
-	: _resMan(resMan), _segMan(segMan), _kernel(kernel), _gui(gui), _cache(cache), _ports(ports), _coordAdjuster(coordAdjuster), _screen(screen), _palette(palette), _transitions(transitions), _audio(audio) {
+GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio)
+	: _resMan(resMan), _segMan(segMan), _kernel(kernel), _cache(cache), _ports(ports), _coordAdjuster(coordAdjuster), _screen(screen), _palette(palette), _transitions(transitions), _audio(audio) {
 }
 
 GfxPaint16::~GfxPaint16() {
@@ -579,7 +579,7 @@
 }
 
 void GfxPaint16::kernelPortraitShow(Common::String resourceName, Common::Point position, uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq) {
-	Portrait *myPortrait = new Portrait(g_sci->getResMan(), g_sci->getEventManager(), _gui, _screen, _palette, _audio, resourceName);
+	Portrait *myPortrait = new Portrait(g_sci->getResMan(), g_sci->getEventManager(), _screen, _palette, _audio, resourceName);
 	// TODO: cache portraits
 	// adjust given coordinates to curPort (but dont adjust coordinates on upscaledHires_Save_Box and give us hires coordinates
 	//  on kDrawCel, yeah this whole stuff makes sense)

Modified: scummvm/trunk/engines/sci/graphics/paint16.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/paint16.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -26,7 +26,6 @@
 #ifndef SCI_GRAPHICS_PAINT16_H
 #define SCI_GRAPHICS_PAINT16_H
 
-#include "sci/graphics/gui.h"
 #include "sci/graphics/paint.h"
 
 #include "common/hashmap.h"
@@ -45,7 +44,7 @@
  */
 class GfxPaint16 : public GfxPaint {
 public:
-	GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, SciGui *gui, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio);
+	GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio);
 	~GfxPaint16();
 
 	void init(GfxAnimate *animate, GfxText16 *text16);
@@ -100,7 +99,6 @@
 	SegManager *_segMan;
 	Kernel *_kernel;
 	AudioPlayer *_audio;
-	SciGui *_gui;
 	GfxAnimate *_animate;
 	GfxCache *_cache;
 	GfxPorts *_ports;

Modified: scummvm/trunk/engines/sci/graphics/paint32.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint32.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/paint32.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -38,6 +38,7 @@
 #include "sci/graphics/view.h"
 #include "sci/graphics/screen.h"
 #include "sci/graphics/palette.h"
+#include "sci/graphics/robot.h"
 
 namespace Sci {
 
@@ -79,4 +80,10 @@
 	_screen->drawLine(startPoint.x, startPoint.y, endPoint.x, endPoint.y, color, priority, control);
 }
 
+void GfxPaint32::debugDrawRobot(GuiResourceId robotId) {
+	GfxRobot *test = new GfxRobot(g_sci->getResMan(), _screen, robotId);
+	test->draw();
+	delete test;
+}
+
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/graphics/paint32.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint32.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/paint32.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -26,7 +26,6 @@
 #ifndef SCI_GRAPHICS_PAINT32_H
 #define SCI_GRAPHICS_PAINT32_H
 
-#include "sci/graphics/gui.h"
 #include "sci/graphics/paint.h"
 
 #include "common/hashmap.h"
@@ -49,6 +48,8 @@
 	void kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle);
 	void kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control);
 
+	void debugDrawRobot(GuiResourceId robotId);
+
 private:
 	ResourceManager *_resMan;
 	SegManager *_segMan;

Modified: scummvm/trunk/engines/sci/graphics/portrait.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/portrait.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/portrait.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -31,7 +31,6 @@
 #include "sci/sci.h"
 #include "sci/event.h"
 #include "sci/engine/state.h"
-#include "sci/graphics/gui.h"
 #include "sci/graphics/screen.h"
 #include "sci/graphics/palette.h"
 #include "sci/graphics/portrait.h"
@@ -39,8 +38,8 @@
 
 namespace Sci {
 
-Portrait::Portrait(ResourceManager *resMan, EventManager *event, SciGui *gui, GfxScreen *screen, GfxPalette *palette, AudioPlayer *audio, Common::String resourceName)
-	: _resMan(resMan), _event(event), _gui(gui), _screen(screen), _palette(palette), _audio(audio), _resourceName(resourceName) {
+Portrait::Portrait(ResourceManager *resMan, EventManager *event, GfxScreen *screen, GfxPalette *palette, AudioPlayer *audio, Common::String resourceName)
+	: _resMan(resMan), _event(event), _screen(screen), _palette(palette), _audio(audio), _resourceName(resourceName) {
 	init();
 }
 

Modified: scummvm/trunk/engines/sci/graphics/portrait.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/portrait.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/portrait.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -42,7 +42,7 @@
  */
 class Portrait {
 public:
-	Portrait(ResourceManager *resMan, EventManager *event, SciGui *gui, GfxScreen *screen, GfxPalette *palette, AudioPlayer *audio, Common::String resourceName);
+	Portrait(ResourceManager *resMan, EventManager *event, GfxScreen *screen, GfxPalette *palette, AudioPlayer *audio, Common::String resourceName);
 	~Portrait();
 
 	void setupAudio(uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
@@ -57,7 +57,6 @@
 
 	ResourceManager *_resMan;
 	EventManager *_event;
-	SciGui *_gui;
 	GfxPalette *_palette;
 	GfxScreen *_screen;
 	AudioPlayer *_audio;

Modified: scummvm/trunk/engines/sci/graphics/robot.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/robot.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/robot.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -31,17 +31,17 @@
 namespace Sci {
 
 #ifdef ENABLE_SCI32
-Robot::Robot(ResourceManager *resMan, GfxScreen *screen, GuiResourceId resourceId)
+GfxRobot::GfxRobot(ResourceManager *resMan, GfxScreen *screen, GuiResourceId resourceId)
 	: _resMan(resMan), _screen(screen), _resourceId(resourceId) {
 	assert(resourceId != -1);
 	initData(resourceId);
 }
 
-Robot::~Robot() {
+GfxRobot::~GfxRobot() {
 	_resMan->unlockResource(_resource);
 }
 
-void Robot::initData(GuiResourceId resourceId) {
+void GfxRobot::initData(GuiResourceId resourceId) {
 	_resource = _resMan->findResource(ResourceId(kResourceTypeRobot, resourceId), true);
 	if (!_resource) {
 		error("robot resource %d not found", resourceId);
@@ -158,7 +158,7 @@
 
 // TODO: just trying around in here...
 
-void Robot::draw() {
+void GfxRobot::draw() {
 	byte *bitmapData = _resourceData + ROBOT_FILE_STARTOFDATA;
 	int x, y;
 	//int frame;

Modified: scummvm/trunk/engines/sci/graphics/robot.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/robot.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/robot.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -31,10 +31,10 @@
 #define ROBOT_FILE_STARTOFDATA 58
 
 #ifdef ENABLE_SCI32
-class Robot {
+class GfxRobot {
 public:
-	Robot(ResourceManager *resMan, GfxScreen *screen, GuiResourceId resourceId);
-	~Robot();
+	GfxRobot(ResourceManager *resMan, GfxScreen *screen, GuiResourceId resourceId);
+	~GfxRobot();
 
 	void draw();
 

Modified: scummvm/trunk/engines/sci/graphics/transitions.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/transitions.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/transitions.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -31,15 +31,14 @@
 
 #include "sci/sci.h"
 #include "sci/engine/state.h"
-#include "sci/graphics/gui.h"
 #include "sci/graphics/screen.h"
 #include "sci/graphics/palette.h"
 #include "sci/graphics/transitions.h"
 
 namespace Sci {
 
-GfxTransitions::GfxTransitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA)
-	: _gui(gui), _screen(screen), _palette(palette), _isVGA(isVGA) {
+GfxTransitions::GfxTransitions(GfxScreen *screen, GfxPalette *palette, bool isVGA)
+	: _screen(screen), _palette(palette), _isVGA(isVGA) {
 	init();
 }
 

Modified: scummvm/trunk/engines/sci/graphics/transitions.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/transitions.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/graphics/transitions.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -65,7 +65,7 @@
  */
 class GfxTransitions {
 public:
-	GfxTransitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA);
+	GfxTransitions(GfxScreen *screen, GfxPalette *palette, bool isVGA);
 	~GfxTransitions();
 
 	void setup(int16 number, bool blackoutFlag);
@@ -92,7 +92,6 @@
 	void diagonalRollToCenter(bool blackoutFlag);
 	void updateScreenAndWait(int msec);
 
-	SciGui *_gui;
 	GfxScreen *_screen;
 	GfxPalette *_palette;
 

Modified: scummvm/trunk/engines/sci/module.mk
===================================================================
--- scummvm/trunk/engines/sci/module.mk	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/module.mk	2010-06-15 15:44:24 UTC (rev 49860)
@@ -43,7 +43,6 @@
 	graphics/cursor.o \
 	graphics/font.o \
 	graphics/fontsjis.o \
-	graphics/gui.o \
 	graphics/maciconbar.o \
 	graphics/menu.o \
 	graphics/paint.o \
@@ -78,7 +77,6 @@
 MODULE_OBJS += \
 	engine/kernel32.o \
 	graphics/frameout.o \
-	graphics/gui32.o \
 	graphics/paint32.o \
 	graphics/robot.o \
 	video/vmd_decoder.o

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-06-15 15:44:24 UTC (rev 49860)
@@ -44,18 +44,24 @@
 
 #include "sci/sound/audio.h"
 #include "sci/sound/soundcmd.h"
-#include "sci/graphics/gui.h"
+#include "sci/graphics/animate.h"
+#include "sci/graphics/cache.h"
+#include "sci/graphics/compare.h"
+#include "sci/graphics/controls.h"
+#include "sci/graphics/coordadjuster.h"
+#include "sci/graphics/cursor.h"
 #include "sci/graphics/maciconbar.h"
 #include "sci/graphics/menu.h"
 #include "sci/graphics/paint16.h"
+#include "sci/graphics/paint32.h"
 #include "sci/graphics/ports.h"
 #include "sci/graphics/palette.h"
-#include "sci/graphics/cursor.h"
 #include "sci/graphics/screen.h"
-#include "sci/graphics/cache.h"
+#include "sci/graphics/text16.h"
+#include "sci/graphics/transitions.h"
 
 #ifdef ENABLE_SCI32
-#include "sci/graphics/gui32.h"
+#include "sci/graphics/frameout.h"
 #endif
 
 namespace Sci {
@@ -183,9 +189,29 @@
 	if ((getLanguage() == Common::JA_JPN) && (getSciVersion() <= SCI_VERSION_1_1))
 		upscaledHires = GFX_SCREEN_UPSCALED_640x400;
 
+	// Reset all graphics objects
+	_gfxAnimate = 0;
+	_gfxCache = 0;
+	_gfxCompare = 0;
+	_gfxControls = 0;
+	_gfxCoordAdjuster = 0;
+	_gfxCursor = 0;
+	_gfxMacIconBar = 0;
+	_gfxMenu = 0;
+	_gfxPaint = 0;
+	_gfxPaint16 = 0;
+	_gfxPalette = 0;
+	_gfxPorts = 0;
+	_gfxScreen = 0;
+	_gfxText16 = 0;
+	_gfxTransitions = 0;
+#ifdef ENABLE_SCI32
+	_gfxFrameout = 0;
+	_gfxPaint32 = 0;
+#endif
+
 	// Initialize graphics-related parts
 
-	// invokes initGraphics()
 	if (_resMan->detectHires())
 		_gfxScreen = new GfxScreen(_resMan, 640, 480);
 	else
@@ -222,23 +248,30 @@
 
 #ifdef ENABLE_SCI32
 	if (getSciVersion() >= SCI_VERSION_2) {
-		_gfxAnimate = 0;
-		_gfxControls = 0;
-		_gfxMenu = 0;
-		_gfxPaint16 = 0;
-		_gfxPorts = 0;
-		_gfxText16 = 0;
-		_gui = 0;
-		_gui32 = new SciGui32(_gamestate->_segMan, _eventMan, _gfxScreen, _gfxPalette, _gfxCache, _gfxCursor);
+		// SCI32 graphic objects creation
+		_gfxCoordAdjuster = new GfxCoordAdjuster32(segMan);
+		_gfxCursor->init(_gfxCoordAdjuster, _eventMan);
+		_gfxCompare = new GfxCompare(segMan, g_sci->getKernel(), _gfxCache, _gfxScreen, _gfxCoordAdjuster);
+		_gfxPaint32 = new GfxPaint32(g_sci->getResMan(), segMan, g_sci->getKernel(), _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette);
+		_gfxPaint = _gfxPaint32;
+		_gfxFrameout = new GfxFrameout(segMan, g_sci->getResMan(), _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette, _gfxPaint32);
 	} else {
 #endif
+		// SCI0-SCI1.1 graphic objects creation
 		_gfxPorts = new GfxPorts(segMan, _gfxScreen);
-		_gui = new SciGui(_gamestate, _gfxScreen, _gfxPalette, _gfxCache, _gfxCursor, _gfxPorts, _audio);
+		_gfxCoordAdjuster = new GfxCoordAdjuster16(_gfxPorts);
+		_gfxCursor->init(_gfxCoordAdjuster, g_sci->getEventManager());
+		_gfxCompare = new GfxCompare(segMan, g_sci->getKernel(), _gfxCache, _gfxScreen, _gfxCoordAdjuster);
+		_gfxTransitions = new GfxTransitions(_gfxScreen, _gfxPalette, g_sci->getResMan()->isVGA());
+		_gfxPaint16 = new GfxPaint16(g_sci->getResMan(), segMan, g_sci->getKernel(), _gfxCache, _gfxPorts, _gfxCoordAdjuster, _gfxScreen, _gfxPalette, _gfxTransitions, _audio);
+		_gfxPaint = _gfxPaint16;
+		_gfxAnimate = new GfxAnimate(_gamestate, _gfxCache, _gfxPorts, _gfxPaint16, _gfxScreen, _gfxPalette, _gfxCursor, _gfxTransitions);
+		_gfxText16 = new GfxText16(g_sci->getResMan(), _gfxCache, _gfxPorts, _gfxPaint16, _gfxScreen);
+		_gfxControls = new GfxControls(segMan, _gfxPorts, _gfxPaint16, _gfxText16, _gfxScreen);
+		_gfxMenu = new GfxMenu(g_sci->getEventManager(), segMan, _gfxPorts, _gfxPaint16, _gfxText16, _gfxScreen, _gfxCursor);
+
+		_gfxMenu->reset();
 #ifdef ENABLE_SCI32
-		_gui32 = 0;
-		_gfxFrameout = 0;
-
-		g_sci->_gfxMenu->reset();
 	}
 #endif
 		
@@ -272,15 +305,23 @@
 	ConfMan.flushToDisk();
 
 	delete _gamestate->_soundCmd;
-	delete _gui;
 #ifdef ENABLE_SCI32
-	delete _gui32;
+	delete _gfxFrameout;
 #endif
+	delete _gfxMenu;
+	delete _gfxControls;
+	delete _gfxText16;
+	delete _gfxAnimate;
+	delete _gfxPaint;
+	delete _gfxTransitions;
+	delete _gfxCompare;
+	delete _gfxCoordAdjuster;
 	delete _gfxPorts;
 	delete _gfxCache;
 	delete _gfxPalette;
 	delete _gfxCursor;
 	delete _gfxScreen;
+
 	delete _eventMan;
 	delete segMan;
 	delete _gamestate;

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2010-06-15 15:39:59 UTC (rev 49859)
+++ scummvm/trunk/engines/sci/sci.h	2010-06-15 15:44:24 UTC (rev 49860)
@@ -60,15 +60,16 @@
 class GfxControls;
 class GfxCoordAdjuster;
 class GfxCursor;
+class GfxMacIconBar;
 class GfxMenu;
 class GfxPaint;
 class GfxPaint16;
+class GfxPaint32;
 class GfxPalette;
 class GfxPorts;
 class GfxScreen;
 class GfxText16;
-class SciGui;
-class GfxMacIconBar;
+class GfxTransitions;
 
 #ifdef ENABLE_SCI32
 class SciGui32;
@@ -207,14 +208,14 @@
 	GfxPalette *_gfxPalette;
 	GfxPaint *_gfxPaint;
 	GfxPaint16 *_gfxPaint16; // Painting in 16-bit gfx
+	GfxPaint32 *_gfxPaint32; // Painting in 32-bit gfx
 	GfxPorts *_gfxPorts; // Port managment for 16-bit gfx
 	GfxScreen *_gfxScreen;
 	GfxText16 *_gfxText16;
-	SciGui *_gui; /* Currently active Gui */
+	GfxTransitions *_gfxTransitions; // transitions between screens for 16-bit gfx
 	GfxMacIconBar *_gfxMacIconBar; // Mac Icon Bar manager
 
 #ifdef ENABLE_SCI32
-	SciGui32 *_gui32; // GUI for SCI32 games
 	GfxFrameout *_gfxFrameout; // kFrameout and the like for 32-bit gfx
 #endif
 


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