diff options
author | Martin Kiewitz | 2015-06-04 20:51:27 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-06-04 20:51:27 +0200 |
commit | 16d124b2317a61404ba4371bc7609a2770c03f3d (patch) | |
tree | ce1fa396934a6495b4151ff1ac971c0b83fab8de /engines/sherlock | |
parent | 37cc8df5a593ed6d76a5fa5f1221fc9a1b5df81e (diff) | |
download | scummvm-rg350-16d124b2317a61404ba4371bc7609a2770c03f3d.tar.gz scummvm-rg350-16d124b2317a61404ba4371bc7609a2770c03f3d.tar.bz2 scummvm-rg350-16d124b2317a61404ba4371bc7609a2770c03f3d.zip |
SHERLOCK: tiny bit of work on 3DO
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/detection_tables.h | 15 | ||||
-rw-r--r-- | engines/sherlock/journal.cpp | 10 | ||||
-rw-r--r-- | engines/sherlock/music.cpp | 11 | ||||
-rw-r--r-- | engines/sherlock/resources.cpp | 93 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel.cpp | 6 | ||||
-rw-r--r-- | engines/sherlock/screen.cpp | 6 | ||||
-rw-r--r-- | engines/sherlock/sound.cpp | 8 |
7 files changed, 121 insertions, 28 deletions
diff --git a/engines/sherlock/detection_tables.h b/engines/sherlock/detection_tables.h index 208b6710af..f6a5dc7273 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 a3c12a6100..08357b5fbf 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 b83e8e7de9..c0a63bea8d 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 64991ebd9f..ab9efce24d 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 9736dffe3d..04d573be87 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 6c59c3b873..b5f731948a 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 390576e98e..6a9c00db75 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"); |