[Scummvm-cvs-logs] scummvm master -> cbafff20c22764295e93d86280e9825d7c6f5032

m-kiewitz m_kiewitz at users.sourceforge.net
Sat Jun 13 00:53:12 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cbafff20c2 SHERLOCK: set _rrmName during loadScene()


Commit: cbafff20c22764295e93d86280e9825d7c6f5032
    https://github.com/scummvm/scummvm/commit/cbafff20c22764295e93d86280e9825d7c6f5032
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-13T00:52:15+02:00

Commit Message:
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

Changed paths:
    engines/sherlock/scene.cpp



diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 8b1b41d..60d3c63 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?






More information about the Scummvm-git-logs mailing list