annotate defwin.c @ 3:5a977ccbc7a9 default tip

Empty changelog
author darius
date Sat, 06 Dec 1997 05:41:29 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1 /* $Id: defwin.c,v 1.1.1.1 1997/12/06 05:41:29 darius Exp $ */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
2
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
3 #ifdef XTREKRC_HELP
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
4 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
5 * taken from helpwin.c
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
6 * (copyright 1991 ERic mehlhaff Free to use, hack, etc. Just keep
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
7 * these credits here. Use of this code may be dangerous to your health
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
8 * and/or system. Its use is at your own risk. I assume no responsibility for
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
9 * damages, real, potential, or imagined, resulting from the use of it.)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
10 *
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
11 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
12
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
13 #include <stdio.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
14 #include "math.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
15 #include <signal.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
16 #include <sys/types.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
17 #ifdef hpux
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
18 #include <time.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
19 #else /* hpux */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
20 #include <sys/time.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
21 #endif /* hpux */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
22 #include "Wlib.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
23 #include "defs.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
24 #include "struct.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
25 #include "proto.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
26 #include "data.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
27 #ifndef SVR4
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
28 #include <strings.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
29 #else
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
30 #include <string.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
31 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
32
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
33 void def_write
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
34 P((char *file));
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
35
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
36 /* this is the number of help messages there are */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
37
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
38 #define INT_DEF 0
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
39 #define BOOL_DEF 1
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
40 #define STR_DEF 2
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
41 #define SINT_DEF 3
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
42
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
43 #define NAME_WIDTH 18
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
44 #define VAL_WIDTH 8
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
45 #define INDENT 3
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
46 #define MAX_VLINES 58
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
47
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
48 extern int updateSpeed;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
49 #ifdef RECORD
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
50 extern char *recordFileName;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
51 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
52
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
53 #define DEFMESSAGES (sizeof(def_messages)/ sizeof(struct def))
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
54
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
55 char *name = NULL, *cloak_chars = NULL, *bmap = NULL, *keymap = NULL, *plist = NULL, *log_file = NULL, *saveFileName = NULL;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
56 int galacticFrequent;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
57
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
58 /* sure its a mess, but it gets the job done */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
59
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
60 static
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
61 struct def {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
62 char *name;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
63 int type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
64 char *desc;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
65 void *variable;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
66
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
67 struct {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
68 int i_value; /* if int or bool */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
69 char *s_value; /* if str */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
70 char *desc;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
71 } values[10];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
72
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
73 struct { /* the area of the window this def takes up */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
74 int x, y, rt, bot;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
75 } loc;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
76 } def_messages[] = {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
77
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
78 #ifdef AUTHORIZE
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
79 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
80 "useRSA", BOOL_DEF, "Use RSA checking",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
81 &RSA_Client,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
82 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
83 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
84 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
85 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
86 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
87 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
88 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
89 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
90 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
91 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
92 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
93 "showStats", BOOL_DEF, "Show stats window",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
94 &showStats,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
95 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
96 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
97 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
98 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
99 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
100 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
101 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
102 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
103 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
104 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
105 "showShields", BOOL_DEF, "Show shields around ship",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
106 &showShields,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
107 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
108 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
109 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
110 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
111 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
112 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
113 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
114 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
115 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
116 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
117 "keepPeace", BOOL_DEF, "Stay peaceful when reborn",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
118 &keeppeace,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
119 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
120 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
121 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
122 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
123 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
124 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
125 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
126 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
127 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
128 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
129 "reportKills", BOOL_DEF, "Report kill messages",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
130 &reportKills,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
131 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
132 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
133 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
134 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
135 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
136 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
137 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
138 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
139 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
140 #if 0
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
141 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
142 "altBitmaps", BOOL_DEF, "Use alternate ship bitmaps",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
143 &blk_altbits,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
144 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
145 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
146 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
147 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
148 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
149 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
150 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
151 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
152 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
153 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
154 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
155 "showStars", BOOL_DEF, "Show star background on tactical",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
156 &blk_showStars,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
157 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
158 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
159 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
160 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
161 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
162 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
163 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
164 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
165 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
166 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
167 "showMySpeed", BOOL_DEF, "Show speed next to ship",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
168 &showMySpeed,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
169 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
170 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
171 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
172 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
173 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
174 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
175 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
176 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
177 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
178 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
179 "showTractorPressor", BOOL_DEF, "Show my tract/press",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
180 &showTractorPressor,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
181 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
182 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
183 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
184 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
185 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
186 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
187 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
188 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
189 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
190 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
191 "showLock", INT_DEF, "Lock display for planets/players",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
192 &showLock,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
193 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
194 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
195 0, NULL, "don't show lock"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
196 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
197 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
198 1, NULL, "show lock on galactic only"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
199 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
200 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
201 2, NULL, "show lock on tactical only"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
202 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
203 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
204 3, NULL, "show lock on both"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
205 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
206 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
207 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
208 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
209 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
210 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
211 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
212 "showGrid", BOOL_DEF, "Show grid on galactic",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
213 &drawgrid,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
214 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
215 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
216 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
217 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
218 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
219 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
220 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
221 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
222 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
223 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
224 "Dashboard", INT_DEF, "Type of dashboard to use",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
225 &Dashboard,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
226 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
227 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
228 0, NULL, "text based dashboard"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
229 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
230 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
231 1, NULL, "new dashboard"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
232 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
233 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
234 2, NULL, "color dashboard"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
235 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
236 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
237 3, NULL, "Rainbow Dashboard"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
238 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
239 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
240 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
241 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
242 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
243 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
244 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
245 "cloakChars", STR_DEF, "Cloak chars for map",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
246 &(cloak_chars),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
247 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
248 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
249 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
250 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
251 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
252 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
253 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
254 "logging", BOOL_DEF, "Use message logging",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
255 &logmess,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
256 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
257 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
258 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
259 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
260 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
261 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
262 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
263 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
264 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
265 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
266 "logFile", STR_DEF, "File to use for message logging",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
267 &(log_file),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
268 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
269 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
270 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
271 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
272 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
273 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
274 #ifdef VARY_HULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
275 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
276 "warnHull", BOOL_DEF, "Warn hull state based on damage",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
277 &vary_hull,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
278 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
279 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
280 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
281 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
282 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
283 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
284 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
285 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
286 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
287 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
288 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
289 "warpStreaks", BOOL_DEF, "Streak stars when entering warp",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
290 &warpStreaks,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
291 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
292 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
293 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
294 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
295 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
296 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
297 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
298 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
299 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
300 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
301 "useMsgw", BOOL_DEF, "Use message window",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
302 &use_msgw,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
303 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
304 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
305 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
306 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
307 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
308 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
309 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
310 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
311 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
312 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
313 "showShieldDam", BOOL_DEF, "Vary shields based on damage",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
314 &show_shield_dam,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
315 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
316 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
317 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
318 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
319 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
320 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
321 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
322 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
323 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
324 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
325 "updatesPerSec", SINT_DEF, "No. of updates from server per sec",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
326 &updateSpeed,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
327 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
328 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
329 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
330 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
331 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
332 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
333 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
334 "redrawDelay", SINT_DEF, "Minimum time between redraws (x/10 sec)",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
335 &redrawDelay,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
336 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
337 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
338 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
339 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
340 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
341 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
342 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
343 "extraAlertBorder", BOOL_DEF, "Show alert on local border",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
344 &extraBorder,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
345 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
346 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
347 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
348 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
349 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
350 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
351 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
352 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
353 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
354 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
355 "galacticFrequent", BOOL_DEF, "Update galactic map frequently",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
356 &galacticFrequent,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
357 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
358 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
359 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
360 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
361 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
362 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
363 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
364 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
365 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
366 #ifdef CONTINUOUS_MOUSE
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
367 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
368 "continuousMouse", BOOL_DEF, "Continuous mouse input",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
369 &continuousMouse,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
370 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
371 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
372 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
373 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
374 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
375 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
376 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
377 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
378 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
379 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
380 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
381 "tryUdp", BOOL_DEF, "Try UDP automatically",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
382 &tryUdp,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
383 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
384 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
385 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
386 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
387 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
388 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
389 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
390 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
391 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
392 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
393 "udpClientReceive", INT_DEF, "UDP receive mode",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
394 &udpClientRecv,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
395 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
396 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
397 0, NULL, "TCP only"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
398 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
399 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
400 1, NULL, "simple UDP"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
401 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
402 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
403 2, NULL, "fat UDP"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
404 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
405 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
406 3, NULL, "double UDP (obsolete)"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
407 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
408 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
409 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
410 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
411 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
412 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
413 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
414 "udpClientSend", INT_DEF, "UDP send mode",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
415 &udpClientSend,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
416 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
417 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
418 0, NULL, "TCP only"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
419 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
420 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
421 1, NULL, "simple UDP"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
422 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
423 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
424 2, NULL, "enforced UDP (state only)"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
425 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
426 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
427 3, NULL, "enforced UDP (state & weapon)"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
428 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
429 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
430 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
431 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
432 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
433 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
434 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
435 "udpSequenceCheck", BOOL_DEF, "UDP sequence checking",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
436 &udpSequenceChk,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
437 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
438 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
439 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
440 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
441 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
442 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
443 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
444 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
445 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
446 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
447 "sortPlayers", BOOL_DEF, "Sort playerlist by teams",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
448 &sortPlayers,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
449 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
450 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
451 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
452 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
453 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
454 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
455 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
456 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
457 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
458 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
459 "robsort", BOOL_DEF, "Put enemies on left in sorted playerlist",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
460 &robsort,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
461 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
462 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
463 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
464 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
465 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
466 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
467 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
468 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
469 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
470 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
471 "hideNoKills", BOOL_DEF, "Replace 0.00 kills with spaces",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
472 &hideNoKills,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
473 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
474 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
475 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
476 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
477 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
478 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
479 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
480 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
481 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
482 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
483 "showDead", BOOL_DEF, "Show dead in playerlist",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
484 &showDead,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
485 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
486 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
487 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
488 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
489 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
490 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
491 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
492 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
493 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
494 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
495 "showPreLogins", BOOL_DEF, "Show pre-logins in playerlist",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
496 &showPreLogins,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
497 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
498 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
499 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
500 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
501 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
502 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
503 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
504 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
505 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
506 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
507 "sortOutfitting", BOOL_DEF, "Sort outfitting ('--') to bottom",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
508 &sortOutfitting,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
509 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
510 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
511 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
512 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
513 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
514 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
515 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
516 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
517 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
518 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
519 "timerType", INT_DEF, "Type of timer to use",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
520 &timerType,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
521 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
522 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
523 0, NULL, "no timer"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
524 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
525 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
526 1, NULL, "time of day"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
527 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
528 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
529 2, NULL, "time on server"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
530 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
531 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
532 3, NULL, "time in ship"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
533 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
534 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
535 4, NULL, "user set timer"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
536 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
537 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
538 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
539 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
540 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
541 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
542 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
543 "showGalactic", INT_DEF, "Galactic planet bitmaps",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
544 &showgalactic,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
545 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
546 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
547 0, NULL, "show nothing on galactic map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
548 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
549 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
550 1, NULL, "show facilities on galactic map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
551 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
552 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
553 2, NULL, "show owner on galactic map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
554 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
555 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
556 3, NULL, "show surface properties on galactic map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
557 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
558 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
559 4, NULL, "show scout info age on galactic map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
560 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
561 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
562 5, NULL, "show MOO facilities on galactic map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
563 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
564 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
565 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
566 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
567 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
568 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
569 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
570 "showLocal", INT_DEF, "Local planet bitmaps",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
571 &showlocal,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
572 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
573 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
574 0, NULL, "show nothing on local map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
575 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
576 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
577 1, NULL, "show facilities on local map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
578 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
579 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
580 2, NULL, "show owner on local map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
581 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
582 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
583 3, NULL, "show surface properties on local map"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
584 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
585 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
586 4, NULL, "show MOO facilities"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
587 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
588 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
589 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
590 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
591 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
592 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
593 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
594 "name", STR_DEF, "Default player name",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
595 &(name),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
596 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
597 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
598 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
599 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
600 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
601 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
602 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
603 "keymap", STR_DEF, "Keyboard map",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
604 &(keymap),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
605 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
606 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
607 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
608 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
609 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
610 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
611 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
612 "buttonmap", STR_DEF, "Mouse button map",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
613 &(bmap),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
614 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
615 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
616 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
617 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
618 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
619 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
620 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
621 "nameMode", BOOL_DEF, "Show names on map/local",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
622 &namemode,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
623 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
624 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
625 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
626 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
627 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
628 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
629 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
630 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
631 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
632 #ifdef SHORT_PACKETS
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
633 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
634 "tryShort", BOOL_DEF, "Try SHORT-PACKETS at startup",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
635 &tryShort,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
636 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
637 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
638 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
639 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
640 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
641 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
642 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
643 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
644 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
645 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
646 #ifdef IGNORE_SIGNALS_SEGV_BUS
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
647 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
648 "ignoreSignals", BOOL_DEF, "Ignore SIGSEGV and SIGBUS",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
649 &ignore_signals,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
650 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
651 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
652 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
653 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
654 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
655 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
656 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
657 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
658 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
659 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
660 #ifdef SHIFTED_MOUSE
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
661 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
662 "shiftedMouse", BOOL_DEF, "More mouse buttons with shift",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
663 &extended_mouse,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
664 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
665 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
666 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
667 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
668 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
669 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
670 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
671 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
672 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
673 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
674 #ifdef BEEPLITE
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
675 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
676 "UseLite", BOOL_DEF, "Use message highliting",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
677 &UseLite,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
678 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
679 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
680 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
681 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
682 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
683 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
684 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
685 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
686 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
687 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
688 "DefLite", BOOL_DEF, "Use default lites",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
689 &DefLite,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
690 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
691 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
692 0, NULL, ""
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
693 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
694 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
695 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
696 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
697 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
698 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
699 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
700 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
701 "saveFileName", STR_DEF, "Name to save defaults as(click here)",
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
702 &(saveFileName),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
703 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
704 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
705 0, NULL, NULL
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
706 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
707 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
708 },
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
709 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
710
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
711 char *
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
712 itos(v)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
713 int v;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
714 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
715 static char value[10];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
716 sprintf(value, "%d", v);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
717 return value;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
718 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
719
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
720 char *
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
721 btoa(v)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
722 int v;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
723 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
724 if (v)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
725 return "on";
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
726 else
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
727 return "off";
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
728 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
729
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
730 static void
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
731 def_redraw(d)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
732 struct def *d;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
733 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
734 int xo = d->loc.x, yo = d->loc.y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
735 int x, y, j;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
736 char *val;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
737 W_Color col;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
738
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
739 x = xo;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
740 y = yo;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
741
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
742 W_ClearArea(defWin, d->loc.x, d->loc.y, d->loc.rt - d->loc.x, d->loc.bot - d->loc.y);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
743
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
744 W_WriteText(defWin, x, y, W_Yellow, d->name, strlen(d->name),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
745 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
746 x += NAME_WIDTH;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
747
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
748 W_WriteText(defWin, x, y, textColor, d->desc, strlen(d->desc),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
749 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
750 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
751 x = xo + INDENT;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
752
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
753 if (d->type != STR_DEF) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
754 if (!d->values[0].desc && d->variable) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
755 if (d->type == SINT_DEF)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
756 val = itos(*(int *)d->variable);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
757 else
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
758 val = itos(d->values[0].i_value);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
759
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
760 W_WriteText(defWin, x, y, W_Green, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
761 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
762 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
763 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
764 for (j = 0; d->values[j].desc; j++) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
765 switch (d->type) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
766 case INT_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
767 val = itos(d->values[j].i_value);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
768 if (d->values[j].i_value == *(int *)d->variable) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
769 col = W_Green;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
770
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
771 W_WriteText(defWin, x, y, col, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
772 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
773 if (W_Mono()) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
774 W_WriteText(defWin, x + 1, y, col, "*", 1,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
775 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
776 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
777 } else {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
778 col = textColor;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
779
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
780 W_WriteText(defWin, x, y, col, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
781 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
782 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
783 x = xo + NAME_WIDTH;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
784 W_WriteText(defWin, x, y, col, d->values[j].desc,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
785 strlen(d->values[j].desc), W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
786 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
787 x = xo + INDENT;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
788 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
789
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
790 case BOOL_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
791 val = btoa(*(int *)d->variable);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
792 W_WriteText(defWin, x, y, W_Green, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
793 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
794 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
795 x = xo + INDENT;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
796 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
797 default:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
798 fprintf(stderr, "Unknown type.\n");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
799 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
800 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
801 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
802 } else if (d->variable && *(int *)d->variable) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
803 W_WriteText(defWin, x, y, W_Green, (char *)*(int *)d->variable,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
804 strlen((char *)(*(int *)d->variable)),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
805 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
806 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
807 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
808
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
809
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
810 void
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
811 showdef()
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
812 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
813 register i, j, x = 0, y = 0, xo = 0, yo = 0, max_desc = 0, height = 1, width = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
814 register struct def *d;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
815 char *val;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
816 W_Color col;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
817
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
818 name = getdefault("name");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
819 keymap = getdefault("keymap");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
820 /* plist = getdefault ("playerlist");*/
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
821 cloak_chars = cloakchars;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
822 bmap = getdefault("buttonmap");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
823 log_file = getdefault("logfile");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
824 galacticFrequent = (mapmode == 2) ? 0 : 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
825 if (!saveFileName) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
826 saveFileName = stringDefault("saveFileName", "~/.paradisesaverc");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
827 saveFileName = expandFilename(saveFileName);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
828 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
829 if (!defWin)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
830 defWin = W_MakeTextWindow("xtrekrc_help", 1, 100, 174, 60, NULL, NULL, BORDER);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
831
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
832 for (i = 0, d = def_messages; i < DEFMESSAGES; i++, d++) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
833 x = xo;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
834 y = yo;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
835
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
836 d->loc.x = x;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
837 d->loc.y = y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
838
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
839 W_WriteText(defWin, x, y, W_Yellow, d->name, strlen(d->name),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
840 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
841 x += NAME_WIDTH;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
842
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
843 W_WriteText(defWin, x, y, textColor, d->desc, strlen(d->desc),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
844 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
845 if ((int)strlen(d->desc) > max_desc) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
846 max_desc = strlen(d->desc);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
847 width = MAX(width, x + max_desc);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
848 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
849 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
850 x = xo + INDENT;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
851
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
852 if (d->type != STR_DEF) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
853 if (!d->values[0].desc && d->variable) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
854 if (d->type == SINT_DEF)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
855 val = itos(*(int *)d->variable);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
856 else
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
857 val = itos(d->values[0].i_value);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
858
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
859 W_WriteText(defWin, x, y, W_Green, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
860 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
861 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
862 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
863 for (j = 0; d->values[j].desc; j++) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
864 switch (d->type) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
865 case INT_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
866 val = itos(d->values[j].i_value);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
867 if (d->values[j].i_value == *(int *)d->variable) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
868 col = W_Green;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
869
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
870 W_WriteText(defWin, x, y, col, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
871 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
872 if (W_Mono()) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
873 W_WriteText(defWin, x + 1, y, col, "*", 1,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
874 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
875 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
876 } else {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
877 col = textColor;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
878
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
879 W_WriteText(defWin, x, y, col, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
880 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
881 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
882 x = xo + NAME_WIDTH;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
883 W_WriteText(defWin, x, y, col, d->values[j].desc,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
884 strlen(d->values[j].desc), W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
885 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
886 x = xo + INDENT;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
887 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
888
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
889 case BOOL_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
890 val = btoa(*(int *)d->variable);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
891 W_WriteText(defWin, x, y, W_Green, val, strlen(val),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
892 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
893 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
894 x = xo + INDENT;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
895 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
896 default:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
897 fprintf(stderr, "Unknown type.\n");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
898 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
899 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
900 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
901 } else if (d->variable && *(int *)d->variable) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
902 W_WriteText(defWin, x, y, W_Green, (char *)*(int *)d->variable,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
903 strlen((char *)(*(int *)d->variable)),
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
904 W_RegularFont);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
905 y++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
906 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
907 d->loc.rt = xo + max_desc;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
908 d->loc.bot = y + 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
909
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
910 height = MAX(height, y);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
911 if (y > MAX_VLINES) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
912 yo = 0;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
913 xo += NAME_WIDTH + max_desc + 2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
914 max_desc = 0;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
915 } else {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
916 yo = y + 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
917 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
918 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
919
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
920 if (!W_IsMapped(defWin)) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
921 W_ResizeText(defWin, width, height);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
922 W_MapWindow(defWin);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
923 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
924 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
925
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
926 void
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
927 def_action(ev)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
928 W_Event *ev;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
929 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
930 int i, j, x, y, line;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
931 register struct def *d;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
932 char buf[100];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
933
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
934 x = ev->x;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
935 y = ev->y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
936 W_TranslatePoints(ev->Window, &x, &y);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
937
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
938 for (i = 0, d = def_messages; i < DEFMESSAGES; i++, d++) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
939 if (y >= d->loc.y && y < d->loc.bot &&
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
940 x >= d->loc.x && x < d->loc.rt)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
941 break; /* found it! */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
942 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
943
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
944 if (i >= DEFMESSAGES)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
945 return;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
946
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
947 line = y - d->loc.y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
948
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
949 switch (ev->type) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
950 case W_EV_BUTTON:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
951 switch (d->type) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
952 case BOOL_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
953 *(int *)d->variable = !(*(int *)d->variable);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
954 def_redraw(d);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
955 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
956 case INT_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
957 case SINT_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
958 if (line == 0 || d->type == SINT_DEF) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
959 switch (ev->key) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
960 case W_LBUTTON:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
961 (*(int *)d->variable)++;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
962 if (!(*(int *)d->values[*(int *)d->variable].desc))
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
963 *(int *)d->variable = 0;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
964 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
965 case W_RBUTTON:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
966 (*(int *)d->variable)--;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
967 if (*(int *)d->variable < 0) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
968 for (j = 0; d->values[j].desc; j++)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
969 /* empty */ ;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
970 *(int *)d->variable = j - 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
971 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
972 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
973 case W_MBUTTON:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
974 *(int *)d->variable = 0;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
975 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
976 default:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
977 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
978 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
979 } else if (y < d->loc.bot)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
980 *(int *)d->variable = line - 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
981 def_redraw(d);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
982 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
983 case STR_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
984 if (d->variable == &saveFileName)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
985 def_write(saveFileName);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
986 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
987 default:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
988 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
989 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
990 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
991 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
992
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
993 void
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
994 def_write(file)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
995 char *file;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
996 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
997 int i;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
998 struct def *d;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
999 FILE *f;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1000
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1001 f = fopen(file, "w");
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1002
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1003
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1004 for (i = 0, d = def_messages; i < DEFMESSAGES; i++, d++) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1005 switch (d->type) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1006 case INT_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1007 case SINT_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1008 fprintf(f, "%s: %d\n", d->name, *(int *)d->variable);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1009 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1010 case BOOL_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1011 fprintf(f, "%s: %s\n", d->name, (*(int *)d->variable ? "on" : "off"));
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1012 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1013 case STR_DEF:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1014 fprintf(f, "%s: %s\n", d->name, (char *)*(int *)d->variable);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1015 break;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1016 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1017 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1018
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1019 fclose(f);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1020 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1021
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1022
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1023 #endif