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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Mon May 24 19:45:00 CEST 2010


Revision: 49198
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49198&view=rev
Author:   m_kiewitz
Date:     2010-05-24 17:45:00 +0000 (Mon, 24 May 2010)

Log Message:
-----------
SCI: leave console open for pic_visualize/undither commands - also don't use SciGui class for undither anymore

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/graphics/gui.cpp
    scummvm/trunk/engines/sci/graphics/gui.h
    scummvm/trunk/engines/sci/graphics/paint16.cpp
    scummvm/trunk/engines/sci/graphics/paint16.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-05-24 17:43:55 UTC (rev 49197)
+++ scummvm/trunk/engines/sci/console.cpp	2010-05-24 17:45:00 UTC (rev 49198)
@@ -47,6 +47,7 @@
 #include "sci/graphics/cursor.h"
 #include "sci/graphics/screen.h"
 #include "sci/graphics/paint.h"
+#include "sci/graphics/paint16.h"
 #include "sci/graphics/palette.h"
 
 #include "sci/parser/vocabulary.h"
@@ -1112,7 +1113,11 @@
 
 	bool flag = atoi(argv[1]) ? true : false;
 	_engine->_gfxScreen->debugUnditherSetState(flag);
-	return false;
+	if (flag)
+		DebugPrintf("undithering ENABLED\n");
+	else
+		DebugPrintf("undithering DISABLED\n");
+	return true;
 }
 
 bool Console::cmdPicVisualize(int argc, const char **argv) {
@@ -1124,7 +1129,16 @@
 
 	bool state = atoi(argv[1]) ? true : false;
 
-	return _engine->_gui->debugEGAdrawingVisualize(state);
+	if (_engine->_resMan->getViewType() == kViewEga) {
+		_engine->_gfxPaint16->debugSetEGAdrawingVisualize(state);
+		if (state)
+			DebugPrintf("picture visualization ENABLED\n");
+		else
+			DebugPrintf("picture visualization DISABLED\n");
+	} else {
+		DebugPrintf("picture visualization only available for EGA games\n");
+	}
+	return true;
 }
 
 bool Console::cmdPlayVideo(int argc, const char **argv) {

Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp	2010-05-24 17:43:55 UTC (rev 49197)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp	2010-05-24 17:45:00 UTC (rev 49198)
@@ -136,9 +136,4 @@
 void SciGui::portraitUnload(uint16 portraitId) {
 }
 
-bool SciGui::debugEGAdrawingVisualize(bool state) {
-	_paint16->setEGAdrawingVisualize(state);
-	return false;
-}
-
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h	2010-05-24 17:43:55 UTC (rev 49197)
+++ scummvm/trunk/engines/sci/graphics/gui.h	2010-05-24 17:45:00 UTC (rev 49198)
@@ -61,8 +61,6 @@
 	virtual void portraitShow(Common::String resourceName, Common::Point position, uint16 resourceNum, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
 	virtual void portraitUnload(uint16 portraitId);
 
-	virtual bool debugEGAdrawingVisualize(bool state);
-
 	// FIXME: Don't store EngineState
 	virtual void resetEngineState(EngineState *s);
 

Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-05-24 17:43:55 UTC (rev 49197)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-05-24 17:45:00 UTC (rev 49198)
@@ -61,7 +61,7 @@
 	_EGAdrawingVisualize = false;
 }
 
-void GfxPaint16::setEGAdrawingVisualize(bool state) {
+void GfxPaint16::debugSetEGAdrawingVisualize(bool state) {
 	_EGAdrawingVisualize = state;
 }
 

Modified: scummvm/trunk/engines/sci/graphics/paint16.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.h	2010-05-24 17:43:55 UTC (rev 49197)
+++ scummvm/trunk/engines/sci/graphics/paint16.h	2010-05-24 17:45:00 UTC (rev 49198)
@@ -50,7 +50,7 @@
 
 	void init(GfxAnimate *animate, GfxText16 *text16);
 
-	void setEGAdrawingVisualize(bool state);
+	void debugSetEGAdrawingVisualize(bool state);
 
 	void drawPicture(GuiResourceId pictureId, int16 animationNr, bool mirroredFlag, bool addToFlag, GuiResourceId paletteId);
 	void drawCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, uint16 scaleX = 128, uint16 scaleY = 128);


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