Basic savestate plugin API
|Reported by:||fingolfin||Owned by:||fingolfin|
The attached patch implements a basic savestate plugin API. It is not yet quite ready for SVN, but I thought people might already want to have a peek at it or comment, so I am putting this into a tracker item for now.
Basically, it adds a new plugin API function, which can be used to query a plugin for a list of savestates for a given target. Currently, in the patch this is only implemented for a single engine (the SCUMM engine). My hope is that for other engines, the resp. engine maintainers will help out.
Eventually, this would make it possible to add a feature to the launcher where the user can directly load a specific savegame instead of first loading up a game, then navigating to its save/load system. However, this is not yet implemented, and one would have think about a good GUI for this, too. (For example, add a "load savestate" button which pops up a dialog with a list of all saves, and lets the user choose one. Or change the launcher to display a tree display, where all saveslots for a given target are displayed as children of that target in the main launcher list).
Right now, the only way the new API is used is via a hack to the --list-targets / -t command, which was extended to also list all savestates for each targets. This might eventually be turned into a separate --list-saves command, of course. It is only there to show how to use the API, and to demonstrate that it actually works.
Ticket imported from: #1868402. Ticket imported from: patches/880.