From 84d6d0307f4561ebd344fff06b1e1df0d97c70ec Mon Sep 17 00:00:00 2001 From: BLooperZ Date: Sun, 24 Nov 2019 01:04:10 +0200 Subject: COMPOSER: read book.mac before book.ini --- engines/composer/composer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index 0b5eee3bf0..8fee5d7a7a 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -85,14 +85,15 @@ Common::Error ComposerEngine::run() { _queuedScripts[i]._scriptId = 0; } - if (!_bookIni.loadFromFile("book.ini")) { - if (!_bookIni.loadFromFile("demo.ini") && !_bookIni.loadFromFile("ls_demo.ini") && !_bookIni.loadFromFile("by_demo.ini")) { + // NOTE: check book.mac before book.ini for easier platform check (to find the proper section in INI) + if (!(_bookIni.loadFromFile("book.mac") || _bookIni.loadFromFile("demo.mac"))) { + if (!(_bookIni.loadFromFile("book.ini") || _bookIni.loadFromFile("demo.ini") + || _bookIni.loadFromFile("ls_demo.ini") || _bookIni.loadFromFile("by_demo.ini"))) { _directoriesToStrip = 0; if (!_bookIni.loadFromFile("programs/book.ini")) { // mac version? if (!_bookIni.loadFromFile("Darby the Dragon.ini")) if (!_bookIni.loadFromFile("Gregory.ini")) - if (!_bookIni.loadFromFile("demo.mac") && !_bookIni.loadFromFile("book.mac")) error("failed to find book.ini"); } } -- cgit v1.2.3