Difference between revisions of "HOWTO-Engines"

Jump to navigation Jump to search
364 bytes added ,  19:31, 12 July 2011
→‎Subclassing MetaEngine: Fixed to recommend AdvancedDetector
(Removed Reference To SVN)
(→‎Subclassing MetaEngine: Fixed to recommend AdvancedDetector)
Line 51: Line 51:


=== Subclassing MetaEngine ===
=== Subclassing MetaEngine ===
Let's implement the plugin interface: You'll have to create a custom MetaEngine subclass which provides the information and functionality related to the engine that can be used without running any game. That includes detecting games, listing savegames and instancing the engine. You have to specify your MetaEngine class to the REGISTER_PLUGIN_* macros. (See the example below)
Let's implement the plugin interface:<br>
You'll have to create a custom MetaEngine subclass. This provides the information and functionality related to the engine that can be used by the launcher without loading and running the game engine, which includes detecting games, listing savegames and instancing the engine.


You can alternatively subclass AdvancedMetaEngine from <tt>common/advancedDetector.h</tt> to reuse some common functionality like MD5 based game detection.
The following example illustrates this, '''but''':<br> It is recommended that most engines should instead subclass AdvancedMetaEngine.<br>
This can be found in <tt>engines/advancedDetector.*</tt> and provides a standard framework for filename and MD5 based game detection. To use this, all you will have to provide is a standard data table of ADGameDescription entries describing each game variant, which is usually placed in a separate detection_tables.h header.<br>
 
Finally, in either case, you will then have to specify your MetaEngine class to the REGISTER_PLUGIN_* macros.


=== Subclassing Engine ===
=== Subclassing Engine ===
TrustedUser
574

edits

Navigation menu