Difference between revisions of "AGIWiki/discard.view"

From ScummVM :: Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{AGIWiki}}
{{AGIWiki}}
 
{{AGIWiki/Object and View commands}}
The '''discard.view''' command removes a [[AGIWiki/View|view resource]] from memory. There is an [[AGIWiki/Indirect command|indirect]] version of this command called '''[[AGIWiki/discard.view.v|discard.view.v]]'''.
The '''discard.view''' command removes a [[AGIWiki/View|view resource]] from memory. There is an [[AGIWiki/Indirect command|indirect]] version of this command called '''[[AGIWiki/discard.view.v|discard.view.v]]'''.



Revision as of 20:55, 23 February 2015

AGIWiki


Object and View Commands

The discard.view command removes a view resource from memory. There is an indirect version of this command called discard.view.v.

Syntax

discard.view(byt viewNumber);

View viewNumber is discarded from memory.

Remarks

Resources must be unloaded in reverse order of the way they were originally loaded, or unexpected results may occur.

Attempting to discard a resource that has not been loaded will generate an error.

Before unloading a view, make certain it is not in use by any active screen objects. If a view is unloaded while still assigned to an object, the interpreter will most likely crash.

AGI adds a script entry to the script stack each time a view resource is unloaded.

Parameters

For discard.view

  • viewNumber: a number, 0-255, specifying which view resource to remove from memory

Possible errors

Examples

The following example uses discard.view to remove view 203 from memory:

<syntax type = "C++">

load.view(203);
discard.view(203);

</syntax>

Technical Information

Required interpreter version Available in all AGI versions
Bytecode value 32 (0x20 hex)

See also

Sources

  • Some of the text in the article is taken from the AGI Studio & WinAGI help files.