From d10eb35dfee30f4b803144de636a3e15726fdbcf Mon Sep 17 00:00:00 2001 From: aryanrawlani28 Date: Mon, 3 Aug 2020 22:33:34 +0530 Subject: [PATCH] SCUMM: Move obsoleteGameIDsTable from detection_tables to a common header - MetaEngineConnect requires these at compile time. - In order to avoid including everything from detect_tables, we just move the one thing we need into header, and include that in metaengine.cpp - Also include it in detection_tables.h to restore orignal functionality. --- engines/scumm/detection_tables.h | 45 +--------------------- engines/scumm/obsolete.h | 66 ++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 44 deletions(-) create mode 100644 engines/scumm/obsolete.h diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 3dae5e181b7..50bc9755ff7 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -33,15 +33,10 @@ #include "scumm/scumm-md5.h" +#include "scumm/obsolete.h" namespace Scumm { -#pragma mark - -#pragma mark --- Data types & constants --- -#pragma mark - - -#define UNK Common::kPlatformUnknown - #pragma mark - #pragma mark --- Tables --- #pragma mark - @@ -147,44 +142,6 @@ static const PlainGameDescriptor gameDescriptions[] = { { 0, 0 } }; -/** - * Conversion table mapping old obsolete game IDs to the - * corresponding new game ID and platform combination. - */ -static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = { - {"bluesabctimedemo", "bluesabctime", UNK}, - {"BluesBirthdayDemo", "BluesBirthday", UNK}, - {"comidemo", "comi", UNK}, - {"digdemo", "dig", UNK}, - {"digdemoMac", "dig", Common::kPlatformMacintosh}, - {"dottdemo", "tentacle", UNK}, - {"fate", "atlantis", UNK}, - {"ftMac", "ft", Common::kPlatformMacintosh}, - {"ftpcdemo", "ft", UNK}, - {"ftdemo", "ft", Common::kPlatformMacintosh}, - {"game", "monkey", UNK}, - {"indy3ega", "indy3", UNK}, - {"indy3towns", "indy3", Common::kPlatformFMTowns}, - {"indy4", "atlantis", Common::kPlatformFMTowns}, - {"indydemo", "atlantis", Common::kPlatformFMTowns}, - {"loomcd", "loom", UNK}, - {"loomTowns", "loom", Common::kPlatformFMTowns}, - {"mi2demo", "monkey2", UNK}, - {"monkey1", "monkey", UNK}, - {"monkeyEGA", "monkey", UNK}, - {"monkeyVGA", "monkey", UNK}, - {"playfate", "atlantis", UNK}, - {"samnmax-alt", "samnmax", UNK}, - {"samnmaxMac", "samnmax", Common::kPlatformMacintosh}, - {"samdemo", "samnmax", UNK}, - {"samdemoMac", "samnmax", Common::kPlatformMacintosh}, - {"snmdemo", "samnmax", UNK}, - {"snmidemo", "samnmax", UNK}, - {"tentacleMac", "tentacle", Common::kPlatformMacintosh}, - {"zakTowns", "zak", Common::kPlatformFMTowns}, - {NULL, NULL, UNK} -}; - // The following table contains information about variants of our various // games. We index into it with help of md5table (from scumm-md5.h), to find // the correct GameSettings for a given game variant. diff --git a/engines/scumm/obsolete.h b/engines/scumm/obsolete.h new file mode 100644 index 00000000000..7314fc6f12a --- /dev/null +++ b/engines/scumm/obsolete.h @@ -0,0 +1,66 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + +namespace Scumm { + +#define UNK Common::kPlatformUnknown + +/** + * Conversion table mapping old obsolete game IDs to the + * corresponding new game ID and platform combination. + */ +static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = { + {"bluesabctimedemo", "bluesabctime", UNK}, + {"BluesBirthdayDemo", "BluesBirthday", UNK}, + {"comidemo", "comi", UNK}, + {"digdemo", "dig", UNK}, + {"digdemoMac", "dig", Common::kPlatformMacintosh}, + {"dottdemo", "tentacle", UNK}, + {"fate", "atlantis", UNK}, + {"ftMac", "ft", Common::kPlatformMacintosh}, + {"ftpcdemo", "ft", UNK}, + {"ftdemo", "ft", Common::kPlatformMacintosh}, + {"game", "monkey", UNK}, + {"indy3ega", "indy3", UNK}, + {"indy3towns", "indy3", Common::kPlatformFMTowns}, + {"indy4", "atlantis", Common::kPlatformFMTowns}, + {"indydemo", "atlantis", Common::kPlatformFMTowns}, + {"loomcd", "loom", UNK}, + {"loomTowns", "loom", Common::kPlatformFMTowns}, + {"mi2demo", "monkey2", UNK}, + {"monkey1", "monkey", UNK}, + {"monkeyEGA", "monkey", UNK}, + {"monkeyVGA", "monkey", UNK}, + {"playfate", "atlantis", UNK}, + {"samnmax-alt", "samnmax", UNK}, + {"samnmaxMac", "samnmax", Common::kPlatformMacintosh}, + {"samdemo", "samnmax", UNK}, + {"samdemoMac", "samnmax", Common::kPlatformMacintosh}, + {"snmdemo", "samnmax", UNK}, + {"snmidemo", "samnmax", UNK}, + {"tentacleMac", "tentacle", Common::kPlatformMacintosh}, + {"zakTowns", "zak", Common::kPlatformFMTowns}, + {NULL, NULL, UNK} +}; + +} // End of namespace Scumm