1 /*
2  * Various status thingies for the interpreter and interface.
3  *
4  */
5 
6 #ifndef COMMON_SETUP_H
7 #define COMMON_SETUP_H
8 
9 
10 typedef enum {
11 	FORMAT_NORMAL,
12 	FORMAT_UNKNOWN,
13 	FORMAT_DISABLED,
14 	FORMAT_IRC,
15 	FORMAT_ANSI
16 } format_t;
17 
18 typedef struct frotz_setup_struct {
19 	int attribute_assignment;
20 	int attribute_testing;
21 	int context_lines;
22 	int object_locating;
23 	int object_movement;
24 	int left_margin;
25 	int right_margin;
26 	int ignore_errors;
27 	int interpreter_number;
28 	int piracy;
29 	int undo_slots;
30 	int expand_abbreviations;
31 	int script_cols;
32 	int sound;
33 	int bleep;
34 	int err_report_mode;
35 
36 	char *story_file;
37 	char *blorb_file;
38         char *story_name;
39         char *story_base;
40         char *script_name;
41         char *command_name;
42         char *save_name;
43         char *tmp_save_name;
44         char *aux_name;
45         char *story_path;
46         char *zcode_path;
47 	char *restricted_path;
48 
49 	format_t format;  /* type of format codes for dumb interface */
50 	bool restore_mode; /* for a save file passed from command line */
51 	bool use_blorb;
52 	bool exec_in_blorb;
53 } f_setup_t;
54 extern f_setup_t f_setup;
55 
56 /*** Story file header data ***/
57 typedef struct zcode_header_struct {
58 	zbyte version;
59 	zbyte config;
60 	zword release;
61 	zword resident_size;
62 	zword start_pc;
63 	zword dictionary;
64 	zword objects;
65 	zword globals;
66 	zword dynamic_size;
67 	zword flags;
68 	zbyte serial[6];
69 	zword abbreviations;
70 	zword file_size;
71 	zword checksum;
72 	zbyte interpreter_number;
73 	zbyte interpreter_version;
74 	zbyte screen_rows;
75 	zbyte screen_cols;
76 	zword screen_width;
77 	zword screen_height;
78 	zbyte font_height;
79 	zbyte font_width;
80 	zword functions_offset;
81 	zword strings_offset;
82 	zbyte default_background;
83 	zbyte default_foreground;
84 	zword terminating_keys;
85 	zword line_width;
86 	zbyte standard_high;
87 	zbyte standard_low;
88 	zword alphabet;
89 	zword extension_table;
90 	zbyte user_name[8];
91 
92 	zword x_table_size;
93 	zword x_mouse_x;
94 	zword x_mouse_y;
95 	zword x_unicode_table;
96 	zword x_flags;
97 	zword x_fore_colour;
98 	zword x_back_colour;
99 } z_header_t;
100 extern z_header_t z_header;
101 
102 #endif
103