Scumm: Load-/Save-support for the original save-dialog
|Reported by:||SF/tobigun||Owned by:||fingolfin|
The original save-dialogs of older SCUMM-games are shown by a ALT-F5 keypress but they do not work in Version 3 games (Indy3 (+FM-Towns), Zak FM-Towns and Loom) because no savegames names are shown in the list. In addition saving doesn't really work with the saveState() approach.
With this patch the original Save-menu behaves like it would with the original SCUMM interpreter.
This patch loads the names of the stored savegames in the loadVars() method and stores them into the array-slots 10-23 so the save-dialog can use them. In addition it creates a temporary savegame whenever Alt-F5 is pressed. When the user presses SAVE in the save-dialog the temporary savegame will be copied to the appropriate filename based on the selected slot as the ScummVM GUI would do it. In addition the header of the filename will be set to the name the user edited in the savegame list of the dialog.
This patch also contains the handling of IQ-points because it is also handled in the loadVars()/saveVars() methods. Ignore it if you don't like it.
Note: A withdraw of this solution is that the temporary file will not be deleted when saving a game or closing the dialog. This is due to the fact that with the original interpreter you can save a game in multiple slots so renaming the file does not work. In addition we do not know when the user quits the dialog because the dialog is completely handled by the game scripts. Removing all .c00 files whenever ScummVM terminates could be a solution to this problem.
Ticket imported from: #1687041. Ticket imported from: patches/729.