Difference between revisions of "AGIWiki/Variable"

From ScummVM :: Wiki
Jump to navigation Jump to search
m
m
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
* [[AGIWiki/Defines|Defines]]
 
* [[AGIWiki/Defines|Defines]]
 
* [[AGIWiki/Mathematical commands|Mathematical commands]]
 
* [[AGIWiki/Mathematical commands|Mathematical commands]]
* How to use the [[AGIWiki/Inventory-items|inventory-items]] as variables.
+
* How to use the [[AGIWiki/Inventory items|inventory items]] as variables.
  
 
== Sources ==
 
== Sources ==
Line 18: Line 18:
 
== Data types ==
 
== Data types ==
  
* Data types
+
{{AGIWiki/Data types}}
** [[AGIWiki/Number|Numbers]]
 
** [[AGIWiki/Variable|Variables]]
 
*** [[AGIWiki/Special variables|Special variables]]
 
** [[AGIWiki/Flag|Flags]]
 
*** [[AGIWiki/Special flags|Special flags]]
 
** [[AGIWiki/Message|Messages]]
 
** [[AGIWiki/Animated object|Animated objects]]
 
** [[AGIWiki/Inventory items|Inventory items]]
 
** [[AGIWiki/String|Strings]]
 
** [[AGIWiki/index.php/Word|Words]]
 
** [[AGIWiki/Controllers|Controllers]]
 

Latest revision as of 14:27, 31 March 2013

AGIWiki


A variable, also known as a var, can contain an integer value from 0 to 255, thus being the AGI equivalent of a byte (or unsigned char in C and C++). Variables are named by combining the prefix v with the number of the variable. There are 256 variables available in AGI, v0 to v255. The variables v0 to v26 have special meaning to the interpreter. You should not attempt to use these 27 variables for your own game data.

It is both possible and recommended to give your variables more meaningful names than a simple letter-number combination. This is possible using defines. The defines.txt file from the AGI Studio Template Game gives define names for the 27 special variables.

See also

Sources

Data types