abstract
| - Below is the full text to flag.h from the source code of NetHack 3.4.0. To link to a particular line, write [[NetHack 3.4.0/flag.h#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)flag.h 3.4 2000/01/19 */ 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 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. int purge_monsters; /* # of dead monsters still on fmon list */ 169. int *opt_booldup; /* for duplication of boolean opts in config file */ 170. int *opt_compdup; /* for duplication of compound opts in config file */ 171. uchar bouldersym; /* symbol for boulder display */ 172. #ifdef WIZARD 173. boolean sanity_check; /* run sanity checks */ 174. boolean mon_polycontrol; /* debug: control monster polymorphs */ 175. #endif 176. #ifdef TTY_GRAPHICS 177. boolean prevmsg_window; /* show more old messages at a time */ 178. boolean extmenu; /* extended commands use menu interface */ 179. #endif 180. #ifdef MFLOPPY 181. boolean checkspace; /* check disk space before writing files */ 182. /* (in iflags to allow restore after moving 183. * to >2GB partition) */ 184. #endif 185. #ifdef MICRO 186. boolean BIOS; /* use IBM or ST BIOS calls when appropriate */ 187. boolean rawio; /* whether can use rawio (IOCTL call) */ 188. #endif 189. #ifdef MAC_GRAPHICS_ENV 190. boolean MACgraphics; /* use Macintosh extended character set, as 191. as defined in the special font HackFont */ 192. unsigned use_stone; /* use the stone ppats */ 193. #endif 194. #if defined(MSDOS) || defined(WIN32) 195. boolean hassound; /* has a sound card */ 196. boolean usesound; /* use the sound card */ 197. boolean usepcspeaker; /* use the pc speaker */ 198. boolean tile_view; 199. boolean over_view; 200. boolean traditional_view; 201. #endif 202. #ifdef MSDOS 203. boolean hasvga; /* has a vga adapter */ 204. boolean usevga; /* use the vga adapter */ 205. boolean grmode; /* currently in graphics mode */ 206. #endif 207. #ifdef LAN_FEATURES 208. boolean lan_mail; /* mail is initialized */ 209. boolean lan_mail_fetched; /* mail is awaiting display */ 210. #endif 211. /* 212. * Window capability support. 213. */ 214. boolean wc_color; /* use color graphics */ 215. boolean wc_hilite_pet; /* hilight pets */ 216. boolean wc_ascii_map; /* show map using traditional ascii */ 217. boolean wc_tiled_map; /* show map using tiles */ 218. boolean wc_preload_tiles; /* preload tiles into memory */ 219. int wc_tile_width; /* tile width */ 220. int wc_tile_height; /* tile height */ 221. char *wc_tile_file; /* name of tile file;overrides default */ 222. boolean wc_inverse; /* use inverse video for some things */ 223. int wc_align_status; /* status win at top|bot|right|left */ 224. int wc_align_message; /* message win at top|bot|right|left */ 225. int wc_vary_msgcount; /* show more old messages at a time */ 226. char *wc_foregrnd_menu; /* points to foregrnd color name for menu win */ 227. char *wc_backgrnd_menu; /* points to backgrnd color name for menu win */ 228. char *wc_foregrnd_message; /* points to foregrnd color name for msg win */ 229. char *wc_backgrnd_message; /* points to backgrnd color name for msg win */ 230. char *wc_foregrnd_status; /* points to foregrnd color name for status win */ 231. char *wc_backgrnd_status; /* points to backgrnd color name for status win */ 232. char *wc_foregrnd_text; /* points to foregrnd color name for text win */ 233. char *wc_backgrnd_text; /* points to backgrnd color name for text win */ 234. char *wc_font_map; /* points to font name for the map win */ 235. char *wc_font_message; /* points to font name for message win */ 236. char *wc_font_status; /* points to font name for status win */ 237. char *wc_font_menu; /* points to font name for menu win */ 238. char *wc_font_text; /* points to font name for text win */ 239. int wc_fontsiz_map; /* font size for the map win */ 240. int wc_fontsiz_message; /* font size for the message window */ 241. int wc_fontsiz_status; /* font size for the status window */ 242. int wc_fontsiz_menu; /* font size for the menu window */ 243. int wc_fontsiz_text; /* font size for text windows */ 244. int wc_scroll_margin; /* scroll map when this far from 245. the edge */ 246. int wc_map_mode; /* specify map viewing options, mostly 247. for backward compatibility */ 248. int wc_player_selection; /* method of choosing character */ 249. boolean wc_splash_screen; /* display an opening splash screen or not */ 250. boolean wc_popup_dialog; /* put queries in pop up dialogs instead of 251. in the message window */ 252. boolean wc_large_font; /* draw in larger fonts (say, 12pt instead 253. of 9pt) */ 254. boolean wc_eight_bit_input; /* allow eight bit input */ 255. }; 256. 257. /* 258. * Old deprecated names 259. */ 260. #ifdef TTY_GRAPHICS 261. #define eight_bit_tty wc_eight_bit_input 262. #endif 263. #ifdef TEXTCOLOR 264. #define use_color wc_color 265. #endif 266. #define hilite_pet wc_hilite_pet 267. #define use_inverse wc_inverse 268. #ifdef MAC_GRAPHICS_ENV 269. #define large_font wc_large_font 270. #endif 271. #ifdef MAC 272. #define popup_dialog wc_popup_dialog 273. #endif 274. #define preload_tiles wc_preload_tiles 275. 276. extern NEARDATA struct flag flags; 277. extern NEARDATA struct instance_flags iflags; 278. 279. #endif /* FLAG_H */
|