From 1a6bd23780b46cdeb54372f0625545259358f84d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 23 Apr 2008 18:22:06 +0000 Subject: [PATCH] Removed file existence checks to determine game version and added game flags instead. Added the MD5 of the English floppy version of Return to Zork svn-id: r31670 --- engines/made/detection.cpp | 18 +++++++++++++++++- engines/made/made.cpp | 15 ++++++++++----- engines/made/made.h | 5 ++++- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index 9406f1fc53b..d943f86f08c 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -85,7 +85,7 @@ static const MadeGameDescription gameDescriptions[] = { }, 0, 0, - 0, + GF_CD_COMPRESSED, 0, }, @@ -101,7 +101,23 @@ static const MadeGameDescription gameDescriptions[] = { }, 0, 0, + GF_CD, 0, + }, + + { + // Return to Zork - English floppy version + { + "rtz", + "Floppy", + AD_ENTRY1("rtz.prj", "764d02f52ce1c219f2c0066677fba4ce"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + GF_FLOPPY, 0, }, diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 9a825343582..2d04e8272eb 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -143,12 +143,17 @@ int MadeEngine::go() { if (getFeatures() & GF_DEMO) { _dat->open("demo.dat"); _res->open("demo.prj"); - } else { - if (Common::File::exists("rtzcd.dat")) - _dat->open("rtzcd.dat"); - else - _dat->openFromRed("rtzcd.red", "rtzcd.dat"); + } else if (getFeatures() & GF_CD) { + _dat->open("rtzcd.dat"); _res->open("rtzcd.prj"); + } else if (getFeatures() & GF_CD_COMPRESSED) { + _dat->openFromRed("rtzcd.red", "rtzcd.dat"); + _res->open("rtzcd.prj"); + } else if (getFeatures() & GF_FLOPPY) { + _dat->open("rtz.dat"); + _res->open("rtz.prj"); + } else { + error("Unknown game features"); } _eventMouseX = _eventMouseY = 0; diff --git a/engines/made/made.h b/engines/made/made.h index 8c81df5d100..d897509d31d 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -48,7 +48,10 @@ namespace Made { enum MadeGameFeatures { - GF_DEMO = 1 << 0 + GF_DEMO = 1 << 0, + GF_CD = 1 << 1, + GF_CD_COMPRESSED = 1 << 2, + GF_FLOPPY = 1 << 3 }; struct MadeGameDescription;