Skip to content

Commit

Permalink
SHERLOCK: set _rrmName during loadScene()
Browse files Browse the repository at this point in the history
_rrmName should be the full name of the room data file
on 3DO this filename is a bit different than on PC
  • Loading branch information
Martin Kiewitz committed Jun 12, 2015
1 parent 210b9f9 commit cbafff2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions engines/sherlock/scene.cpp
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit cbafff2

Please sign in to comment.