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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Feb 23 23:41:37 CET 2010


Revision: 48117
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48117&view=rev
Author:   fingolfin
Date:     2010-02-23 22:41:20 +0000 (Tue, 23 Feb 2010)

Log Message:
-----------
SCI: Stop storing EngineState in SciGui32

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/graphics/gui32.cpp
    scummvm/trunk/engines/sci/graphics/gui32.h
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-02-23 21:01:05 UTC (rev 48116)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-02-23 22:41:20 UTC (rev 48117)
@@ -1014,7 +1014,6 @@
 
 #ifdef ENABLE_SCI32
 	if (g_sci->_gui32) {
-		g_sci->_gui32->resetEngineState(retval);
 		g_sci->_gui32->init();
 	} else {
 #endif

Modified: scummvm/trunk/engines/sci/graphics/gui32.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui32.cpp	2010-02-23 21:01:05 UTC (rev 48116)
+++ scummvm/trunk/engines/sci/graphics/gui32.cpp	2010-02-23 22:41:20 UTC (rev 48117)
@@ -46,17 +46,17 @@
 
 namespace Sci {
 
-SciGui32::SciGui32(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor)
-	: _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor) {
+SciGui32::SciGui32(SegManager *segMan, SciEvent *event, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor)
+	: _screen(screen), _palette(palette), _cache(cache), _cursor(cursor) {
 
-	_coordAdjuster = new GfxCoordAdjuster32(_s->_segMan);
+	_coordAdjuster = new GfxCoordAdjuster32(segMan);
 	g_sci->_gfxCoordAdjuster = _coordAdjuster;
-	_cursor->init(_coordAdjuster, _s->_event);
-	_compare = new GfxCompare(_s->_segMan, g_sci->getKernel(), _cache, _screen, _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(), _s->_segMan, g_sci->getKernel(), _coordAdjuster, _cache, _screen, _palette);
+	_paint32 = new GfxPaint32(g_sci->getResMan(), segMan, g_sci->getKernel(), _coordAdjuster, _cache, _screen, _palette);
 	g_sci->_gfxPaint = _paint32;
-	_frameout = new GfxFrameout(_s->_segMan, g_sci->getResMan(), _coordAdjuster, _cache, _screen, _palette, _paint32);
+	_frameout = new GfxFrameout(segMan, g_sci->getResMan(), _coordAdjuster, _cache, _screen, _palette, _paint32);
 	g_sci->_gfxFrameout = _frameout;
 }
 
@@ -67,10 +67,6 @@
 	delete _coordAdjuster;
 }
 
-void SciGui32::resetEngineState(EngineState *s) {
-	_s = s;
-}
-
 void SciGui32::init() {
 }
 

Modified: scummvm/trunk/engines/sci/graphics/gui32.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui32.h	2010-02-23 21:01:05 UTC (rev 48116)
+++ scummvm/trunk/engines/sci/graphics/gui32.h	2010-02-23 22:41:20 UTC (rev 48117)
@@ -41,7 +41,7 @@
 
 class SciGui32 {
 public:
-	SciGui32(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor);
+	SciGui32(SegManager *segMan, SciEvent *event, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor);
 	~SciGui32();
 
 	void init();
@@ -50,12 +50,8 @@
 
 	void drawRobot(GuiResourceId robotId);
 
-	// FIXME: Don't store EngineState
-	void resetEngineState(EngineState *s);
-
 protected:
 	GfxCursor *_cursor;
-	EngineState *_s;
 	GfxScreen *_screen;
 	GfxPalette *_palette;
 	GfxCache *_cache;

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-02-23 21:01:05 UTC (rev 48116)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-02-23 22:41:20 UTC (rev 48117)
@@ -194,7 +194,7 @@
 		_gfxPaint16 = 0;
 		_gfxPorts = 0;
 		_gui = 0;
-		_gui32 = new SciGui32(_gamestate, screen, palette, cache, cursor);
+		_gui32 = new SciGui32(_gamestate->_segMan, _gamestate->_event, screen, palette, cache, cursor);
 	} else {
 #endif
 		_gfxPorts = new GfxPorts(segMan, screen);


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