]> git.pond.sub.org Git - empserver/blob - src/lib/global/symbol.c
Remove option SLOW_WAR
[empserver] / src / lib / global / symbol.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2010, 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 files README, COPYING and CREDITS in the root of the source
23  *  tree for related information and legal notices.  It is expected
24  *  that future projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  symbol.c: Empire symbol tables
29  *
30  *  Known contributors to this file:
31  *     Markus Armbruster, 2006-2009
32  */
33
34 #include <config.h>
35
36 #include "land.h"
37 #include "misc.h"
38 #include "mission.h"
39 #include "nat.h"
40 #include "news.h"
41 #include "nsc.h"
42 #include "nuke.h"
43 #include "plague.h"
44 #include "plane.h"
45 #include "retreat.h"
46 #include "sect.h"
47 #include "ship.h"
48 #include "treaty.h"
49
50 struct symbol agreement_statuses[] = {
51     {AGREE_FREE, "free"},
52     {AGREE_PROPOSED, "proposed"},
53     {AGREE_SIGNED, "signed"},
54     {0, NULL}
55 };
56
57 struct symbol land_chr_flags[] = {
58     {L_ENGINEER, "engineer"},
59     {L_SUPPLY, "supply"},
60     {L_SECURITY, "security"},
61     {L_LIGHT, "light"},
62     {L_MARINE, "marine"},
63     {L_RECON, "recon"},
64     {L_RADAR, "radar"},
65     {L_ASSAULT, "assault"},
66     {L_FLAK, "flak"},
67     {L_SPY, "spy"},
68     {L_TRAIN, "train"},
69     {L_HEAVY, "heavy"},
70     {0, NULL}
71 };
72
73 struct symbol level[] = {
74     {-1, "none"},
75     {NAT_TLEV, "technology"},
76     {NAT_RLEV, "research"},
77     {NAT_ELEV, "education"},
78     {NAT_HLEV, "happiness"},
79     {0, NULL}
80 };
81
82 struct symbol meta_flags[] = {
83     {NSC_DEITY, "deity"},
84     {NSC_EXTRA, "extra"},
85     {NSC_CONST, "const"},
86     {NSC_BITS, "bits"},
87     {0, NULL}
88 };
89
90 struct symbol meta_type[] = {
91     {NSC_LONG, "d"},
92     {NSC_DOUBLE, "g"},
93     {NSC_STRING, "s"},
94     {NSC_CHAR, "d"},
95     {NSC_UCHAR, "d"},
96     {NSC_SHORT, "d"},
97     {NSC_USHORT, "d"},
98     {NSC_INT, "d"},
99     {NSC_XCOORD, "d"},
100     {NSC_YCOORD, "d"},
101     {NSC_HIDDEN, "d"},
102     {NSC_TIME, "d"},
103     {NSC_FLOAT, "g"},
104     {NSC_STRINGY, "c"},
105     {NSC_NOTYPE, NULL}
106 };
107
108 struct symbol missions[] = {
109     {MI_NONE, "none"},
110     {MI_INTERDICT, "interdiction"},
111     {MI_SUPPORT, "support"},
112     {MI_RESERVE, "reserve"},
113     {MI_ESCORT, "escort"},
114     {MI_AIR_DEFENSE, "air defense"},
115     {MI_DSUPPORT, "defensive support"},
116     {MI_OSUPPORT, "offensive support"},
117     {0, NULL}
118 };
119
120 struct symbol nation_flags[] = {
121     {NF_INFORM, "inform"},
122     {NF_FLASH, "flash"},
123     {NF_BEEP, "beep"},
124     {NF_COASTWATCH, "coastwatch"},
125     {NF_SONAR, "sonar"},
126     {NF_TECHLISTS, "techlists"},
127     {NF_SACKED, "sacked"},
128     {0, NULL}
129 };
130
131 struct symbol nation_rejects[] = {
132     {REJ_TELE, "telegrams"},
133     {REJ_TREA, "treaties"},
134     {REJ_ANNO, "announcements"},
135     {REJ_LOAN, "loans"},
136     {0, NULL}
137 };
138
139 struct symbol nation_relations[] = {
140     {-1, "unknown"},
141     {AT_WAR, "at-war"},
142     {HOSTILE, "hostile"},
143     {NEUTRAL, "neutral"},
144     {FRIENDLY, "friendly"},
145     {ALLIED, "allied"},
146     {0, NULL}
147 };
148
149 struct symbol nation_status[] = {
150     {STAT_UNUSED, "unused"},
151     {STAT_NEW, "new"},
152     {STAT_VIS, "visitor"},
153     {STAT_SANCT, "sanctuary"},
154     {STAT_ACTIVE, "active"},
155     {STAT_GOD, "deity"},
156     {0, NULL}
157 };
158
159 struct symbol nuke_chr_flags[] = {
160     {N_NEUT, "neutron"},
161     {0, NULL}
162 };
163
164 struct symbol packing[] = {
165     {IPKG, "inefficient"},
166     {NPKG, "normal"},
167     {WPKG, "warehouse"},
168     {UPKG, "urban"},
169     {BPKG, "bank"},
170     {0, NULL}
171 };
172
173 struct symbol page_headings[] = {
174     {N_NOTUSED, "Comics"},
175     {N_FOR, "Foreign Affairs"},
176     {N_FRONT, "The Front Line"},
177     {N_SEA, "The High Seas"},
178     {N_SKY, "Sky Watch"},
179     {N_MISS, "Guidance Systems"},
180     {N_ARTY, "Firestorms"},
181     {N_ECON, "Business & Economics"},
182     {N_COLONY, "The Frontier"},
183     {N_HOME, "The Home Front"},
184     {N_SPY, "Espionage"},
185     {N_TELE, "Telecommunications"},
186     {0, NULL}
187 };
188
189 struct symbol plague_stages[] = {
190     {PLG_HEALTHY, "healthy"},
191     {PLG_DYING, "dying"},
192     {PLG_INFECT, "infect"},
193     {PLG_INCUBATE, "incubate"},
194     {PLG_EXPOSED, "exposed"},
195     {0, NULL}
196 };
197
198 struct symbol plane_chr_flags[] = {
199     {P_T, "tactical"},
200     {P_B, "bomber"},
201     {P_F, "intercept"},
202     {P_C, "cargo"},
203     {P_V, "VTOL"},
204     {P_M, "missile"},
205     {P_L, "light"},
206     {P_S, "spy"},
207     {P_I, "image"},
208     {P_O, "satellite"},
209     {P_N, "SDI"},
210     {P_E, "x-light"},
211     {P_K, "helo"},
212     {P_A, "ASW"},
213     {P_P, "para"},
214     {P_ESC, "escort"},
215     {P_MINE, "mine"},
216     {P_SWEEP, "sweep"},
217     {P_MAR, "marine"},
218     {0, NULL}
219 };
220
221 struct symbol plane_flags[] = {
222     {PLN_LAUNCHED, "launched"},
223     {PLN_SYNCHRONOUS, "synchronous"},
224     {PLN_AIRBURST, "airburst"},
225     {0, NULL}
226 };
227
228 struct symbol resources[] = {
229     /* names should match resource selector names in sect_ca[] */
230     {0, "none"},
231     {offsetof(struct sctstr, sct_min), "min"},
232     {offsetof(struct sctstr, sct_gmin), "gold"},
233     {offsetof(struct sctstr, sct_fertil), "fert"},
234     {offsetof(struct sctstr, sct_oil), "ocontent"},
235     {offsetof(struct sctstr, sct_uran), "uran"},
236     {0, NULL}
237 };
238
239 struct symbol retreat_flags[] = {
240     {RET_GROUP, "group"},
241     {RET_INJURED, "injured"},
242     {RET_TORPED, "torped"},
243     {RET_SONARED, "sonared"},
244     {RET_HELPLESS, "helpless"},
245     {RET_BOMBED, "bombed"},
246     {RET_DCHRGED, "depth-charged"},
247     {RET_BOARDED, "boarded"},
248     {0, NULL}
249 };
250
251 struct symbol sector_navigation[] = {
252     {NAV_NONE, "land"},
253     {NAVOK, "sea"},
254     {NAV_02, "harbor"},
255     {NAV_CANAL, "canal"},
256     {NAV_60, "bridge"},
257     {0, NULL}
258 };
259
260 struct symbol ship_chr_flags[] = {
261     {M_FOOD, "fish"},
262     {M_TORP, "torp"},
263     {M_DCH, "dchrg"},
264     {M_FLY, "plane"},
265     {M_MSL, "miss"},
266     {M_OIL, "oil"},
267     {M_SONAR, "sonar"},
268     {M_MINE, "mine"},
269     {M_SWEEP, "sweep"},
270     {M_SUB, "sub"},
271     {M_LAND, "land"},
272     {M_SUBT, "sub-torp"},
273     {M_TRADE, "trade"},
274     {M_SEMILAND, "semi-land"},
275     {M_SUPPLY, "supply"},
276     {M_CANAL, "canal"},
277     {M_ANTIMISSILE, "anti-missile"},
278     {0, NULL}
279 };
280
281 struct symbol treaty_flags[] = {
282     {LNDATT, "no attacks on any land units"},
283     {SEAATT, "no attacks on any ships"},
284     {SEAFIR, "no shelling any ships"},
285     {SUBFIR, "no depth-charging any subs"},
286     {LANATT, "no sector attacks"},
287     {LANFIR, "no shelling any land"},
288     {NEWSHP, "no building ships"},
289     {NEWNUK, "no new nuclear weapons"},
290     {NEWPLN, "no building planes"},
291     {NEWLND, "no building land units"},
292     {TRTENL, "no enlistment"},
293     {0, NULL}
294 };