[Scummvm-cvs-logs] SF.net SVN: scummvm:[53840] scummvm/trunk/engines/sword25/gfx

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Oct 26 01:34:37 CEST 2010


Revision: 53840
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53840&view=rev
Author:   fingolfin
Date:     2010-10-25 23:34:36 +0000 (Mon, 25 Oct 2010)

Log Message:
-----------
SWORD25: Disable script triggered screenshots

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
    scummvm/trunk/engines/sword25/gfx/graphicengine.h
    scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2010-10-25 23:34:12 UTC (rev 53839)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2010-10-25 23:34:36 UTC (rev 53840)
@@ -400,32 +400,6 @@
 	_lastTimeStamp = currentTime;
 }
 
-namespace {
-bool doSaveScreenshot(GraphicEngine &graphicEngine, const Common::String &filename) {
-	Graphics::Surface *data = graphicEngine.getScreenshot();
-	if (!data) {
-		BS_LOG_ERRORLN("Call to GetScreenshot() failed. Cannot save screenshot.");
-		return false;
-	}
-
-	Common::FSNode f(filename);
-	Common::WriteStream *stream = f.createWriteStream();
-	if (!stream) {
-		BS_LOG_ERRORLN("Call to GetScreenshot() failed. Cannot save screenshot.");
-		return false;
-	}
-
-	bool result = Screenshot::saveToFile(data, stream);
-	delete stream;
-
-	return result;
-}
-}
-
-bool GraphicEngine::saveScreenshot(const Common::String &filename) {
-	return doSaveScreenshot(*this, filename);
-}
-
 bool GraphicEngine::saveThumbnailScreenshot(const Common::String &filename) {
 	// Note: In ScumMVM, rather than saivng the thumbnail to a file, we store it in memory 
 	// until needed when creating savegame files

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.h	2010-10-25 23:34:12 UTC (rev 53839)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.h	2010-10-25 23:34:36 UTC (rev 53840)
@@ -154,14 +154,6 @@
 	void drawDebugLine(const Vertex &start, const Vertex &end, uint color = BS_RGB(255, 255, 255));
 
 	/**
-	 * Creates a screenshot of the current frame buffer and writes it to a graphic file in PNG format.
-	 * Returns true if the screenshot was saved successfully.
-	 * Notes: This method should only be called after a call to EndFrame(), and before the next call to StartFrame().
-	 * @param Filename  The filename for the screenshot
-	 */
-	bool saveScreenshot(const Common::String &filename);
-
-	/**
 	 * Creates a thumbnail with the dimensions of 200x125. This will not include the top and bottom of the screen..
 	 * the interface boards the the image as a 16th of it's original size.
 	 * Notes: This method should only be called after a call to EndFrame(), and before the next call to StartFrame().

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2010-10-25 23:34:12 UTC (rev 53839)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2010-10-25 23:34:36 UTC (rev 53840)
@@ -383,8 +383,10 @@
 }
 
 static int saveScreenshot(lua_State *L) {
-	GraphicEngine *pGE = getGE();
-	lua_pushbooleancpp(L, pGE->saveScreenshot(luaL_checkstring(L, 1)));
+	// This is used by system/debug.lua only. We do not implement this; support
+	// for taking screenshots is a backend feature.
+	lua_pushbooleancpp(L, false);
+
 	return 1;
 }
 


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