aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-10-22 03:24:14 +0300
committerFilippos Karapetis2015-10-22 03:24:14 +0300
commit6a14396d73bafa2047214c21b3a284b2a647d560 (patch)
tree082261f0c562ad927f2b4132aedb9c323174c45e
parenta2bd9b524e1d95cde7d4c5ba3ee7a1bd8bdcc084 (diff)
downloadscummvm-rg350-6a14396d73bafa2047214c21b3a284b2a647d560.tar.gz
scummvm-rg350-6a14396d73bafa2047214c21b3a284b2a647d560.tar.bz2
scummvm-rg350-6a14396d73bafa2047214c21b3a284b2a647d560.zip
MADS: Dragon: Better checking for scene codes
-rw-r--r--engines/mads/dragonsphere/dragonsphere_scenes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index 6f5a28bff9..c24d0e93d0 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -201,12 +201,12 @@ Common::String DragonsphereScene::formAnimName(char sepChar, int suffixNum) {
/*------------------------------------------------------------------------*/
void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, int variant) {
- // The intro scenes do not have any codes
- if (_sceneId >= 900)
+ Common::String ext = Common::String::format(".WW%d", variant);
+ Common::String fileName = Resources::formatName(RESPREFIX_RM, _sceneId, ext);
+ if (!Common::File::exists(fileName))
return;
- Common::String ext = Common::String::format(".WW%d", variant);
- File f(Resources::formatName(RESPREFIX_RM, _sceneId, ext));
+ File f(fileName);
MadsPack codesPack(&f);
Common::SeekableReadStream *stream = codesPack.getItemStream(0);