Difference between revisions of "SCI Kernel Documentation/Save-Restore Game Functions"
(One intermediate revision by the same user not shown) | |||
Line 31: | Line 31: | ||
==<br /> Save/Restore Game Functions == | ==<br /> Save/Restore Game Functions == | ||
− | ===<br /> | + | <blockquote> |
+ | Saves the whole heap, including scripts loaded and all global, local, and temporary variables. Name is a string of the current game (ie. King's Quest#1 = KQ1), num is the number of the save game, comment is a pointer to a string that will be saved for later lookup, and version is the current version of the SCI interpreter. The game is saved under <name>SG.<num> and the file <name>SG.DIR contains the comment and the number for the given save game. | ||
+ | </blockquote> | ||
+ | |||
+ | ===<br /> (SaveGame name num @comment version) === | ||
<blockquote> | <blockquote> |
Latest revision as of 19:06, 3 December 2015
Save/Restore Game Functions
Saves the whole heap, including scripts loaded and all global, local, and temporary variables. Name is a string of the current game (ie. King's Quest#1 = KQ1), num is the number of the save game, comment is a pointer to a string that will be saved for later lookup, and version is the current version of the SCI interpreter. The game is saved under <name>SG.<num> and the file <name>SG.DIR contains the comment and the number for the given save game.
(SaveGame name num @comment version)
Saves the whole heap, including scripts loaded and all global, local, and temporary variables. Name is a string of the current game (ie. King's Quest#1 = KQ1), num is the number of the save game, comment is a pointer to a string that will be saved for later lookup, and version is the current version of the SCI interpreter. The game is saved under <name>SG.<num> and the file <name>SG.DIR contains the comment and the number for the given save game.
(RestoreGame name num version)
RestoreGame restores the heap in the saved game, and then starts the game from where it had been saved. If the current running SCI version does not match the restored game's one, then a message will be printed and the game will not be restored.
(RestartGame)
This function resets the system to the state it had at the beginning of the game, allowing the user to restart the game without rebooting it.
(GameIsRestarting [flag])
If flag is present will set the GameIsRestarting internal flag to the given value, TRUE or FALSE. With no arguments, the function returns the value of the internal flag. The internal flag is set by RestartGame, and reset every time in the doit: of theGame.
(GetSaveDir)
Return a string pointing to the current save directory.
(CheckSaveGame gameName fileNum version)
Check the save game file "<gameName>SG.<fileNum>" to see if the versions match and so it can be restored.
- Notes
< Previous: Picture Functions Next: Animation Functions >