~ubuntu-branches/ubuntu/wily/gargoyle-free/wily-proposed

« back to all changes in this revision

Viewing changes to terps/nitfol/globals.c

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Beucler
  • Date: 2009-09-11 20:09:43 UTC
  • Revision ID: james.westby@ubuntu.com-20090911200943-idgzoyupq6650zpn
Tags: upstream-2009-08-25
ImportĀ upstreamĀ versionĀ 2009-08-25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  Nitfol - z-machine interpreter using Glk for output.
 
2
    Copyright (C) 1999  Evin Robertson
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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.
 
17
 
 
18
    The author can be reached at nitfol@deja.com
 
19
*/
 
20
#include "nitfol.h"
 
21
 
 
22
strid_t current_zfile;
 
23
glui32 zfile_offset;
 
24
 
 
25
strid_t input_stream1;
 
26
 
 
27
strid_t blorb_file;
 
28
glui32 imagecount = 0;
 
29
 
 
30
int using_infix;
 
31
 
 
32
int zversion;
 
33
int granularity;
 
34
offset rstart;
 
35
offset sstart;
 
36
 
 
37
/* Note that a lot of these are set in nitfol.opt, so changing the defaults
 
38
   here only affects ports without initialization code */
 
39
 
 
40
const char *username;
 
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;
 
47
BOOL quiet = TRUE;
 
48
BOOL ignore_errors = FALSE;
 
49
BOOL auto_save_undo = TRUE;
 
50
BOOL auto_save_undo_char = FALSE;
 
51
 
 
52
int interp_num = 2;
 
53
char interp_ver = 'N';
 
54
 
 
55
zbyte *z_memory;
 
56
 
 
57
offset PC;
 
58
offset oldPC;
 
59
 
 
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... */
 
62
int numoperands;
 
63
zword operand[16];
 
64
 
 
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 */
 
71
 
 
72
offset total_size;
 
73
offset dynamic_size;
 
74
offset high_mem_mark;
 
75
offset game_size;
 
76
 
 
77
zword z_checksum;      /* calculated checksum, not header */
 
78
zword z_globaltable;
 
79
zword z_objecttable;
 
80
zword z_propdefaults;
 
81
zword z_synonymtable;
 
82
zword z_dictionary;
 
83
zword z_terminators;
 
84
zword z_headerext;
 
85
 
 
86
int faked_random_seed = 0; /* If nonzero, use this as a seed instead of time */
 
87
 
 
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 */
 
97
 
 
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 */
 
100
 
 
101
BOOL do_check_watches = FALSE; /* Preventing check_watches from being
 
102
                                  pointlessly called is a worthwhile speedup */
 
103
 
 
104
BOOL false_undo = FALSE; /* We just did a fake undo */
 
105
 
 
106
char *db_prompt;            /* Defaults to "(nitfol) " */
 
107
char *search_path;          /* Path in which to look for games */
 
108
 
 
109
int automap_size = 12;
 
110
glui32 automap_split = winmethod_Above;
 
111
 
 
112
int stacklimit = 0;
 
113
 
 
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. */
 
119