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_METAENGINE_H 24 #define AGS_METAENGINE_H 25 26 #include "common/achievements.h" 27 #include "engines/advancedDetector.h" 28 29 class AGSMetaEngine : public AdvancedMetaEngine { 30 public: 31 const char *getName() const override; 32 33 Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override; 34 35 SaveStateList listSaves(const char *target) const override; 36 getAutosaveSlot()37 int getAutosaveSlot() const override { 38 return 0; 39 } 40 getMaximumSaveSlot()41 int getMaximumSaveSlot() const override { 42 return 998; 43 } 44 45 /** 46 * Return the name of the save file for the given slot and optional target, 47 * or a pattern for matching filenames against. 48 * 49 * @param saveGameIdx Index of the save, or kSavegameFilePattern 50 * for returning a filename pattern. 51 * @param target Game target. If omitted, then the engine ID is used. 52 */ 53 Common::String getSavegameFile(int saveGameIdx, const char *target = nullptr) const override; 54 55 /** 56 * Determine whether the engine supports the specified MetaEngine feature. 57 * 58 * Used by e.g. the launcher to determine whether to enable the Load button. 59 */ 60 bool hasFeature(MetaEngineFeature f) const override; 61 62 /** 63 * Return meta information from the specified save state. 64 * 65 * Depending on the MetaEngineFeatures set, this can include 66 * thumbnails, save date and time, play time. 67 * 68 * @param target Name of a config manager target. 69 * @param slot Slot number of the save state. 70 */ 71 SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override; 72 73 /** 74 * Remove the specified save state. 75 * 76 * @param target Name of a config manager target. 77 * @param slot Slot number of the save state to be removed. 78 */ 79 void removeSaveState(const char *target, int slot) const override; 80 81 const Common::AchievementDescriptionList* getAchievementDescriptionList() const override; 82 }; 83 84 #endif 85