Source:NetHack 5.0.0/include/func tab.h
Jump to navigation
Jump to search
Below is the full text to func_tab.h from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/include/func_tab.h#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. /* NetHack 5.0 func_tab.h $NHDT-Date: 1684791775 2023/05/22 21:42:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.24 $ */ 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /*-Copyright (c) Pasi Kallinen, 2016. */ 4. /* NetHack may be freely redistributed. See license for details. */ 5. 6. #ifndef FUNC_TAB_H 7. #define FUNC_TAB_H 8. 9. /* extended command flags */ 10. #define IFBURIED 0x0001 /* can do command when buried */ 11. #define AUTOCOMPLETE 0x0002 /* command autocompletes */ 12. #define WIZMODECMD 0x0004 /* wizard-mode command */ 13. #define GENERALCMD 0x0008 /* general command, does not take game time */ 14. #define CMD_NOT_AVAILABLE 0x0010 /* recognized but non-functional (!SHELL,&c)*/ 15. #define NOFUZZERCMD 0x0020 /* fuzzer cannot execute this command */ 16. #define INTERNALCMD 0x0040 /* only for internal use, not for user */ 17. #define CMD_M_PREFIX 0x0080 /* accepts menu prefix */ 18. #define CMD_gGF_PREFIX 0x0100 /* accepts g/G/F prefix */ 19. #define CMD_MOVE_PREFIXES (CMD_M_PREFIX | CMD_gGF_PREFIX) 20. #define PREFIXCMD 0x0200 /* prefix command, requires another one after it */ 21. #define MOVEMENTCMD 0x0400 /* used to move hero/cursor */ 22. #define MOUSECMD 0x0800 /* cmd allowed to be bound to mouse button */ 23. #define CMD_INSANE 0x1000 /* suppress sanity check (for ^P and ^R) */ 24. #define AUTOCOMP_ADJ 0x2000 /* user changed command autocompletion */ 25. #define CMD_PARAM 0x4000 /* command requires a param from key bind */ 26. 27. /* flags for extcmds_match() */ 28. #define ECM_NOFLAGS 0 29. #define ECM_IGNOREAC 0x01 /* ignore !autocomplete commands */ 30. #define ECM_EXACTMATCH 0x02 /* needs exact match of findstr */ 31. #define ECM_NO1CHARCMD 0x04 /* ignore commands like '?' and '#' */ 32. 33. /* a key bound to ext_func_tab */ 34. struct Cmd_bind { 35. uchar key; 36. boolean userbind; /* added by user */ 37. char *param; 38. const struct ext_func_tab *cmd; 39. struct Cmd_bind *next; 40. }; 41. 42. struct ext_func_tab { 43. uchar key; 44. const char *ef_txt, *ef_desc; 45. int (*ef_funct)(void); /* must return ECMD_foo flags */ 46. unsigned flags; 47. const char *f_text; 48. }; 49. 50. extern struct ext_func_tab extcmdlist[]; 51. 52. #endif /* FUNC_TAB_H */