[Scummvm-cvs-logs] SF.net SVN: scummvm:[34738] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Oct 4 15:09:02 CEST 2008
Revision: 34738
http://scummvm.svn.sourceforge.net/scummvm/?rev=34738&view=rev
Author: fingolfin
Date: 2008-10-04 13:09:01 +0000 (Sat, 04 Oct 2008)
Log Message:
-----------
Renamed some MetaEngine feature flags; removed explicit numbers from this feature flag list (nothing should rely on their specific values, anyway); added a note that Engine::hasFeature should become independant of MetaEngine::hasFeature
Modified Paths:
--------------
scummvm/trunk/engines/engine.h
scummvm/trunk/engines/kyra/detection.cpp
scummvm/trunk/engines/metaengine.h
scummvm/trunk/engines/scumm/detection.cpp
scummvm/trunk/gui/launcher.cpp
Modified: scummvm/trunk/engines/engine.h
===================================================================
--- scummvm/trunk/engines/engine.h 2008-10-04 11:10:25 UTC (rev 34737)
+++ scummvm/trunk/engines/engine.h 2008-10-04 13:09:01 UTC (rev 34738)
@@ -178,6 +178,10 @@
/**
* Determine whether the engine supports the specified MetaEngine feature.
+ *
+ * FIXME: This should not call through to the MetaEngine, but rather should support
+ * its own list of features. In particular, kSupportsRTL should be an EngineFeature,
+ * not a MetaEngineFeature.
*/
bool hasFeature(MetaEngine::MetaEngineFeature f);
Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp 2008-10-04 11:10:25 UTC (rev 34737)
+++ scummvm/trunk/engines/kyra/detection.cpp 2008-10-04 13:09:01 UTC (rev 34738)
@@ -1077,8 +1077,8 @@
(f == kSupportsListSaves) ||
(f == kSupportsDirectLoad) ||
(f == kSupportsDeleteSave) ||
- (f == kSupportsMetaInfos) ||
- (f == kSupportsThumbnails);
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail);
}
bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
Modified: scummvm/trunk/engines/metaengine.h
===================================================================
--- scummvm/trunk/engines/metaengine.h 2008-10-04 11:10:25 UTC (rev 34737)
+++ scummvm/trunk/engines/metaengine.h 2008-10-04 13:09:01 UTC (rev 34738)
@@ -88,6 +88,9 @@
*
* The default implementation returns an empty list.
*
+ * @note MetaEngines must indicate that this function has been implemented
+ * via the kSupportsListSaves feature flag.
+ *
* @param target name of a config manager target
* @return a list of save state descriptors
*/
@@ -101,6 +104,9 @@
* For most engines this just amounts to calling _saveFileMan->removeSaveFile().
* Engines which keep an index file will also update it accordingly.
*
+ * @note MetaEngines must indicate that this function has been implemented
+ * via the kSupportsDeleteSave feature flag.
+ *
* @param target name of a config manager target
* @param slot slot number of the save state to be removed
*/
@@ -127,52 +133,57 @@
* either available or not.
*/
enum MetaEngineFeature {
- /** 'Return to launcher' feature (i.e. EVENT_RTL is handled) */
- kSupportsRTL = 0,
+ /**
+ * 'Return to launcher' feature is supported, i.e., EVENT_RTL is handled-
+ */
+ kSupportsRTL,
/**
- * Listing Save States (i.e. implements the listSaves() method;
- * used for --list-saves support)
+ * Listing all Save States for a given target is supported, i.e.,
+ * the listSaves() method is implemented.
+ * Used for --list-saves support, as well as the GMM load dialog.
*/
- kSupportsListSaves = 1,
+ kSupportsListSaves,
- /** Loading from the Launcher / command line (-x) */
- kSupportsDirectLoad = 2,
+ /**
+ * Loading from the Launcher / command line (-x)
+ */
+ kSupportsDirectLoad,
/**
* Deleting Saves from the Launcher (i.e. implements the
* removeSaveState() method)
*/
- kSupportsDeleteSave = 3,
+ kSupportsDeleteSave,
/**
* Features meta infos for savestates (i.e. implements the
* querySaveMetaInfos method properly)
*/
- kSupportsMetaInfos = 4,
+ kSavesSupportMetaInfo,
/**
* Features a thumbnail in savegames (i.e. includes a thumbnail
* in savestates returned via querySaveMetaInfo).
- * This flag may only be set when 'kSupportsMetaInfos' is set.
+ * This flag may only be set when 'kSavesSupportMetaInfo' is set.
*/
- kSupportsThumbnails = 5,
+ kSavesSupportThumbnail,
/**
* Features 'save_date' and 'save_time' entries in the
* savestate returned by querySaveMetaInfo. Those values
* indicate the date/time the savegame was created.
- * This flag may only be set when 'kSupportsMetaInfos' is set.
+ * This flag may only be set when 'kSavesSupportMetaInfo' is set.
*/
- kSupportsSaveDate = 6,
+ kSavesSupportCreationDate,
/**
* Features 'play_time' entry in the savestate returned by
* querySaveMetaInfo. It indicates how long the user played
* the game till the save.
- * This flag may only be set when 'kSupportsMetaInfos' is set.
+ * This flag may only be set when 'kSavesSupportMetaInfo' is set.
*/
- kSupportsSavePlayTime = 7
+ kSavesSupportPlayTime
};
/**
Modified: scummvm/trunk/engines/scumm/detection.cpp
===================================================================
--- scummvm/trunk/engines/scumm/detection.cpp 2008-10-04 11:10:25 UTC (rev 34737)
+++ scummvm/trunk/engines/scumm/detection.cpp 2008-10-04 13:09:01 UTC (rev 34738)
@@ -695,10 +695,10 @@
(f == kSupportsListSaves) ||
(f == kSupportsDirectLoad) ||
(f == kSupportsDeleteSave) ||
- (f == kSupportsMetaInfos) ||
- (f == kSupportsThumbnails) ||
- (f == kSupportsSaveDate) ||
- (f == kSupportsSavePlayTime);
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate) ||
+ (f == kSavesSupportPlayTime);
}
GameList ScummMetaEngine::getSupportedGames() const {
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp 2008-10-04 11:10:25 UTC (rev 34737)
+++ scummvm/trunk/gui/launcher.cpp 2008-10-04 13:09:01 UTC (rev 34738)
@@ -554,10 +554,10 @@
_plugin = plugin;
_target = target;
_delSupport = (*_plugin)->hasFeature(MetaEngine::kSupportsDeleteSave);
- _metaInfoSupport = (*_plugin)->hasFeature(MetaEngine::kSupportsMetaInfos);
- _thumbnailSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSupportsThumbnails);
- _saveDateSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSupportsSaveDate);
- _playTimeSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSupportsSavePlayTime);
+ _metaInfoSupport = (*_plugin)->hasFeature(MetaEngine::kSavesSupportMetaInfo);
+ _thumbnailSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSavesSupportThumbnail);
+ _saveDateSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSavesSupportCreationDate);
+ _playTimeSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSavesSupportPlayTime);
reflowLayout();
updateSaveList();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list