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