AGI Command Reference - Commands to Load and unLoad Resources

From AGI Wiki
Jump to: navigation, search

Tutorials and Guides Table of Contents
AGI Command Reference Index

Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16


Commands to Load and unLoad Resources
By Chris Cromer

 

Commands in this chapter load (into the interpreter's memory) and unload (discard, thus freeing interpreter's memory) logic, picture, view, and sound resources. Always remember that the internal memory of the interpreter is 64K. This restriction is rarely a problem, but do not forget about it. When the internal memory is full, the program has to be broken into parts which are loaded and unloaded as the story unfolds in the given room, or Picture, View, and Sound resources have to be manipulated using the commands below. Remember that when a resource is unloaded, all resources loaded after it ARE ALSO AUTOMATICALLY UNLOADED!

 


load.logic(n);

Load into memory the LOGIC resource number n, i.e. Logic(n)

load.logic.v(n);

Load into memory the LOGIC resource number i, where i is the value of Var(n), i.e. Logic(Var(n))

load.pic(n);

Loads into memory the Picture resource number i, where i is the value of Var(n), i.e. Picture(Var(n))
Notes:

This may be a mistake in the original: I would expect this command to be 'load_pic_v', while 'load_pic n' would load resource number n..

load_pic_v may be a more appropriate name for it, but the name above is what they gave it. There is no equivalent command that takes a number rather than a variable.

load.view(n);

Loads into memory the View resource number n, i.e. View(n).

load.view.v(n);

Loads into memory the View resource number i, where i is the value of Var(n), i.e. View(Var(n))

load.sound(n);

Loads into memory the SOUND resource number n, i.e. Sound(n).
Notes:

Note that there is no load_sound_v listed. I wonder if this is a mistake or there really is no way to load a sound with indirection (unlikely, I think).

There really is no way of loading a sound with indirection. The command doesn't exist.

discard.pic(n);

Unloads Picture resource number i where i is the value of Var(n).

discard.view(n);

Unload View resource number n, i.e. View(n)

discard.view.v(n);

Unloads View resource number i where i the value of Var(n), i.e. View(Var(n)).
Notes:

What about discard_logic, discard_logic_v, discard_sound, and discard_sound_v?.

There must be some other way that those commands are removed from memory, because the commands you mention above don't exist.

 

Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16


Tutorials and Guides Table of Contents
AGI Command Reference Index

< Previous: Arithmetic CommandsNext: Program Control Commands >