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