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