diff options
| author | Martin Kiewitz | 2015-06-13 13:21:00 +0200 | 
|---|---|---|
| committer | Martin Kiewitz | 2015-06-13 13:21:00 +0200 | 
| commit | 17a02395234f8ff6af581b4e81065ecb0fa21b79 (patch) | |
| tree | b93da4dc244d427ae1acdb3dbd82aec8c480eae6 | |
| parent | 276a96f1274b3606f666e0c3ac9fb62d5659d24a (diff) | |
| download | scummvm-rg350-17a02395234f8ff6af581b4e81065ecb0fa21b79.tar.gz scummvm-rg350-17a02395234f8ff6af581b4e81065ecb0fa21b79.tar.bz2 scummvm-rg350-17a02395234f8ff6af581b4e81065ecb0fa21b79.zip | |
SHERLOCK: 3DO: room loading: load exits
| -rw-r--r-- | engines/sherlock/scene.cpp | 25 | ||||
| -rw-r--r-- | engines/sherlock/scene.h | 1 | 
2 files changed, 23 insertions, 3 deletions
| diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 15464f569f..7fd423ee4d 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -122,6 +122,23 @@ void Exit::load(Common::SeekableReadStream &s, bool isRoseTattoo) {  		_allow = s.readSint16LE();  } +void Exit::load3DO(Common::SeekableReadStream &s) { +	left = s.readSint16BE(); +	top = s.readSint16BE(); +	setWidth(s.readUint16BE()); +	setHeight(s.readUint16BE()); + +	_image = 0; +	_scene = s.readSint16BE(); + +	_allow = s.readSint16BE(); + +	_newPosition.x = s.readSint16BE(); +	_newPosition.y = s.readSint16BE(); +	_newFacing = s.readUint16BE(); +	s.skip(2); // Filler +} +  /*----------------------------------------------------------------*/  void SceneEntry::load(Common::SeekableReadStream &s) { @@ -768,11 +785,13 @@ bool Scene::loadScene(const Common::String &filename) {  		roomStream->read(&_walkData[0], header3DO_walkData_size);  		// === EXITS === Read in the exits +		int exitsCount = header3DO_exits_size / 20; +  		_exitZone = -1; -		_exits.resize(header3DO_exits_size); // TODO!!!! +		_exits.resize(exitsCount); -		//for (int idx = 0; idx < numExits; ++idx) -		//	_exits[idx].load(*rrmStream, IS_ROSE_TATTOO); +		for (int idx = 0; idx < exitsCount; ++idx) +			_exits[idx].load3DO(*roomStream);  		// === ENTRANCE === Read in the entrance  		roomStream->seek(header3DO_entranceData_offset); diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h index 8c428659ae..98b29903c5 100644 --- a/engines/sherlock/scene.h +++ b/engines/sherlock/scene.h @@ -89,6 +89,7 @@ public:  	 * Load the data for the object  	 */  	void load(Common::SeekableReadStream &s, bool isRoseTattoo); +	void load3DO(Common::SeekableReadStream &s);  };  struct SceneEntry { | 
