]> git.pond.sub.org Git - empserver/blob - src/lib/global/symbol.c
(nsc_type): New member NSC_HIDDEN.
[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_HIDDEN, "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     {-1, "unknown"},
129     {AT_WAR, "at-war"},
130     {SITZKRIEG, "sitzkrieg"},
131     {MOBILIZATION, "mobilization"},
132     {HOSTILE, "hostile"},
133     {NEUTRAL, "neutral"},
134     {FRIENDLY, "friendly"},
135     {ALLIED, "allied"},
136     {0, NULL}
137 };
138
139 struct symbol nation_status[] = {
140     {STAT_UNUSED, "unused"},
141     {STAT_NEW,  "new"},
142     {STAT_VIS, "visitor"},
143     {STAT_SANCT, "sanctuary"},
144     {STAT_ACTIVE, "active"},
145     {STAT_GOD, "deity"},
146     {0, NULL}
147 };
148
149 struct symbol nuke_chr_flags[] = {
150     {N_NEUT, "neutron"},
151     {0, NULL}
152 };
153
154 struct symbol packing[] = {
155     {IPKG, "inefficient"},
156     {NPKG, "normal"},
157     {WPKG, "warehouse"},
158     {UPKG, "urban"},
159     {BPKG, "bank"},
160     {0, NULL}
161 };
162
163 struct symbol page_headings[] = {
164     {N_NOTUSED, "Comics"},
165     {N_FOR, "Foreign Affairs"},
166     {N_FRONT, "The Front Line"},
167     {N_SEA, "The High Seas"},
168     {N_SKY, "Sky Watch"},
169     {N_MISS, "Guidance Systems"},
170     {N_ARTY, "Firestorms"},
171     {N_ECON, "Business & Economics"},
172     {N_COLONY, "The Frontier"},
173     {N_HOME, "The Home Front"},
174     {N_SPY, "Espionage"},
175     {N_TELE, "Telecommunications"},
176     {0, NULL}
177 };
178
179 struct symbol plague_stages[] = {
180     {PLG_HEALTHY, "healthy"},
181     {PLG_DYING, "dying"},
182     {PLG_INFECT, "infect"},
183     {PLG_INCUBATE, "incubate"},
184     {PLG_EXPOSED, "exposed"},
185     {0, NULL}
186 };
187
188 struct symbol plane_chr_flags[] = {
189     {P_T, "tactical"},
190     {P_B, "bomber"},
191     {P_F, "intercept"},
192     {P_C, "cargo"},
193     {P_V, "VTOL"},
194     {P_M, "missile"},
195     {P_L, "light"},
196     {P_S, "spy"},
197     {P_I, "image"},
198     {P_O, "satellite"},
199     {P_X, "stealth"},
200     {P_N, "SDI"},
201     {P_H, "half-stealth"},
202     {P_E, "x-light"},
203     {P_K, "helo"},
204     {P_A, "ASW"},
205     {P_P, "para"},
206     {P_ESC, "escort"},
207     {P_MINE, "mine"},
208     {P_SWEEP, "sweep"},
209     {P_MAR, "marine"},
210     {0, NULL}
211 };
212
213 struct symbol plane_flags[] = {
214     {PLN_LAUNCHED, "launched"},
215     {PLN_SYNCHRONOUS, "synchronous"},
216     {PLN_AIRBURST, "airbust"},
217     {0, NULL}
218 };
219
220 struct symbol resources[] = {
221     /* names should match resource selector names in sect_ca[] */
222     {0, "none"},
223     {offsetof(struct sctstr, sct_min), "min"},
224     {offsetof(struct sctstr, sct_gmin), "gold"},
225     {offsetof(struct sctstr, sct_fertil), "fert"},
226     {offsetof(struct sctstr, sct_oil), "ocontent"},
227     {offsetof(struct sctstr, sct_uran), "uran"},
228     {0, NULL}
229 };
230
231 struct symbol retreat_flags[] = {
232     {RET_GROUP, "group"},
233     {RET_INJURED, "injured"},
234     {RET_TORPED, "torped"},
235     {RET_SONARED, "sonared"},
236     {RET_HELPLESS, "helpless"},
237     {RET_BOMBED, "bombed"},
238     {RET_DCHRGED, "depth-charged"},
239     {RET_BOARDED, "boarded"},
240     {0, NULL}
241 };
242
243 struct symbol sector_navigation[] = {
244     {NAV_NONE, "land"},
245     {NAVOK, "sea"},
246     {NAV_02, "harbor"},
247     {NAV_CANAL, "canal"},
248     {NAV_60, "bridge"},
249     {0, NULL}
250 };
251
252 struct symbol ship_chr_flags[] = {
253     {M_FOOD, "fish"},
254     {M_TORP, "torp"},
255     {M_DCH, "dchrg"},
256     {M_FLY, "plane"},
257     {M_MSL, "miss"},
258     {M_OIL, "oil"},
259     {M_SONAR, "sonar"},
260     {M_MINE, "mine"},
261     {M_SWEEP, "sweep"},
262     {M_SUB, "sub"},
263     {M_LAND, "land"},
264     {M_SUBT, "sub-torp"},
265     {M_TRADE, "trade"},
266     {M_SEMILAND, "semi-land"},
267     {M_OILER, "oiler"},
268     {M_SUPPLY, "supply"},
269     {M_CANAL, "canal"},
270     {M_ANTIMISSILE, "anti-missile"},
271     {0, NULL}
272 };
273
274 struct symbol treaty_flags[] = {
275     {LNDATT, "no attacks on any land units"},
276     {SEAATT, "no attacks on any ships"},
277     {SEAFIR, "no shelling any ships"},
278     {SUBFIR, "no depth-charging any subs"},
279     {LANATT, "no sector attacks"},
280     {LANFIR, "no shelling any land"},
281     {NEWSHP, "no building ships"},
282     {NEWNUK, "no new nuclear weapons"},
283     {NEWPLN, "no building planes"},
284     {NEWLND, "no building land units"},
285     {TRTENL, "no enlistment"},
286     {0, NULL}
287 };