COMPOSER: detect + support macintosh version
This commit is contained in:
parent
8b54ff00fa
commit
03ced8ac95
3 changed files with 113 additions and 12 deletions
|
@ -92,7 +92,8 @@ Common::Error ComposerEngine::run() {
|
||||||
// mac version?
|
// mac version?
|
||||||
if (!_bookIni.loadFromFile("Darby the Dragon.ini"))
|
if (!_bookIni.loadFromFile("Darby the Dragon.ini"))
|
||||||
if (!_bookIni.loadFromFile("Gregory.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);
|
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)
|
uint frameTime = 125; // Default to 125ms (1000/8)
|
||||||
if (fps != 0)
|
if (fps != 0)
|
||||||
frameTime = 1000 / fps;
|
frameTime = 1000 / fps;
|
||||||
|
@ -393,10 +402,18 @@ void ComposerEngine::loadLibrary(uint id) {
|
||||||
Common::String filename;
|
Common::String filename;
|
||||||
Common::String oldGroup = _bookGroup;
|
Common::String oldGroup = _bookGroup;
|
||||||
if (getGameType() == GType_ComposerV1) {
|
if (getGameType() == GType_ComposerV1) {
|
||||||
if (!id || _bookGroup.empty())
|
if (getPlatform() == Common::kPlatformMacintosh) {
|
||||||
filename = getStringFromConfig("Common", "StartPage");
|
if (!id || _bookGroup.empty())
|
||||||
else
|
filename = getStringFromConfig("splash.rsc", "100");
|
||||||
filename = getStringFromConfig(_bookGroup, Common::String::format("%d", id));
|
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);
|
filename = mangleFilename(filename);
|
||||||
|
|
||||||
// bookGroup is the basename of the path.
|
// bookGroup is the basename of the path.
|
||||||
|
|
|
@ -175,6 +175,7 @@ public:
|
||||||
const char *getGameId() const;
|
const char *getGameId() const;
|
||||||
uint32 getFeatures() const;
|
uint32 getFeatures() const;
|
||||||
Common::Language getLanguage() const;
|
Common::Language getLanguage() const;
|
||||||
|
Common::Platform getPlatform() const;
|
||||||
|
|
||||||
const ComposerGameDescription *_gameDescription;
|
const ComposerGameDescription *_gameDescription;
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,10 @@ Common::Language ComposerEngine::getLanguage() const {
|
||||||
return _gameDescription->desc.language;
|
return _gameDescription->desc.language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common::Platform ComposerEngine::getPlatform() const {
|
||||||
|
return _gameDescription->desc.platform;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const PlainGameDescriptor composerGames[] = {
|
static const PlainGameDescriptor composerGames[] = {
|
||||||
|
@ -126,7 +130,7 @@ static const ComposerGameDescription gameDescriptions[] = {
|
||||||
GType_ComposerV1
|
GType_ComposerV1
|
||||||
},
|
},
|
||||||
|
|
||||||
// Magic Tales: Imo and the King Hebrew
|
// Magic Tales: Imo and the King Hebrew Windows
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
"imoking",
|
"imoking",
|
||||||
|
@ -143,6 +147,23 @@ static const ComposerGameDescription gameDescriptions[] = {
|
||||||
GType_ComposerV1
|
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
|
// Baba Yaga Demo from Imo and the King Hebrew CD
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -177,6 +198,40 @@ static const ComposerGameDescription gameDescriptions[] = {
|
||||||
GType_ComposerV1
|
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
|
// Magic Tales: Imo and the King Mac - from bug #3466402
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -219,7 +274,21 @@ static const ComposerGameDescription gameDescriptions[] = {
|
||||||
GType_ComposerV1
|
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",
|
"littlesamurai",
|
||||||
|
@ -233,13 +302,13 @@ static const ComposerGameDescription gameDescriptions[] = {
|
||||||
GType_ComposerV1
|
GType_ComposerV1
|
||||||
},
|
},
|
||||||
|
|
||||||
// Magic Tales: The Little Samurai Mac - from bug #3466402
|
// Magic Tales: The Little Samurai Hebrew Macintosh
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
"littlesamurai",
|
"littlesamurai",
|
||||||
"",
|
"",
|
||||||
AD_ENTRY1("The Little Samurai", "38121dd649c24e8676aa108cf35d44b5"),
|
AD_ENTRY1s("book.mac", "190158751630f69c2b6cf146aa2f1efc", 1874),
|
||||||
Common::EN_ANY,
|
Common::HE_ISR,
|
||||||
Common::kPlatformMacintosh,
|
Common::kPlatformMacintosh,
|
||||||
ADGF_NO_FLAGS,
|
ADGF_NO_FLAGS,
|
||||||
GUIO2(GUIO_NOASPECT, GUIO_NOMIDI)
|
GUIO2(GUIO_NOASPECT, GUIO_NOMIDI)
|
||||||
|
@ -261,7 +330,7 @@ static const ComposerGameDescription gameDescriptions[] = {
|
||||||
GType_ComposerV1
|
GType_ComposerV1
|
||||||
},
|
},
|
||||||
|
|
||||||
// from Little Samurai Hebrew CD
|
// Windows Demo from Little Samurai Hebrew CD
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
"magictales",
|
"magictales",
|
||||||
|
@ -275,6 +344,20 @@ static const ComposerGameDescription gameDescriptions[] = {
|
||||||
GType_ComposerV1
|
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",
|
"liam",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue