diff options
author | md5 | 2011-05-05 20:13:06 +0300 |
---|---|---|
committer | md5 | 2011-05-05 20:13:06 +0300 |
commit | 2af3759a7810fe96d0b8a0c5124c091b085fa6f0 (patch) | |
tree | d2d07ab36a0941151bfc50bf347c1dcd553a0bda /engines/sword25/gfx | |
parent | f9868c807d5f9a39637db45eec9b0248cb8f8de5 (diff) | |
download | scummvm-rg350-2af3759a7810fe96d0b8a0c5124c091b085fa6f0.tar.gz scummvm-rg350-2af3759a7810fe96d0b8a0c5124c091b085fa6f0.tar.bz2 scummvm-rg350-2af3759a7810fe96d0b8a0c5124c091b085fa6f0.zip |
SWORD25: Fixed the thumbnail creation code, and removed a hack
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r-- | engines/sword25/gfx/graphicengine.cpp | 18 | ||||
-rw-r--r-- | engines/sword25/gfx/graphicengine.h | 3 |
2 files changed, 3 insertions, 18 deletions
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp index 371df7ac0f..fbaa69d09c 100644 --- a/engines/sword25/gfx/graphicengine.cpp +++ b/engines/sword25/gfx/graphicengine.cpp @@ -86,7 +86,6 @@ GraphicEngine::GraphicEngine(Kernel *pKernel) : GraphicEngine::~GraphicEngine() { unregisterScriptBindings(); _backSurface.free(); - _frameBuffer.free(); delete _thumbnail; } @@ -115,7 +114,6 @@ bool GraphicEngine::init(int width, int height, int bitDepth, int backbufferCoun const Graphics::PixelFormat format = g_system->getScreenFormat(); _backSurface.create(width, height, format); - _frameBuffer.create(width, height, format); // Standardmäßig ist Vsync an. setVsync(true); @@ -151,18 +149,6 @@ bool GraphicEngine::endFrame() { _renderObjectManagerPtr->render(); - // FIXME: The following hack doesn't really work (all the thumbnails are empty) -#if 0 - // HACK: The frame buffer surface is only used as the base for creating thumbnails when saving the - // game, since the _backSurface is blanked. Currently I'm doing a slightly hacky check and only - // copying the back surface if line 50 (the first line after the interface area) is non-blank - if (READ_LE_UINT32((byte *)_backSurface.pixels + (_backSurface.pitch * 50)) & 0xffffff) { - // Make a copy of the current frame into the frame buffer - Common::copy((byte *)_backSurface.pixels, (byte *)_backSurface.pixels + - (_backSurface.pitch * _backSurface.h), (byte *)_frameBuffer.pixels); - } -#endif - g_system->updateScreen(); return true; @@ -385,7 +371,9 @@ 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 delete _thumbnail; - _thumbnail = Screenshot::createThumbnail(&_frameBuffer); + + _thumbnail = Screenshot::createThumbnail(&_backSurface); + return true; } diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h index ebd815931a..8d12168b62 100644 --- a/engines/sword25/gfx/graphicengine.h +++ b/engines/sword25/gfx/graphicengine.h @@ -235,9 +235,6 @@ public: Graphics::Surface _backSurface; Graphics::Surface *getSurface() { return &_backSurface; } - Graphics::Surface _frameBuffer; - Graphics::Surface *getFrameBuffer() { return &_frameBuffer; } - Common::SeekableReadStream *_thumbnail; Common::SeekableReadStream *getThumbnail() { return _thumbnail; } |