aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx
diff options
context:
space:
mode:
authormd52011-05-05 18:33:22 +0300
committermd52011-05-05 18:33:22 +0300
commit921030f4ef9ff41ff3387ac8c61ffd1f6e709611 (patch)
tree61d0487d78d9b5508ec69905b6f7833dcc3932a0 /engines/sword25/gfx
parentdee398ad6caf741d1bcd81d1a32b26d08ad066d7 (diff)
downloadscummvm-rg350-921030f4ef9ff41ff3387ac8c61ffd1f6e709611.tar.gz
scummvm-rg350-921030f4ef9ff41ff3387ac8c61ffd1f6e709611.tar.bz2
scummvm-rg350-921030f4ef9ff41ff3387ac8c61ffd1f6e709611.zip
SWORD25: Initial code for showing savegame thumbnails
There is currently a bug and only the thumbnail of the first save slot is shown
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r--engines/sword25/gfx/graphicengine.cpp8
1 files changed, 5 insertions, 3 deletions
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() {