1 /* Nitfol - z-machine interpreter using Glk for output.
2 Copyright (C) 1999 Evin Robertson
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
18 The author can be reached at nitfol@deja.com
22 strid_t current_zfile;
25 strid_t input_stream1;
28 glui32 imagecount = 0;
37 /* Note that a lot of these are set in nitfol.opt, so changing the defaults
38 here only affects ports without initialization code */
41 BOOL aye_matey = FALSE;
42 BOOL do_tandy = FALSE;
43 BOOL do_spell_correct = TRUE;
44 BOOL do_expand = TRUE;
45 BOOL do_automap = TRUE;
46 BOOL fullname = FALSE;
48 BOOL ignore_errors = FALSE;
49 BOOL auto_save_undo = TRUE;
50 BOOL auto_save_undo_char = FALSE;
53 char interp_ver = 'N';
60 /* I would kind of like to make these local to the opcode, but doing so makes
61 a bagillion warning messages about unused operands... */
65 zword maxobjs; /* Maximum number of objects that could fit */
66 zword object_count = 0; /* Objects before first property */
67 zword obj_first_prop_addr = 0; /* Location of start of first property */
68 zword obj_last_prop_addr = ZWORD_MASK; /* Location of start of last property */
69 zword prop_table_start = 0; /* Beginning of property table */
70 zword prop_table_end = ZWORD_MASK;/* End of property table */
77 zword z_checksum; /* calculated checksum, not header */
86 int faked_random_seed = 0; /* If nonzero, use this as a seed instead of time */
88 BOOL in_timer; /* True if we're inside a timer routine */
89 BOOL exit_decoder; /* To let the decoder know we're done */
90 zword time_ret; /* Get the return value back to the timer */
91 BOOL smart_timed = TRUE; /* redraw the prompt */
92 BOOL lower_block_quotes; /* put block quotes in lower window */
93 BOOL read_abort; /* quickly stop reading */
94 BOOL has_done_save_undo; /* the game has done a save_undo since last move */
95 BOOL allow_saveundo = TRUE; /* Otherwise, ignore all @save_undo opcodes */
96 BOOL allow_output = TRUE; /* Otherwise, ignore all output */
98 BOOL testing_string = FALSE; /* If we're uncertain this is really a string */
99 BOOL string_bad = FALSE; /* If it turns out to not be a bad string */
101 BOOL do_check_watches = FALSE; /* Preventing check_watches from being
102 pointlessly called is a worthwhile speedup */
104 BOOL false_undo = FALSE; /* We just did a fake undo */
106 char *db_prompt; /* Defaults to "(nitfol) " */
107 char *search_path; /* Path in which to look for games */
109 int automap_size = 12;
110 glui32 automap_split = winmethod_Above;
114 BOOL enablefont3 = FALSE; /* Enables font3 -> ascii conversion.
115 Nitfol doesn't claim to support it
116 even if you set this flag. This
117 messes SameGame.z5 up, which won't
118 switch back to font1. */