1,079
edits
(Added page describing some of the 'advanced' features ScummVM Engine's may implement (WIP)) |
|||
Line 83: | Line 83: | ||
===Listing savestates via command line or Launcher=== | ===Listing savestates via command line or Launcher=== | ||
'''What is this about?'''<br> | '''What is this about?'''<br> | ||
With this feature, it is possible to build a list of available save slots for a given game target. This can be used by the user to list all saveslots from the command line, as the following example illustrates: | |||
<syntax type="Bash">$ ./scummvm --list-saves=monkey2 | |||
Saves for target 'monkey2': | |||
Slot Description | |||
---- ------------------------------------------------------ | |||
0 Autosave 0 | |||
1 Start | |||
2 Quicksave 2 | |||
3 Silke | |||
$</syntax> | |||
Furthermore, this is used by the load/save dialogs in the Launcher and the GMM to build the list of savestates they show visually to the user. | |||
'''How to implement it'''<br> | '''How to implement it'''<br> | ||
You have to implement MetaEngine::listSaves(), which takes a parameter indicating the target for which the list of savestates is requested. From this, you can (using the config manager) determine the path to the game data, if necessary, or just directly compute all available savestates. Details necessarily depend on your Engine, but looking at existing implementations should give you a fairly good idea how to tackle this. | |||
It returns a list of SaveStateDescriptor objects, describing each available savestate. As a minimum, it has to contain a human readable description, and a unique save slot number of the savestate (how this is defined is up to your engine -- you need to decide on one numbering scheme you use in all save/load related (Meta)Engine features, though). | |||
Oh, and of course, your MetaEngine::hasFeature() method has to return true for kSupportsListSaves. | |||
'''Relevant MetaEngine API''' | '''Relevant MetaEngine API''' | ||
Line 95: | Line 109: | ||
'''Already implemented by:''' | '''Already implemented by:''' | ||
[[AGI]], [[AGOS]], [[Cine]], [[Kyra]], [[Lure]], [[Parallaction]], [[Queen]], [[SAGA]], [[SCUMM]], [[Sky]], [[Sword1]], [[Sword2]], [[Tinsel]], [[Touche]] | [[AGI]], [[AGOS]], [[Cine]], [[Kyra]], [[Lure]], [[Parallaction]], [[Queen]], [[SAGA]], [[SCUMM]], [[Sky]], [[Sword1]], [[Sword2]], [[Tinsel]], [[Touche]] | ||
===Loading savestates via command line or Launcher=== | ===Loading savestates via command line or Launcher=== |
edits