'''Defines''', in [[AGIWiki/AGI|AGI]] [[AGIWiki/Logic|logic]], allow you to provide a proper name for the [[AGIWiki/Variable|variables]], [[AGIWiki/Flag|flags]], [[AGIWiki/Animated object|objects]] and other data in the game. This significantly improves the readability of the code.
To create a define name, use the <
source lang="cpp">#define</source> command. The name of the define is given, followed by the define value:< source lang="cpp">
#define ego o0
#define roomDescription "This is a large hall with tall pillars down each side."
Then the define name can be used in place of the define value:
Below is a typical [[AGIWiki/New room section|new room section]] of a logic file, without defines:
The same code, using defines, might appear like the following:
#define new_room f5
#define room_no v0