1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef AGS_DETECTION_H 24 #define AGS_DETECTION_H 25 26 #include "engines/advancedDetector.h" 27 28 namespace AGS { 29 30 enum AGSDebugChannels { 31 kDebugGraphics = 1 << 0, 32 kDebugPath = 1 << 1, 33 kDebugScan = 1 << 2, 34 kDebugFilePath = 1 << 3, 35 kDebugScript = 1 << 4 36 }; 37 38 enum GameFlag { 39 GAMEFLAG_FORCE_AA = 1 40 }; 41 42 struct PluginVersion { 43 const char *_plugin; 44 int _version; 45 }; 46 47 struct AGSGameDescription { 48 ADGameDescription desc; 49 const PluginVersion *_plugins; 50 }; 51 52 extern const PlainGameDescriptor GAME_NAMES[]; 53 54 extern const AGSGameDescription GAME_DESCRIPTIONS[]; 55 56 enum AGSSteamVersion { kAGSteam = 0, kWadjetEye = 1 }; 57 enum AGSSpriteFontVersion { kAGSSpriteFont = 0, kClifftopGames = 1 }; 58 59 } // namespace AGS 60 61 62 class AGSMetaEngineDetection : public AdvancedMetaEngineDetection { 63 mutable Common::String _gameid; 64 mutable Common::String _extra; 65 mutable Common::String _filename; 66 mutable Common::String _md5; 67 68 static const DebugChannelDef debugFlagList[]; 69 70 public: 71 AGSMetaEngineDetection(); ~AGSMetaEngineDetection()72 ~AGSMetaEngineDetection() override {} 73 getEngineId()74 const char *getEngineId() const override { 75 return "ags"; 76 } 77 getName()78 const char *getName() const override { 79 return "Adventure Game Studio"; 80 } 81 getOriginalCopyright()82 const char *getOriginalCopyright() const override { 83 return "AGS Engine (C) Chris Jones"; 84 } 85 getDebugChannels()86 const DebugChannelDef *getDebugChannels() const override { 87 return debugFlagList; 88 } 89 90 DetectedGames detectGames(const Common::FSList &fslist) const override; 91 92 ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra = nullptr) const override; 93 canPlayUnknownVariants()94 bool canPlayUnknownVariants() const override { 95 return true; 96 } 97 98 GUI::OptionsContainerWidget *buildEngineOptionsWidgetStatic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override; 99 }; 100 101 #endif 102