diff options
author | Gregory Montoir | 2007-10-30 22:35:10 +0000 |
---|---|---|
committer | Gregory Montoir | 2007-10-30 22:35:10 +0000 |
commit | 2a1c68b8a683333616a6373b01adb71b17aab8eb (patch) | |
tree | c072396765f6f40b97dc36c0768d41ca4909ceea /engines/igor/detection.cpp | |
parent | bb0bbdef57265d3bbf729399f80cd00759cd82d1 (diff) | |
download | scummvm-rg350-2a1c68b8a683333616a6373b01adb71b17aab8eb.tar.gz scummvm-rg350-2a1c68b8a683333616a6373b01adb71b17aab8eb.tar.bz2 scummvm-rg350-2a1c68b8a683333616a6373b01adb71b17aab8eb.zip |
- added detection of second demo version
- moved the resource entries tables to an external file (IGOR.TBL)
- added tool to build IGOR.TBL
svn-id: r29332
Diffstat (limited to 'engines/igor/detection.cpp')
-rw-r--r-- | engines/igor/detection.cpp | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/engines/igor/detection.cpp b/engines/igor/detection.cpp index 05f5f9a3f9..7d73c53f74 100644 --- a/engines/igor/detection.cpp +++ b/engines/igor/detection.cpp @@ -31,12 +31,22 @@ #include "igor/igor.h" -static const PlainGameDescriptor igorGameDescriptor = { - "igor", "Igor: Objective Uikokahonia" +struct GameDetectVersion { + uint32 borlandOverlaySize; + const char *versionString; +}; + +static const GameDetectVersion igorDetectVersionsTable[] = { + { 4086790, " 1.00s" }, + { 4094103, " 1.10s" }, + { 0, 0 } }; static const char *igorDetectFileName = "IGOR.DAT"; -static uint32 igorDetectFileSize = 4086790; + +static const PlainGameDescriptor igorGameDescriptor = { + "igor", "Igor: Objective Uikokahonia" +}; GameList Engine_IGOR_gameIDList() { GameList games; @@ -63,11 +73,18 @@ GameList Engine_IGOR_detectGames(const FSList &fslist) { continue; } const uint32 sig = f.readUint32BE(); - if (sig == MKID_BE('FBOV') && f.size() == igorDetectFileSize) { - GameDescriptor gd(igorGameDescriptor.gameid, igorGameDescriptor.description, Common::EN_ANY, Common::kPlatformPC); - gd.updateDesc("Demo"); - detectedGames.push_back(gd); - break; + if (sig == MKID_BE('FBOV')) { + const uint32 fileSize = f.size(); + for (int i = 0; igorDetectVersionsTable[i].borlandOverlaySize; ++i) { + if (igorDetectVersionsTable[i].borlandOverlaySize != fileSize) { + continue; + } + GameDescriptor gd(igorGameDescriptor.gameid, igorGameDescriptor.description, Common::EN_ANY, Common::kPlatformPC); + gd.description() += igorDetectVersionsTable[i].versionString; + gd.updateDesc("Demo"); + detectedGames.push_back(gd); + break; + } } } } |