aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx
diff options
context:
space:
mode:
authorMax Horn2010-10-25 23:34:36 +0000
committerMax Horn2010-10-25 23:34:36 +0000
commit8217efc74a9b5066bd158e7fef5edd257aec9f16 (patch)
tree3b4b79180b1fe8bf1a0c36aad433fb094fbe5045 /engines/sword25/gfx
parented0de8462df02e717c9673dfd4e77288377815ba (diff)
downloadscummvm-rg350-8217efc74a9b5066bd158e7fef5edd257aec9f16.tar.gz
scummvm-rg350-8217efc74a9b5066bd158e7fef5edd257aec9f16.tar.bz2
scummvm-rg350-8217efc74a9b5066bd158e7fef5edd257aec9f16.zip
SWORD25: Disable script triggered screenshots
svn-id: r53840
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r--engines/sword25/gfx/graphicengine.cpp26
-rw-r--r--engines/sword25/gfx/graphicengine.h8
-rw-r--r--engines/sword25/gfx/graphicengine_script.cpp6
3 files changed, 4 insertions, 36 deletions
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index e26bd5f294..f629993abf 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -400,32 +400,6 @@ void GraphicEngine::updateLastFrameDuration() {
_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
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h
index cb5b82081d..e1ae0d2d62 100644
--- a/engines/sword25/gfx/graphicengine.h
+++ b/engines/sword25/gfx/graphicengine.h
@@ -154,14 +154,6 @@ public:
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().
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp
index 835e1e20b8..b2a6309e48 100644
--- a/engines/sword25/gfx/graphicengine_script.cpp
+++ b/engines/sword25/gfx/graphicengine_script.cpp
@@ -383,8 +383,10 @@ static int getSecondaryFrameDuration(lua_State *L) {
}
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;
}