diff options
author | BLooperZ | 2019-11-24 00:41:49 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-12-07 21:42:14 +0200 |
commit | 03ced8ac950a63aa36ec99f35b25186d0f673366 (patch) | |
tree | eee3122a64aa0025d7ebb8594ee69bf35b7a6c17 | |
parent | 8b54ff00faa7d4de874cfd98cf56b6cc45de0db1 (diff) | |
download | scummvm-rg350-03ced8ac950a63aa36ec99f35b25186d0f673366.tar.gz scummvm-rg350-03ced8ac950a63aa36ec99f35b25186d0f673366.tar.bz2 scummvm-rg350-03ced8ac950a63aa36ec99f35b25186d0f673366.zip |
COMPOSER: detect + support macintosh version
-rw-r--r-- | engines/composer/composer.cpp | 29 | ||||
-rw-r--r-- | engines/composer/composer.h | 1 | ||||
-rw-r--r-- | engines/composer/detection.cpp | 95 |
3 files changed, 113 insertions, 12 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index ec0e6dab43..0b5eee3bf0 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -92,7 +92,8 @@ Common::Error ComposerEngine::run() { // mac version? if (!_bookIni.loadFromFile("Darby the Dragon.ini")) if (!_bookIni.loadFromFile("Gregory.ini")) - error("failed to find book.ini"); + if (!_bookIni.loadFromFile("demo.mac") && !_bookIni.loadFromFile("book.mac")) + error("failed to find book.ini"); } } } @@ -114,7 +115,15 @@ Common::Error ComposerEngine::run() { loadLibrary(0); - uint fps = atoi(getStringFromConfig("Common", "FPS").c_str()); + uint fps; + if (_bookIni.hasKey("FPS", "Common")) + fps = atoi(getStringFromConfig("Common", "FPS").c_str()); + else { + // On Macintosh version there is no FPS key + if (getPlatform() != Common::kPlatformMacintosh) + warning("there is no FPS key in book.ini. Defaulting to 8..."); + fps = 8; + } uint frameTime = 125; // Default to 125ms (1000/8) if (fps != 0) frameTime = 1000 / fps; @@ -393,10 +402,18 @@ void ComposerEngine::loadLibrary(uint id) { Common::String filename; Common::String oldGroup = _bookGroup; if (getGameType() == GType_ComposerV1) { - if (!id || _bookGroup.empty()) - filename = getStringFromConfig("Common", "StartPage"); - else - filename = getStringFromConfig(_bookGroup, Common::String::format("%d", id)); + if (getPlatform() == Common::kPlatformMacintosh) { + if (!id || _bookGroup.empty()) + filename = getStringFromConfig("splash.rsc", "100"); + else + filename = getStringFromConfig(_bookGroup + ".rsc", Common::String::format("%d", id)); + } + else { + if (!id || _bookGroup.empty()) + filename = getStringFromConfig("Common", "StartPage"); + else + filename = getStringFromConfig(_bookGroup, Common::String::format("%d", id)); + } filename = mangleFilename(filename); // bookGroup is the basename of the path. diff --git a/engines/composer/composer.h b/engines/composer/composer.h index a4b421bfa0..22c4097d0a 100644 --- a/engines/composer/composer.h +++ b/engines/composer/composer.h @@ -175,6 +175,7 @@ public: const char *getGameId() const; uint32 getFeatures() const; Common::Language getLanguage() const; + Common::Platform getPlatform() const; const ComposerGameDescription *_gameDescription; diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp index 0422091deb..e32689df20 100644 --- a/engines/composer/detection.cpp +++ b/engines/composer/detection.cpp @@ -52,6 +52,10 @@ Common::Language ComposerEngine::getLanguage() const { return _gameDescription->desc.language; } +Common::Platform ComposerEngine::getPlatform() const { + return _gameDescription->desc.platform; +} + } static const PlainGameDescriptor composerGames[] = { @@ -126,7 +130,7 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV1 }, - // Magic Tales: Imo and the King Hebrew + // Magic Tales: Imo and the King Hebrew Windows { { "imoking", @@ -143,6 +147,23 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV1 }, + // Magic Tales: Imo and the King Hebrew Macintosh + { + { + "imoking", + "", + { + {"book.mac", 0, "4896a22874bb660f5ba26a0af111f9c0", 1868}, + AD_LISTEND + }, + Common::HE_ISR, + Common::kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOASPECT, GUIO_NOMIDI) + }, + GType_ComposerV1 + }, + // Baba Yaga Demo from Imo and the King Hebrew CD { { @@ -177,6 +198,40 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV1 }, + // Baba Yaga Demo from Imo and the King Hebrew CD + { + { + "babayaga", + "Magic Tales: Baba Yaga and the Magic Geese Demo", + { + {"book.mac", 0, "ed4a902df3b26d58e9c013f814a30ee8", 134}, + AD_LISTEND + }, + Common::EN_ANY, + Common::kPlatformMacintosh, + ADGF_USEEXTRAASTITLE | ADGF_DEMO, + GUIO2(GUIO_NOASPECT, GUIO_NOMIDI) + }, + GType_ComposerV1 + }, + + // Little Samurai Demo from Imo and the King Hebrew CD + { + { + "littlesamurai", + "Magic Tales: The Little Samurai Demo", + { + {"book.mac", 0, "57a82d563800001ed88b2742c3650a2d", 136}, + AD_LISTEND + }, + Common::EN_ANY, + Common::kPlatformMacintosh, + ADGF_USEEXTRAASTITLE | ADGF_DEMO, + GUIO2(GUIO_NOASPECT, GUIO_NOMIDI) + }, + GType_ComposerV1 + }, + // Magic Tales: Imo and the King Mac - from bug #3466402 { { @@ -219,7 +274,21 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV1 }, - // Magic Tales: The Little Samurai Hebrew + // Magic Tales: The Little Samurai Mac - from bug #3466402 + { + { + "littlesamurai", + "", + AD_ENTRY1("The Little Samurai", "38121dd649c24e8676aa108cf35d44b5"), + Common::EN_ANY, + Common::kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOASPECT, GUIO_NOMIDI) + }, + GType_ComposerV1 + }, + + // Magic Tales: The Little Samurai Hebrew Windows { { "littlesamurai", @@ -233,13 +302,13 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV1 }, - // Magic Tales: The Little Samurai Mac - from bug #3466402 + // Magic Tales: The Little Samurai Hebrew Macintosh { { "littlesamurai", "", - AD_ENTRY1("The Little Samurai", "38121dd649c24e8676aa108cf35d44b5"), - Common::EN_ANY, + AD_ENTRY1s("book.mac", "190158751630f69c2b6cf146aa2f1efc", 1874), + Common::HE_ISR, Common::kPlatformMacintosh, ADGF_NO_FLAGS, GUIO2(GUIO_NOASPECT, GUIO_NOMIDI) @@ -261,7 +330,7 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV1 }, - // from Little Samurai Hebrew CD + // Windows Demo from Little Samurai Hebrew CD { { "magictales", @@ -275,6 +344,20 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV1 }, + // Macintosh Demo from Little Samurai Hebrew CD + { + { + "magictales", + "Magic Tales Demo: Baby Yaga, Samurai, Imo", + AD_ENTRY1s("demo.mac", "6e775cda6539102d1ddee852bebf32c1", 488), + Common::HE_ISR, + Common::kPlatformMacintosh, + ADGF_USEEXTRAASTITLE | ADGF_DEMO, + GUIO2(GUIO_NOASPECT, GUIO_NOMIDI) + }, + GType_ComposerV1 + }, + { { "liam", |