[Scummvm-cvs-logs] scummvm master -> 16d124b2317a61404ba4371bc7609a2770c03f3d

m-kiewitz m_kiewitz at users.sourceforge.net
Thu Jun 4 20:51:37 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:
16d124b231 SHERLOCK: tiny bit of work on 3DO


Commit: 16d124b2317a61404ba4371bc7609a2770c03f3d
    https://github.com/scummvm/scummvm/commit/16d124b2317a61404ba4371bc7609a2770c03f3d
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-04T20:51:27+02:00

Commit Message:
SHERLOCK: tiny bit of work on 3DO

Changed paths:
    engines/sherlock/detection_tables.h
    engines/sherlock/journal.cpp
    engines/sherlock/music.cpp
    engines/sherlock/resources.cpp
    engines/sherlock/scalpel/scalpel.cpp
    engines/sherlock/screen.cpp
    engines/sherlock/sound.cpp



diff --git a/engines/sherlock/detection_tables.h b/engines/sherlock/detection_tables.h
index 208b671..f6a5dc7 100644
--- a/engines/sherlock/detection_tables.h
+++ b/engines/sherlock/detection_tables.h
@@ -40,6 +40,21 @@ static const SherlockGameDescription gameDescriptions[] = {
 	},
 
 	{
+		// Case of the Serrated Scalpel - English 3DO
+		{
+			"scalpel",
+			0,
+			AD_ENTRY1s("talk.lib", "20f74a29f2db6475e85b029ac9fc03bc", 240610),
+			Common::EN_ANY,
+			Common::kPlatform3DO,
+			ADGF_UNSTABLE,
+			GUIO6(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVES, GAMEOPTION_FADE_STYLE, GAMEOPTION_HELP_STYLE,
+				GAMEOPTION_PORTRAITS_ON, GAMEOPTION_WINDOW_STYLE)
+		},
+		GType_SerratedScalpel,
+	},
+
+	{
 		// Case of the Serrated Scalpel - Interactive English Demo
 		// Provided by Strangerke
 		{
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index a3c12a6..08357b5 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -115,7 +115,15 @@ void Journal::loadJournalLocations() {
 	delete dir;
 
 	// Load in the locations stored in journal.txt
-	Common::SeekableReadStream *loc = res.load("journal.txt");
+	Common::SeekableReadStream *loc = 0;
+
+	if (_vm->getPlatform() != Common::kPlatform3DO) {
+		// PC: journal.txt
+		loc = res.load("journal.txt");
+	} else {
+		// 3DO: seems to use chess.txt
+		loc = res.load("chess.txt");
+	}
 
 	_locations.clear();
 	while (loc->pos() < loc->size()) {
diff --git a/engines/sherlock/music.cpp b/engines/sherlock/music.cpp
index b83e8e7..c0a63be 100644
--- a/engines/sherlock/music.cpp
+++ b/engines/sherlock/music.cpp
@@ -193,6 +193,15 @@ Music::Music(SherlockEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) {
 	_musicPlaying = false;
 	_musicOn = true;
 
+	if (_vm->getPlatform() == Common::kPlatform3DO) {
+		// 3DO - disable music
+		// TODO: Implement music support
+		_driver = NULL;
+		_musicType = MT_NULL;
+		_musicOn = false;
+		return;
+	}
+
 	if (_vm->_interactiveFl)
 		_vm->_res->addToCache("MUSIC.LIB");
 
@@ -311,6 +320,8 @@ void Music::syncMusicSettings() {
 }
 
 bool Music::playMusic(const Common::String &name) {
+	if (!_driver)
+		return false;
 	if (!_musicOn)
 		return false;
 
diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp
index 64991eb..ab9efce 100644
--- a/engines/sherlock/resources.cpp
+++ b/engines/sherlock/resources.cpp
@@ -89,13 +89,21 @@ Resources::Resources(SherlockEngine *vm) : _vm(vm), _cache(vm) {
 	_resourceIndex = -1;
 
 	if (_vm->_interactiveFl) {
-		addToCache("vgs.lib");
-		addToCache("talk.lib");
-		addToCache("journal.txt");
-
-		if (IS_SERRATED_SCALPEL) {
-			addToCache("sequence.txt");
-			addToCache("portrait.lib");
+		if (_vm->getPlatform() != Common::kPlatform3DO) {
+			addToCache("vgs.lib");
+			addToCache("talk.lib");
+			addToCache("journal.txt");
+
+			if (IS_SERRATED_SCALPEL) {
+				addToCache("sequence.txt");
+				addToCache("portrait.lib");
+			}
+		} else {
+			// 3DO
+			addToCache("talk.lib");
+			addToCache("chess.txt"); // instead of journal.txt
+			// remaining files are missing
+			// portraits were replaced with FMV
 		}
 	}
 }
@@ -209,32 +217,63 @@ void Resources::loadLibraryIndex(const Common::String &libFilename,
 
 	// Read in the number of resources
 	stream->seek(4);
-	int count = stream->readUint16LE();
+	int count = 0;
 
-	if (isNewStyle)
-		stream->seek((count + 1) * 8, SEEK_CUR);
+	if (_vm->getPlatform() != Common::kPlatform3DO) {
+		count = stream->readUint16LE();
 
-	// Loop through reading in the entries
-	for (int idx = 0; idx < count; ++idx) {
-		// Read the name of the resource
-		char resName[13];
-		stream->read(resName, 13);
-		resName[12] = '\0';
+		if (isNewStyle)
+			stream->seek((count + 1) * 8, SEEK_CUR);
 
-		// Read the offset
-		offset = stream->readUint32LE();
+		// Loop through reading in the entries
+		for (int idx = 0; idx < count; ++idx) {
+			// Read the name of the resource
+			char resName[13];
+			stream->read(resName, 13);
+			resName[12] = '\0';
 
-		if (idx == (count - 1)) {
-			nextOffset = stream->size();
-		} else {
-			// Read the size by jumping forward to read the next entry's offset
-			stream->seek(13, SEEK_CUR);
-			nextOffset = stream->readUint32LE();
-			stream->seek(-17, SEEK_CUR);
+			// Read the offset
+			offset = stream->readUint32LE();
+
+			if (idx == (count - 1)) {
+				nextOffset = stream->size();
+			} else {
+				// Read the size by jumping forward to read the next entry's offset
+				stream->seek(13, SEEK_CUR);
+				nextOffset = stream->readUint32LE();
+				stream->seek(-17, SEEK_CUR);
+			}
+
+			// Add the entry to the index
+			index[resName] = LibraryEntry(idx, offset, nextOffset - offset);
 		}
 
-		// Add the entry to the index
-		index[resName] = LibraryEntry(idx, offset, nextOffset - offset);
+	} else {
+		count = stream->readUint16BE();
+
+		// 3DO header
+		// Loop through reading in the entries
+		for (int idx = 0; idx < count; ++idx) {
+			// Read the offset
+			offset = stream->readUint32BE();
+
+			// Read the name of the resource
+			char resName[13];
+			stream->read(resName, 13);
+			resName[12] = '\0';
+
+			if (idx == (count - 1)) {
+				nextOffset = stream->size();
+			} else {
+				// Read the size by jumping forward to read the next entry's offset
+				stream->seek(13, SEEK_CUR);
+				nextOffset = stream->readUint32BE();
+				stream->seek(-17, SEEK_CUR);
+			}
+
+			// Add the entry to the index
+			index[resName] = LibraryEntry(idx, offset, nextOffset - offset);
+		}
 	}
 }
 
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index 9736dff..04d573b 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -224,6 +224,12 @@ void ScalpelEngine::showOpening() {
 	if (isDemo() && _interactiveFl)
 		return;
 
+	if (getPlatform() == Common::kPlatform3DO) {
+		// 3DO opening seems to be using completely different resources
+		// TODO
+		return;
+	}
+
 	if (!TsAGE::Logo::show(this))
 		return;
 	if (!showCityCutscene())
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index 6c59c3b..b5f7319 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -56,6 +56,12 @@ void Screen::setFont(int fontNumb) {
 	if (!_vm->_interactiveFl)
 		return;
 
+	if (_vm->getPlatform() == Common::kPlatform3DO) {
+		// 3DO seems to use 3DO fonts
+		// TODO
+		return;
+	}
+
 	_fontNumber = fontNumb;
 	Common::String fname = Common::String::format("FONT%d.VGS", fontNumb + 1);
 
diff --git a/engines/sherlock/sound.cpp b/engines/sherlock/sound.cpp
index 390576e..6a9c00d 100644
--- a/engines/sherlock/sound.cpp
+++ b/engines/sherlock/sound.cpp
@@ -64,6 +64,14 @@ Sound::Sound(SherlockEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) {
 	_soundOn = true;
 	_speechOn = true;
 
+	if (_vm->getPlatform() == Common::kPlatform3DO) {
+		// 3DO: disable sound for now
+		// TODO
+		_soundOn = false;
+		_speechOn = false;
+		return;
+	}
+
 	_vm->_res->addToCache("MUSIC.LIB");
 	if (!_vm->_interactiveFl)
 		_vm->_res->addToCache("TITLE.SND");






More information about the Scummvm-git-logs mailing list