[Scummvm-devel] Sword25 save system

David Given dg at cowlark.com
Wed Aug 24 16:21:57 CEST 2011


Willem Jan Palenstijn wrote:
[...]
> If the game's LUA scripts aren't written with this type of saving in mind, it
> might be tricky to do, though. Does anybody have any insight into this?

If the game's scripts are written to store all state in tables reachable
from the global state then this should be very easy --- just serialise
the global state and restore it.

However, if the game stores state in local variables or upvalues, then
this becomes much harder as there's no (sane) way of getting at these.
It may be possible to abuse the debug library into saving and restoring
these, but I don't know whether that's feasible.

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20110824/2c710afb/attachment.sig>


More information about the Scummvm-devel mailing list