1 #include "c-angband.h" 2 3 /* Client global variables */ 4 5 char nick[MAX_CHARS]; 6 char pass[MAX_CHARS]; 7 8 char real_name[MAX_CHARS]; 9 10 char server_name[MAX_CHARS]; 11 int server_port; 12 13 object_type *inventory; /* The client-side copy of the inventory */ 14 char **inventory_name; /* The client-side copy of the inventory names */ 15 char **inventory_name_one; /* Client-side copy of inventory names (singular) */ 16 byte *inventory_secondary_tester;/* Secondary item tester (if known) */ 17 18 object_type floor_item; 19 char floor_name[MAX_CHARS]; /* Client-side copy of floor item */ 20 char floor_name_one[MAX_CHARS]; /* Client-side copy of floor item (singular) */ 21 byte floor_secondary_tester; 22 23 indicator_type indicators[MAX_INDICATORS]; 24 int known_indicators; 25 26 u32b indicator_window[MAX_INDICATORS]; /* Client-side mapping of indicators->PW_ flags */ 27 char *str_coffers[MAX_COFFERS]; /* Client-side copy of string variables */ 28 s32b coffers[MAX_COFFERS]; /* Client-side copy of various player variables */ 29 byte coffer_refs[MAX_INDICATORS]; /* ID to INDEX: Coffers */ 30 int known_coffers; 31 32 store_type store; /* The general info about the current store */ 33 owner_type store_owner; /* The current owner of the store */ 34 char store_owner_name[MAX_CHARS]; /* Shop owner name */ 35 char store_name[MAX_CHARS]; /* Shop name */ 36 byte store_flag = 0; /* Shop type */ 37 int store_prices[STORE_INVEN_MAX]; /* The prices of the items in the store */ 38 char store_names[STORE_INVEN_MAX][MAX_CHARS]; /* The names of the stuff in the store */ 39 s16b store_num; /* The current store number */ 40 41 char spell_info[26][SPELLS_PER_BOOK+1][MAX_CHARS]; /* Spell information */ 42 byte spell_flag[26 * (SPELLS_PER_BOOK+1)]; /* Spell flags */ 43 byte spell_test[26 * (SPELLS_PER_BOOK+1)]; /* TV filter for item-related spells */ 44 45 char party_info[160]; /* Information about your party */ 46 channel_type channels[MAX_CHANNELS]; 47 s16b view_channel = 0; 48 49 server_setup_t Setup; /* The information given to us by the server */ 50 client_setup_t Client_setup; /* The information we give to the server */ 51 52 s16b lag_mark; 53 s16b lag_minus; 54 bool redraw_lag_meter = FALSE; 55 char health_track_num; 56 byte health_track_attr; 57 58 bool shopping; /* Are we in a store? */ 59 bool shopping_buying; /* Are we buying? */ 60 bool leave_store; /* Time to leave store */ 61 bool enter_store; /* Time to enter store */ 62 63 s16b last_line_info; /* Last line of info we've received */ 64 s16b max_line; /* Maximum amount of "special" info */ 65 s16b cur_line; /* Current displayed line of "special" info */ 66 67 cave_view_type* remote_info[16]; /* Local copies for Special Info */ 68 s16b last_remote_line[16]; 69 cptr stream_desc[32]; 70 71 cave_view_type sfx_info[MAX_HGT][MAX_WID] = { 0 }; 72 s32b sfx_delay[MAX_HGT][MAX_WID] = { 0 }; 73 74 cave_view_type air_info[MAX_HGT][MAX_WID] = { 0 }; 75 s32b air_delay[MAX_HGT][MAX_WID] = { 0 }; 76 s32b air_fade[MAX_HGT][MAX_WID] = { 0 }; 77 bool air_updates = TRUE; 78 bool air_refresh = TRUE; 79 80 int lag_ok; /* server understands lag-check packets */ 81 82 player_type player; /* The client-side copy of some of the player information */ 83 player_type *p_ptr = &player; 84 player_type *Players = &player; 85 86 s32b exp_adv; /* Amount of experience required to advance a level */ 87 88 bool prompt_quote_hack = FALSE; /* Allow '"' to be used in place of '\r' */ 89 90 s16b command_see; 91 s16b command_gap; 92 s16b command_wrk; 93 94 bool spellcasting = FALSE; /* Selecting a magic book */ 95 int spellcasting_spell = -1; /* Select-by-name spell */ 96 97 int inven_out_index[256] = { -2 }; /* Last line->a) index mappings from show_equip() */ 98 99 bool item_tester_full; 100 byte item_tester_tval; 101 bool (*item_tester_hook)(object_type *o_ptr); 102 item_tester_type item_tester[MAX_ITEM_TESTERS]; 103 int known_item_testers; 104 105 //int special_line_type; /* Which interactive terminal we're interacting with */ 106 char special_line_header[MAX_CHARS]; 107 bool special_line_onscreen = FALSE; 108 109 bool special_line_requested = FALSE; 110 bool simple_popup_requested = FALSE; 111 bool local_browser_requested = FALSE; 112 113 bool confirm_requested = FALSE; 114 char confirm_prompt[MAX_CHARS]; 115 byte confirm_id; 116 byte confirm_type; 117 118 bool pause_requested = FALSE; 119 120 bool inkey_base = FALSE; 121 bool inkey_xtra = FALSE; /* See the "inkey()" function */ 122 bool inkey_scan = FALSE; 123 bool inkey_flag = FALSE; 124 125 bool inkey_exit = FALSE; 126 bool inkey_nonblock = FALSE; /* Set to TRUE for a single non-blocking read. */ 127 128 bool first_escape = TRUE; 129 130 s16b macro__num; 131 cptr *macro__pat; 132 cptr *macro__act; 133 bool *macro__cmd; 134 char *macro__buf; 135 136 u16b message__next; 137 u16b message__last; 138 u16b message__head; 139 u16b message__tail; 140 u16b *message__ptr; 141 char *message__buf; 142 u16b *message__type; 143 u16b *message__count; 144 145 bool msg_flag; 146 147 148 int max_macrotrigger = 0; 149 cptr macro_template = NULL; 150 cptr macro_modifier_chr; 151 cptr macro_modifier_name[MAX_MACRO_MOD]; 152 cptr macro_trigger_name[MAX_MACRO_TRIGGER]; 153 cptr macro_trigger_keycode[2][MAX_MACRO_TRIGGER]; 154 155 156 term *ang_term[8]; 157 u32b window_flag[8]; 158 u32b window_flag_o[8]; /* Flags as user intended, no state modifications */ 159 160 byte color_table[256][4]; 161 162 cptr ANGBAND_SYS; 163 164 cptr ANGBAND_FON = ""; 165 cptr ANGBAND_FONTNAME = ""; 166 cptr ANGBAND_GRAFNAME = ""; 167 168 byte mousemap[0xFF] = { 0 }; 169 170 cptr keymap_act[KEYMAP_MODES][256]; /* Keymaps for each "mode" associated with each keypress. */ 171 172 s16b command_cmd; 173 s16b command_dir; 174 event_type command_cmd_ex; /* Gives additional information of current command */ 175 176 custom_command_type custom_command[MAX_CUSTOM_COMMANDS]; 177 int custom_commands; 178 179 stream_type streams[MAX_STREAMS]; 180 int known_streams; 181 182 byte window_to_stream[ANGBAND_TERM_MAX]; 183 byte stream_group[MAX_STREAMS]; 184 byte stream_groups; 185 186 s16b race; 187 s16b pclass; 188 s16b sex; 189 char ptitle[80]; 190 191 byte A_MAX = 0; 192 cptr *stat_names; 193 s16b stat_order[A_CAP]; /* Desired order of stats */ 194 195 bool flip_inven = FALSE; 196 s16b flip_charsheet = 0; 197 198 bool topline_icky; 199 bool screen_icky; 200 s16b section_icky_col; 201 byte section_icky_row; 202 bool party_mode; 203 bool cursor_icky; 204 bool looking; 205 bool in_item_prompt = FALSE; 206 207 byte icky_levels; /* How many levels of ickyness nested -- DO NOT USE */ 208 209 /* Player equipment refrence array */ 210 char *eq_name; 211 s16b *eq_names; 212 byte *eq_xpos; 213 byte *eq_ypos; 214 215 /* 216 * The player race arrays 217 */ 218 char *p_name; 219 player_race *race_info; 220 /* 221 * The player class arrays 222 */ 223 char *c_name; 224 char *c_text; 225 player_class *c_info; 226 227 /* 228 * Known limits 229 */ 230 maxima z_info; 231 232 s16b INVEN_TOTAL = 36; 233 s16b INVEN_WIELD = 24; 234 s16b INVEN_PACK = 23; 235 236 s16b FLOOR_INDEX = -1; 237 bool FLOOR_NEGATIVE = TRUE; 238 s16b FLOOR_TOTAL = 1; 239 240 u16b MAX_OBJFLAGS_ROWS = 13; 241 u16b MAX_OBJFLAGS_COLS = 39; 242 243 244 cptr ANGBAND_GRAF = "none"; 245 cptr ANGBAND_DIR; 246 cptr ANGBAND_DIR_APEX; 247 cptr ANGBAND_DIR_BONE; 248 cptr ANGBAND_DIR_DATA; 249 cptr ANGBAND_DIR_EDIT; 250 cptr ANGBAND_DIR_FILE; 251 cptr ANGBAND_DIR_HELP; 252 cptr ANGBAND_DIR_INFO; 253 cptr ANGBAND_DIR_SAVE; 254 cptr ANGBAND_DIR_USER; 255 cptr ANGBAND_DIR_PREF; 256 cptr ANGBAND_DIR_XTRA; 257 cptr ANGBAND_DIR_XTRA_SOUND; 258 cptr ANGBAND_DIR_XTRA_GRAF; 259 260 261 int use_graphics; 262 bool big_tile; 263 bool use_sound; 264 265 cptr sound_file[MSG_MAX][SAMPLE_MAX]; 266 267 cave_view_type trans[40][88]; 268 269 option_type *option_info; 270 cptr *option_group; 271 int options_max; 272 int options_groups_max; 273 int known_options; 274 275 bool rogue_like_commands; 276 bool depth_in_feet; 277 bool auto_accept; 278 bool auto_itemlist; 279 bool auto_showlist; 280 bool show_labels; 281 bool show_weights; 282 bool wrap_messages; 283 bool ring_bell; 284 bool use_color; 285 286 bool use_old_target; 287 288 bool ignore_birth_options; 289 290 bool escape_in_macro_triggers = FALSE; 291 292 int char_screen_mode; 293 bool target_recall; 294 char target_prompt[60]; 295 296 byte hitpoint_warn_toggle = 0; 297