aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2015-06-13 00:52:15 +0200
committerMartin Kiewitz2015-06-13 00:52:15 +0200
commitcbafff20c22764295e93d86280e9825d7c6f5032 (patch)
tree36630ae6cae2b9d307c54ba5b646a49c7bf1aa9a
parent210b9f92e10a5ddb1715b9f97a451f03ac1a862a (diff)
downloadscummvm-rg350-cbafff20c22764295e93d86280e9825d7c6f5032.tar.gz
scummvm-rg350-cbafff20c22764295e93d86280e9825d7c6f5032.tar.bz2
scummvm-rg350-cbafff20c22764295e93d86280e9825d7c6f5032.zip
SHERLOCK: set _rrmName during loadScene()
_rrmName should be the full name of the room data file on 3DO this filename is a bit different than on PC
-rw-r--r--engines/sherlock/scene.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 8b1b41db68..60d3c631ee 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -227,7 +227,8 @@ void Scene::selectScene() {
// Load the scene
Common::String sceneFile = Common::String::format("res%02d", _goToScene);
- _rrmName = Common::String::format("res%02d.rrm", _goToScene);
+ // _rrmName gets set during loadScene()
+ // _rrmName is for ScalpelScene::startCAnim
_currentScene = _goToScene;
_goToScene = -1;
@@ -308,10 +309,12 @@ bool Scene::loadScene(const Common::String &filename) {
if (_vm->getPlatform() != Common::kPlatform3DO) {
// PC version
- Common::String rrmFile = filename + ".rrm";
- flag = _vm->_res->exists(rrmFile);
+ Common::String roomFilename = filename + ".rrm";
+ _rrmName = roomFilename;
+
+ flag = _vm->_res->exists(roomFilename);
if (flag) {
- Common::SeekableReadStream *rrmStream = _vm->_res->load(rrmFile);
+ Common::SeekableReadStream *rrmStream = _vm->_res->load(roomFilename);
rrmStream->seek(39);
if (IS_SERRATED_SCALPEL) {
@@ -576,12 +579,12 @@ bool Scene::loadScene(const Common::String &filename) {
} else {
// === 3DO version ===
- Common::String roomFile = "rooms/" + filename + ".rrm";
- flag = _vm->_res->exists(roomFile);
+ Common::String roomFilename = "rooms/" + filename + ".rrm";
+ flag = _vm->_res->exists(roomFilename);
if (!flag)
error("loadScene: 3DO room data file not found");
- Common::SeekableReadStream *roomStream = _vm->_res->load(roomFile);
+ Common::SeekableReadStream *roomStream = _vm->_res->load(roomFilename);
// Read 3DO header
roomStream->skip(4); // UINT32: offset graphic data?