Script Buffer

From AGI Wiki
Revision as of 16:30, 2 August 2013 by Andrew Branscom (talk | contribs) (Created page with "The script buffer stores an ordered list of commands such as loading/discarding resources, drawing/overlaying pictures and adding views to the background (add.to.pic) whic...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The script buffer stores an ordered list of commands such as loading/discarding resources, drawing/overlaying pictures and adding views to the background (add.to.pic) which are later saved in a save game.

The AGI memory layout is very dependent on the order in which things are loaded, discarded, etc., so the script is necessary to ensure that this order is conserved. When a game is restored, the script is executed to ensure the interpreter's memory is in exactly the same state as it was when the game was saved. The script buffer is cleared when new.room is called.

For a more detailed description of AGI memory and the script buffer, see the Memory and Script article.