From 921030f4ef9ff41ff3387ac8c61ffd1f6e709611 Mon Sep 17 00:00:00 2001 From: md5 Date: Thu, 5 May 2011 18:33:22 +0300 Subject: SWORD25: Initial code for showing savegame thumbnails There is currently a bug and only the thumbnail of the first save slot is shown --- engines/sword25/gfx/graphicengine.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/sword25/gfx') diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp index 2772401c6a..371df7ac0f 100644 --- a/engines/sword25/gfx/graphicengine.cpp +++ b/engines/sword25/gfx/graphicengine.cpp @@ -266,8 +266,9 @@ Resource *GraphicEngine::loadResource(const Common::String &filename) { return pResource; } - // Load sprite image - if (filename.hasSuffix(".png") || filename.hasSuffix(".b25s")) { + // Load sprite image. Savegame thumbnails are also loaded here. + if (filename.hasSuffix(".png") || filename.hasSuffix(".b25s") || + filename.hasPrefix("/saves")) { bool result = false; RenderedImage *pImage = new RenderedImage(filename, result); if (!result) { @@ -354,7 +355,8 @@ bool GraphicEngine::canLoadResource(const Common::String &filename) { filename.hasSuffix("_ani.xml") || filename.hasSuffix("_fnt.xml") || filename.hasSuffix(".swf") || - filename.hasSuffix(".b25s"); + filename.hasSuffix(".b25s") || + filename.hasPrefix("/saves"); } void GraphicEngine::updateLastFrameDuration() { -- cgit v1.2.3