- 0 Talk
-
Source:Flag.h
Redirected from Flag.h
Below is the full text to include/flag.h from NetHack 3.4.3. To link to a particular line, write [[flag.h#line123]], for example.
1. /* SCCS Id: @(#)flag.h 3.4 2002/08/22 */ 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4.
| The NetHack General Public License applies to screenshots, source code and other content from NetHack. |
5. /* If you change the flag structure make sure you increment EDITLEVEL in */ 6. /* patchlevel.h if needed. Changing the instance_flags structure does */ 7. /* not require incrementing EDITLEVEL. */ 8. 9. #ifndef FLAG_H 10. #define FLAG_H 11. 12. /* 13. * Persistent flags that are saved and restored with the game. 14. * 15. */ 16. 17. struct flag { 18. #ifdef AMIFLUSH 19. boolean altmeta; /* use ALT keys as META */ 20. boolean amiflush; /* kill typeahead */ 21. #endif 22. #ifdef MFLOPPY 23. boolean asksavedisk; 24. #endif 25. boolean autodig; /* MRKR: Automatically dig */ 26. boolean autoquiver; /* Automatically fill quiver */ 27. boolean beginner; 28. #ifdef MAIL 29. boolean biff; /* enable checking for mail */ 30. #endif 31. boolean botl; /* partially redo status line */ 32. boolean botlx; /* print an entirely new bottom line */ 33. boolean confirm; /* confirm before hitting tame monsters */ 34. boolean debug; /* in debugging mode */ 35. #define wizard flags.debug 36. boolean end_own; /* list all own scores */ 37. boolean explore; /* in exploration mode */ 38. #ifdef OPT_DISPMAP 39. boolean fast_map; /* use optimized, less flexible map display */ 40. #endif 41. #define discover flags.explore 42. boolean female; 43. boolean forcefight; 44. boolean friday13; /* it's Friday the 13th */ 45. boolean help; /* look in data file for info about stuff */ 46. boolean ignintr; /* ignore interrupts */ 47. #ifdef INSURANCE 48. boolean ins_chkpt; /* checkpoint as appropriate */ 49. #endif 50. boolean invlet_constant; /* let objects keep their inventory symbol */ 51. boolean legacy; /* print game entry "story" */ 52. boolean lit_corridor; /* show a dark corr as lit if it is in sight */ 53. boolean made_amulet; 54. boolean mon_moving; /* monsters' turn to move */ 55. boolean move; 56. boolean mv; 57. boolean bypasses; /* bypass flag is set on at least one fobj */ 58. boolean nap; /* `timed_delay' option for display effects */ 59. boolean nopick; /* do not pickup objects (as when running) */ 60. boolean null; /* OK to send nulls to the terminal */ 61. #ifdef MAC 62. boolean page_wait; /* put up a --More-- after a page of messages */ 63. #endif 64. boolean perm_invent; /* keep full inventories up until dismissed */ 65. boolean pickup; /* whether you pickup or move and look */ 66. 67. boolean pushweapon; /* When wielding, push old weapon into second slot */ 68. boolean rest_on_space; /* space means rest */ 69. boolean safe_dog; /* give complete protection to the dog */ 70. #ifdef EXP_ON_BOTL 71. boolean showexp; /* show experience points */ 72. #endif 73. #ifdef SCORE_ON_BOTL 74. boolean showscore; /* show score */ 75. #endif 76. boolean silent; /* whether the bell rings or not */ 77. boolean sortpack; /* sorted inventory */ 78. boolean soundok; /* ok to tell about sounds heard */ 79. boolean sparkle; /* show "resisting" special FX (Scott Bigham) */ 80. boolean standout; /* use standout for --More-- */ 81. boolean time; /* display elapsed 'time' */ 82. boolean tombstone; /* print tombstone */ 83. boolean toptenwin; /* ending list in window instead of stdout */ 84. boolean verbose; /* max battle info */ 85. boolean prayconfirm; /* confirm before praying */ 86. int end_top, end_around; /* describe desired score list */ 87. unsigned ident; /* social security number for each monster */ 88. unsigned moonphase; 89. unsigned long suppress_alert; 90. #define NEW_MOON 0 91. #define FULL_MOON 4 92. unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */ 93. boolean travel; /* find way automatically to u.tx,u.ty */ 94. unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc) */ 95. /* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */ 96. /* 8: travel */ 97. unsigned long warntype; /* warn_of_mon monster type M2 */ 98. int warnlevel; 99. int djinni_count, ghost_count; /* potion effect tuning */ 100. int pickup_burden; /* maximum burden before prompt */ 101. char inv_order[MAXOCLASSES]; 102. char pickup_types[MAXOCLASSES]; 103. #define NUM_DISCLOSURE_OPTIONS 5 104. #define DISCLOSE_PROMPT_DEFAULT_YES 'y' 105. #define DISCLOSE_PROMPT_DEFAULT_NO 'n' 106. #define DISCLOSE_YES_WITHOUT_PROMPT '+' 107. #define DISCLOSE_NO_WITHOUT_PROMPT '-' 108. char end_disclose[NUM_DISCLOSURE_OPTIONS + 1]; /* disclose various info 109. upon exit */ 110. char menu_style; /* User interface style setting */ 111. #ifdef AMII_GRAPHICS 112. int numcols; 113. unsigned short amii_dripens[ 20 ]; /* DrawInfo Pens currently there are 13 in v39 */ 114. AMII_COLOR_TYPE amii_curmap[ AMII_MAXCOLORS ]; /* colormap */ 115. #endif 116. 117. /* KMH, role patch -- Variables used during startup. 118. * 119. * If the user wishes to select a role, race, gender, and/or alignment 120. * during startup, the choices should be recorded here. This 121. * might be specified through command-line options, environmental 122. * variables, a popup dialog box, menus, etc. 123. * 124. * These values are each an index into an array. They are not 125. * characters or letters, because that limits us to 26 roles. 126. * They are not booleans, because someday someone may need a neuter 127. * gender. Negative values are used to indicate that the user 128. * hasn't yet specified that particular value. If you determine 129. * that the user wants a random choice, then you should set an 130. * appropriate random value; if you just left the negative value, 131. * the user would be asked again! 132. * 133. * These variables are stored here because the u structure is 134. * cleared during character initialization, and because the 135. * flags structure is restored for saved games. Thus, we can 136. * use the same parameters to build the role entry for both 137. * new and restored games. 138. * 139. * These variables should not be referred to after the character 140. * is initialized or restored (specifically, after role_init() 141. * is called). 142. */ 143. int initrole; /* starting role (index into roles[]) */ 144. int initrace; /* starting race (index into races[]) */ 145. int initgend; /* starting gender (index into genders[]) */ 146. int initalign; /* starting alignment (index into aligns[]) */ 147. int randomall; /* randomly assign everything not specified */ 148. int pantheon; /* deity selection for priest character */ 149. }; 150. 151. /* 152. * Flags that are set each time the game is started. 153. * These are not saved with the game. 154. * 155. */ 156. 157. struct instance_flags { 158. boolean cbreak; /* in cbreak mode, rogue format */ 159. boolean DECgraphics; /* use DEC VT-xxx extended character set */ 160. boolean echo; /* 1 to echo characters */ 161. boolean IBMgraphics; /* use IBM extended character set */ 162. unsigned msg_history; /* hint: # of top lines to save */ 163. boolean num_pad; /* use numbers for movement commands */ 164. boolean news; /* print news */ 165. boolean window_inited; /* true if init_nhwindows() completed */ 166. boolean vision_inited; /* true if vision is ready */ 167. boolean menu_tab_sep; /* Use tabs to separate option menu fields */ 168. boolean menu_requested; /* Flag for overloaded use of 'm' prefix 169. * on some non-move commands */ 170. uchar num_pad_mode; 171. int menu_headings; /* ATR for menu headings */ 172. int purge_monsters; /* # of dead monsters still on fmon list */ 173. int *opt_booldup; /* for duplication of boolean opts in config file */ 174. int *opt_compdup; /* for duplication of compound opts in config file */ 175. uchar bouldersym; /* symbol for boulder display */ 176. boolean travel1; /* first travel step */ 177. coord travelcc; /* coordinates for travel_cache */ 178. #ifdef WIZARD 179. boolean sanity_check; /* run sanity checks */ 180. boolean mon_polycontrol; /* debug: control monster polymorphs */ 181. #endif 182. #ifdef TTY_GRAPHICS 183. char prevmsg_window; /* type of old message window to use */ 184. boolean extmenu; /* extended commands use menu interface */ 185. #endif 186. #ifdef MFLOPPY 187. boolean checkspace; /* check disk space before writing files */ 188. /* (in iflags to allow restore after moving 189. * to >2GB partition) */ 190. #endif 191. #ifdef MICRO 192. boolean BIOS; /* use IBM or ST BIOS calls when appropriate */ 193. #endif 194. #if defined(MICRO) || defined(WIN32) 195. boolean rawio; /* whether can use rawio (IOCTL call) */ 196. #endif 197. #ifdef MAC_GRAPHICS_ENV 198. boolean MACgraphics; /* use Macintosh extended character set, as 199. as defined in the special font HackFont */ 200. unsigned use_stone; /* use the stone ppats */ 201. #endif 202. #if defined(MSDOS) || defined(WIN32) 203. boolean hassound; /* has a sound card */ 204. boolean usesound; /* use the sound card */ 205. boolean usepcspeaker; /* use the pc speaker */ 206. boolean tile_view; 207. boolean over_view; 208. boolean traditional_view; 209. #endif 210. #ifdef MSDOS 211. boolean hasvga; /* has a vga adapter */ 212. boolean usevga; /* use the vga adapter */ 213. boolean grmode; /* currently in graphics mode */ 214. #endif 215. #ifdef LAN_FEATURES 216. boolean lan_mail; /* mail is initialized */ 217. boolean lan_mail_fetched; /* mail is awaiting display */ 218. #endif 219. /* 220. * Window capability support. 221. */ 222. boolean wc_color; /* use color graphics */ 223. boolean wc_hilite_pet; /* hilight pets */ 224. boolean wc_ascii_map; /* show map using traditional ascii */ 225. boolean wc_tiled_map; /* show map using tiles */ 226. boolean wc_preload_tiles; /* preload tiles into memory */ 227. int wc_tile_width; /* tile width */ 228. int wc_tile_height; /* tile height */ 229. char *wc_tile_file; /* name of tile file;overrides default */ 230. boolean wc_inverse; /* use inverse video for some things */ 231. int wc_align_status; /* status win at top|bot|right|left */ 232. int wc_align_message; /* message win at top|bot|right|left */ 233. int wc_vary_msgcount; /* show more old messages at a time */ 234. char *wc_foregrnd_menu; /* points to foregrnd color name for menu win */ 235. char *wc_backgrnd_menu; /* points to backgrnd color name for menu win */ 236. char *wc_foregrnd_message; /* points to foregrnd color name for msg win */ 237. char *wc_backgrnd_message; /* points to backgrnd color name for msg win */ 238. char *wc_foregrnd_status; /* points to foregrnd color name for status win */ 239. char *wc_backgrnd_status; /* points to backgrnd color name for status win */ 240. char *wc_foregrnd_text; /* points to foregrnd color name for text win */ 241. char *wc_backgrnd_text; /* points to backgrnd color name for text win */ 242. char *wc_font_map; /* points to font name for the map win */ 243. char *wc_font_message; /* points to font name for message win */ 244. char *wc_font_status; /* points to font name for status win */ 245. char *wc_font_menu; /* points to font name for menu win */ 246. char *wc_font_text; /* points to font name for text win */ 247. int wc_fontsiz_map; /* font size for the map win */ 248. int wc_fontsiz_message; /* font size for the message window */ 249. int wc_fontsiz_status; /* font size for the status window */ 250. int wc_fontsiz_menu; /* font size for the menu window */ 251. int wc_fontsiz_text; /* font size for text windows */ 252. int wc_scroll_amount; /* scroll this amount at scroll_margin */ 253. int wc_scroll_margin; /* scroll map when this far from 254. the edge */ 255. int wc_map_mode; /* specify map viewing options, mostly 256. for backward compatibility */ 257. int wc_player_selection; /* method of choosing character */ 258. boolean wc_splash_screen; /* display an opening splash screen or not */ 259. boolean wc_popup_dialog; /* put queries in pop up dialogs instead of 260. in the message window */ 261. boolean wc_eight_bit_input; /* allow eight bit input */ 262. boolean wc_mouse_support; /* allow mouse support */ 263. boolean wc2_fullscreen; /* run fullscreen */ 264. boolean wc2_softkeyboard; /* use software keyboard */ 265. boolean wc2_wraptext; /* wrap text */ 266. 267. boolean cmdassist; /* provide detailed assistance for some commands */ 268. boolean obsolete; /* obsolete options can point at this, it isn't used */ 269. /* Items which belong in flags, but are here to allow save compatibility */ 270. boolean lootabc; /* use "a/b/c" rather than "o/i/b" when looting */ 271. boolean showrace; /* show hero glyph by race rather than by role */ 272. boolean travelcmd; /* allow travel command */ 273. int runmode; /* update screen display during run moves */ 274. #ifdef AUTOPICKUP_EXCEPTIONS 275. struct autopickup_exception *autopickup_exceptions[2]; 276. #define AP_LEAVE 0 277. #define AP_GRAB 1 278. #endif 279. #ifdef WIN32CON 280. #define MAX_ALTKEYHANDLER 25 281. char altkeyhandler[MAX_ALTKEYHANDLER]; 282. #endif 283. }; 284. 285. /* 286. * Old deprecated names 287. */ 288. #ifdef TTY_GRAPHICS 289. #define eight_bit_tty wc_eight_bit_input 290. #endif 291. #ifdef TEXTCOLOR 292. #define use_color wc_color 293. #endif 294. #define hilite_pet wc_hilite_pet 295. #define use_inverse wc_inverse 296. #ifdef MAC_GRAPHICS_ENV 297. #define large_font obsolete 298. #endif 299. #ifdef MAC 300. #define popup_dialog wc_popup_dialog 301. #endif 302. #define preload_tiles wc_preload_tiles 303. 304. extern NEARDATA struct flag flags; 305. extern NEARDATA struct instance_flags iflags; 306. 307. /* runmode options */ 308. #define RUN_TPORT 0 /* don't update display until movement stops */ 309. #define RUN_LEAP 1 /* update display every 7 steps */ 310. #define RUN_STEP 2 /* update display every single step */ 311. #define RUN_CRAWL 3 /* walk w/ extra delay after each update */ 312. 313. #endif /* FLAG_H */