![]() Has to be at least as long as the lifetime of the command. The lifetimes for arguments referenced through pointers (i.e. Command arguments can be set using the cmd_set_arg_*() functions and can be retrieved with the In C a command is represented by the type 'struct command'. || point | a struct loc referring to a position in the current level || target | one of the directions or -1 for a target || number | an integer indicating a quantity, power, level. || item | a pointer to the struct object describing an item or stack || choice | an integer indicating a selection from a known set of values * a list of arguments, which have a type and a nameĪrguments can have any of the following types: these things do not fall within the remit of the game core). Targetting can be accomplished by sending a command ("target monster:'small kobold'") but the UI has to do the work to allow that command to be formed (allow the cursor to scroll around the screen, show what monster is currently highlighted, etc. ![]() Note that the game command system does not cover 'UI actions', such as adjusting the game panel, looking around, and similar. These commands form the basic dialect of Angband. The idea beyond the command system is that every action the player can perform in-game is encoded as an atomic command sent to the game. The other is the event system, which is currently underutilised. The command system in Angband is one of the two key ways that the game stays separate from the interface that displays it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |