diff options
author | Filippos Karapetis | 2014-05-06 04:38:24 +0300 |
---|---|---|
committer | Filippos Karapetis | 2014-05-06 04:38:24 +0300 |
commit | c5878e401ce54713fb179f24a5744666571d2743 (patch) | |
tree | 92d03a0a6dccd07381580aaf17027a20cd520989 | |
parent | 2ff16fbc49c0bc44ab06b3a25d7739bf0b394a86 (diff) | |
download | scummvm-rg350-c5878e401ce54713fb179f24a5744666571d2743.tar.gz scummvm-rg350-c5878e401ce54713fb179f24a5744666571d2743.tar.bz2 scummvm-rg350-c5878e401ce54713fb179f24a5744666571d2743.zip |
MADS: Fix scene loading for V2 games
-rw-r--r-- | engines/mads/scene_data.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index 65220ced35..272c8288f0 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -141,7 +141,7 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName, _height = infoStream->readUint16LE(); // HACK for V2 games (for now) - if (_vm->getGameID() != GType_RexNebular && _width == 0) { + if (_vm->getGameID() != GType_RexNebular) { _width = 320; _height = 156; } @@ -226,15 +226,18 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName, Common::Array<SpriteAsset *> spriteSets; Common::Array<int> usageList; - for (uint i = 0; i < setNames.size(); ++i) { - Common::String setResName; - if (sceneFlag || resName.hasPrefix("*")) - setResName += "*"; - setResName += setNames[i]; - - SpriteAsset *sprites = new SpriteAsset(_vm, setResName, flags); - spriteSets.push_back(sprites); - usageList.push_back(sprites->_usageIndex); + // TODO: The following isn't quite right for V2 games + if (_vm->getGameID() == GType_RexNebular) { + for (uint i = 0; i < setNames.size(); ++i) { + Common::String setResName; + if (sceneFlag || resName.hasPrefix("*")) + setResName += "*"; + setResName += setNames[i]; + + SpriteAsset *sprites = new SpriteAsset(_vm, setResName, flags); + spriteSets.push_back(sprites); + usageList.push_back(sprites->_usageIndex); + } } _vm->_palette->_paletteUsage.updateUsage(usageList, _usageIndex); |