Difference between revisions of "Flag"
From AGI Wiki
Jump to navigationJump to search (Created page with "A '''flag''' is a boolean data type with exactly two possible values: set or not set (these can alternately be referred to as 0 for "not set" and 1 for "set", or as true for "...") |
|||
Line 1: | Line 1: | ||
− | A '''flag''' is a boolean data type with exactly two possible values: set or not set (these can alternately be referred to as 0 for "not set" and 1 for "set", or as true for "set" and false for "not set"). Flags are named by combining the prefix <code>f</code> with the number of the flag. There are 256 flags available in AGI, <code>f0</code> to <code>f255</code>. The flags <code>f0</code> to <code>f15</code> have [[Special | + | A '''flag''' is a boolean data type with exactly two possible values: set or not set (these can alternately be referred to as 0 for "not set" and 1 for "set", or as true for "set" and false for "not set"). Flags are named by combining the prefix <code>f</code> with the number of the flag. There are 256 flags available in AGI, <code>f0</code> to <code>f255</code>. The flags <code>f0</code> to <code>f15</code> have [[Special Flags|special meaning]] to the [[Interpreter|interpreter]]. You should not attempt to use these 16 flags for your own game data. |
Is is both possible and recommended to give your flags more meaningful names than a simple letter-number combination. This is possible using [[Defines|defines]]. The [[defines.txt|defines.txt]] file from the [[AGI Studio Template Game|AGI Studio Template Game]] gives define names for the 16 special flags. | Is is both possible and recommended to give your flags more meaningful names than a simple letter-number combination. This is possible using [[Defines|defines]]. The [[defines.txt|defines.txt]] file from the [[AGI Studio Template Game|AGI Studio Template Game]] gives define names for the 16 special flags. |
Revision as of 14:52, 2 August 2013
A flag is a boolean data type with exactly two possible values: set or not set (these can alternately be referred to as 0 for "not set" and 1 for "set", or as true for "set" and false for "not set"). Flags are named by combining the prefix f
with the number of the flag. There are 256 flags available in AGI, f0
to f255
. The flags f0
to f15
have special meaning to the interpreter. You should not attempt to use these 16 flags for your own game data.
Is is both possible and recommended to give your flags 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 16 special flags.
See also
Sources
- AGI Studio help file