]> git.pond.sub.org Git - empserver/blob - src/lib/global/options.c
Import of Empire 4.2.12
[empserver] / src / lib / global / options.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
4  *                           Ken Stevens, Steve McClure
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  *  ---
21  *
22  *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
23  *  related information and legal notices. It is expected that any future
24  *  projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  options.c: Options definitions
29  * 
30  *  Known contributors to this file:
31  *       Steve McClure, 1998
32  *     
33  */
34
35 #include <stdio.h>
36 #include "misc.h"
37 #include "options.h"
38 #include "optlist.h"
39
40 /* there must be an easier way - but can't think of one off hand */
41
42 #ifdef NO_FORT_FIRE
43 int opt_NO_FORT_FIRE = 1;
44 #else
45 int opt_NO_FORT_FIRE = 0;
46 #endif
47
48 #ifdef BRIDGETOWERS
49 int opt_BRIDGETOWERS = 1;
50 #else
51 int opt_BRIDGETOWERS = 0;
52 #endif
53
54 #ifdef GODNEWS
55 int opt_GODNEWS = 1;
56 #else
57 int opt_GODNEWS = 0;
58 #endif
59
60 #ifdef TREATIES
61 int opt_TREATIES = 1;
62 #else
63 int opt_TREATIES = 0;
64 #endif
65
66 #ifdef GO_RENEW
67 int opt_GO_RENEW = 1;
68 #else
69 int opt_GO_RENEW = 0;
70 #endif
71
72 #ifdef DEFENSE_INFRA
73 int opt_DEFENSE_INFRA = 1;
74 #else
75 int opt_DEFENSE_INFRA = 0;
76 #endif
77
78 #ifdef SHIP_DECAY
79 int opt_SHIP_DECAY = 1;
80 #else
81 int opt_SHIP_DECAY = 0;
82 #endif
83
84 #ifdef NO_HCMS
85 int opt_NO_HCMS = 1;
86 #else
87 int opt_NO_HCMS = 0;
88 #endif
89
90 #ifdef NO_LCMS
91 int opt_NO_LCMS = 1;
92 #else
93 int opt_NO_LCMS = 0;
94 #endif
95
96 #ifdef NO_OIL
97 int opt_NO_OIL = 1;
98 #else
99 int opt_NO_OIL = 0;
100 #endif
101
102 #ifdef PLANENAMES
103 int opt_PLANENAMES = 1;
104 #else
105 int opt_PLANENAMES = 0;
106 #endif
107
108 #ifdef LANDSPIES
109 int opt_LANDSPIES = 1;
110 #else
111 int opt_LANDSPIES = 0;
112 #endif
113
114 #ifdef MOB_ACCESS
115 int opt_MOB_ACCESS = 1;
116 #else
117 int opt_MOB_ACCESS = 0;
118 #endif
119
120 #ifdef LOANS
121 int opt_LOANS = 1;
122 #else
123 int opt_LOANS = 0;
124 #endif
125
126 #ifdef MARKET
127 int opt_MARKET = 1;
128 #else
129 int opt_MARKET = 0;
130 #endif
131
132 #ifdef NOFOOD
133 int opt_NOFOOD = 1;
134 #else
135 int opt_NOFOOD = 0;
136 #endif
137
138 #ifdef SNEAK_ATTACK
139 int opt_SNEAK_ATTACK = 1;
140 #else
141 int opt_SNEAK_ATTACK = 0;
142 #endif
143
144 #ifdef BLITZ
145 int opt_BLITZ = 1;
146 #else
147 int opt_BLITZ = 0;
148 #endif
149
150 #ifdef HIDDEN
151 int opt_HIDDEN = 1;
152 #else
153 int opt_HIDDEN = 0;
154 #endif
155
156 #ifdef LOSE_CONTACT
157 int opt_LOSE_CONTACT = 1;
158 #else
159 int opt_LOSE_CONTACT = 0;
160 #endif
161
162 #ifdef NONUKES
163 int opt_NONUKES = 1;
164 #else
165 int opt_NONUKES = 0;
166 #endif
167
168 #ifdef FUEL
169 int opt_FUEL = 1;
170 #else
171 int opt_FUEL = 0;
172 #endif
173
174 #ifdef TRADESHIPS
175 int opt_TRADESHIPS = 1;
176 #else
177 int opt_TRADESHIPS = 0;
178 #endif
179
180 #ifdef NEWPOWER
181 int opt_NEWPOWER = 1;
182 #else
183 int opt_NEWPOWER = 0;
184 #endif
185
186 #ifdef NOMOBCOST
187 int opt_NOMOBCOST = 1;
188 #else
189 int opt_NOMOBCOST = 0;
190 #endif
191
192 #ifdef SUPER_BARS
193 int opt_SUPER_BARS = 1;
194 #else
195 int opt_SUPER_BARS = 0;
196 #endif
197
198 #ifdef EASY_BRIDGES
199 int opt_EASY_BRIDGES = 1;
200 #else
201 int opt_EASY_BRIDGES = 0;
202 #endif
203
204 #ifdef ALL_BLEED
205 int opt_ALL_BLEED = 1;
206 #else
207 int opt_ALL_BLEED = 0;
208 #endif
209
210 #ifdef DRNUKE
211 int opt_DRNUKE = 1;
212 #else
213 int opt_DRNUKE = 0;
214 #endif
215
216 #ifdef SLOW_WAR
217 int opt_SLOW_WAR = 1;
218 #else
219 int opt_SLOW_WAR = 0;
220 #endif
221
222 #ifdef NO_PLAGUE
223 int opt_NO_PLAGUE = 1;
224 #else
225 int opt_NO_PLAGUE = 0;
226 #endif
227
228 #ifdef NEW_STARVE
229 int opt_NEW_STARVE = 1;
230 #else
231 int opt_NEW_STARVE = 0;
232 #endif
233
234 #ifdef NEW_WORK
235 int opt_NEW_WORK = 1;
236 #else
237 int opt_NEW_WORK = 0;
238 #endif
239
240 #ifdef RES_POP
241 int opt_RES_POP = 1;
242 #else
243 int opt_RES_POP = 0;
244 #endif
245
246 #ifdef GRAB_THINGS
247 int opt_GRAB_THINGS = 1;
248 #else
249 int opt_GRAB_THINGS = 0;
250 #endif
251
252 #ifdef SHOWPLANE
253 int opt_SHOWPLANE = 1;
254 #else
255 int opt_SHOWPLANE = 0;
256 #endif
257
258 #ifdef ORBIT
259 int opt_ORBIT = 1;
260 #else
261 int opt_ORBIT = 0;
262 #endif
263
264 #ifdef PINPOINTMISSILE
265 int opt_PINPOINTMISSILE = 1;
266 #else
267 int opt_PINPOINTMISSILE = 0;
268 #endif
269
270 #ifdef FALLOUT
271 int opt_FALLOUT = 1;
272 #else
273 int opt_FALLOUT = 0;
274 #endif
275
276 #ifdef SAIL
277 int opt_SAIL = 1;
278 #else
279 int opt_SAIL = 0;
280 #endif
281
282 #ifdef NUKEFAILDETONATE
283 int opt_NUKEFAILDETONATE = 1;
284 #else
285 int opt_NUKEFAILDETONATE = 0;
286 #endif
287
288 #ifdef SHIPNAMES
289 int opt_SHIPNAMES = 1;  /* not used currently */
290 #else
291 int opt_SHIPNAMES = 0;  /* not used currently */
292 #endif
293
294 #ifdef NEUTRON
295 int opt_NEUTRON = 1;
296 #else
297 int opt_NEUTRON = 0;
298 #endif
299
300 #ifdef UPDATESCHED
301 int opt_UPDATESCHED = 1;
302 #else
303 int opt_UPDATESCHED = 0;
304 #endif
305
306 #ifdef DEMANDUPDATE
307 int opt_DEMANDUPDATE = 1;
308 #else
309 int opt_DEMANDUPDATE = 0;
310 #endif
311
312 #ifdef BIG_CITY
313 int opt_BIG_CITY = 1;
314 #else
315 int opt_BIG_CITY = 0;
316 #endif
317
318 #ifdef INTERDICT_ATT
319 int opt_INTERDICT_ATT = 1;
320 #else
321 int opt_INTERDICT_ATT = 0;
322 #endif
323
324 #ifdef TECH_POP
325 int opt_TECH_POP = 1;
326 #else
327 int opt_TECH_POP = 0;
328 #endif
329
330 struct option_list Options[] = {
331 { "ALL_BLEED",          &opt_ALL_BLEED },
332 { "BIG_CITY",           &opt_BIG_CITY },
333 { "BLITZ",              &opt_BLITZ },
334 { "BRIDGETOWERS",       &opt_BRIDGETOWERS },
335 { "DEFENSE_INFRA",      &opt_DEFENSE_INFRA },
336 { "DEMANDUPDATE",       &opt_DEMANDUPDATE },
337 { "DRNUKE",             &opt_DRNUKE },
338 { "EASY_BRIDGES",       &opt_EASY_BRIDGES },
339 { "FALLOUT",            &opt_FALLOUT },
340 { "FUEL",               &opt_FUEL },
341 { "GODNEWS",            &opt_GODNEWS },
342 { "GO_RENEW",           &opt_GO_RENEW },
343 { "GRAB_THINGS",        &opt_GRAB_THINGS },
344 { "HIDDEN",             &opt_HIDDEN },
345 { "INTERDICT_ATT",      &opt_INTERDICT_ATT },
346 { "LANDSPIES",          &opt_LANDSPIES },
347 { "LOANS",              &opt_LOANS },
348 { "LOSE_CONTACT",       &opt_LOSE_CONTACT },
349 { "MARKET",             &opt_MARKET },
350 { "MOB_ACCESS",         &opt_MOB_ACCESS },
351 { "NEUTRON",            &opt_NEUTRON },
352 { "NEW_STARVE",         &opt_NEW_STARVE },
353 { "NEW_WORK",           &opt_NEW_WORK },
354 { "NEWPOWER",           &opt_NEWPOWER },
355 { "NO_FORT_FIRE",   &opt_NO_FORT_FIRE },
356 { "NO_HCMS",            &opt_NO_HCMS },
357 { "NO_LCMS",            &opt_NO_LCMS },
358 { "NO_OIL",             &opt_NO_OIL },
359 { "NO_PLAGUE",          &opt_NO_PLAGUE },
360 { "NOFOOD",             &opt_NOFOOD },
361 { "NOMOBCOST",          &opt_NOMOBCOST },
362 { "NONUKES",            &opt_NONUKES },
363 { "NUKEFAILDETONATE",   &opt_NUKEFAILDETONATE },
364 { "ORBIT",              &opt_ORBIT },
365 { "PINPOINTMISSILE",    &opt_PINPOINTMISSILE },
366 { "PLANENAMES",         &opt_PLANENAMES },
367 { "RES_POP",            &opt_RES_POP },
368 { "SAIL",               &opt_SAIL },
369 { "SHIP_DECAY",         &opt_SHIP_DECAY },
370 { "SHIPNAMES",          &opt_SHIPNAMES },
371 { "SHOWPLANE",          &opt_SHOWPLANE },
372 { "SLOW_WAR",           &opt_SLOW_WAR },
373 { "SNEAK_ATTACK",       &opt_SNEAK_ATTACK },
374 { "SUPER_BARS",         &opt_SUPER_BARS },
375 { "TECH_POP",       &opt_TECH_POP },
376 { "TRADESHIPS",         &opt_TRADESHIPS },
377 { "TREATIES",           &opt_TREATIES },
378 { "UPDATESCHED",        &opt_UPDATESCHED },
379 { NULL,                 NULL },
380 };