Change key binds from array to linked list
Key bindings were stored as a fixed-size array, indexed by the input character, pointing to the extended commands. This changes that into a linked list of an intermediary struct Cmd_bind, storing the input key and the pointer to the command. This is just code cleanup for future enhancements, and should have no effect on gameplay.
This commit is contained in:
@@ -240,6 +240,7 @@ struct instance_globals_c {
|
||||
/* decl.c */
|
||||
char chosen_windowtype[WINTYPELEN];
|
||||
int cmd_key; /* parse() / rhack() */
|
||||
struct Cmd_bind *cmd_bind;
|
||||
cmdcount_nht command_count;
|
||||
/* some objects need special handling during destruction or placement */
|
||||
struct obj *current_wand; /* wand currently zapped/applied */
|
||||
|
||||
Reference in New Issue
Block a user