1 /* 2 * Empire - A multi-player, client/server Internet based war game. 3 * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak, 4 * Ken Stevens, Steve McClure, Markus Armbruster 5 * 6 * Empire 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 3 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, see <http://www.gnu.org/licenses/>. 18 * 19 * --- 20 * 21 * See files README, COPYING and CREDITS in the root of the source 22 * tree for related information and legal notices. It is expected 23 * that future projects/authors will amend these files as needed. 24 * 25 * --- 26 * 27 * symbol.c: Empire symbol tables 28 * 29 * Known contributors to this file: 30 * Markus Armbruster, 2006-2020 31 */ 32 33 #include <config.h> 34 35 #include "land.h" 36 #include "loan.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 49 struct symbol agreement_statuses[] = { 50 {LS_FREE, "free"}, 51 {LS_PROPOSED, "proposed"}, 52 {LS_SIGNED, "signed"}, 53 {0, NULL} 54 }; 55 56 struct symbol land_chr_flags[] = { 57 {L_ENGINEER, "engineer"}, 58 {L_SUPPLY, "supply"}, 59 {L_SECURITY, "security"}, 60 {L_LIGHT, "light"}, 61 {L_MARINE, "marine"}, 62 {L_RECON, "recon"}, 63 {L_RADAR, "radar"}, 64 {L_ASSAULT, "assault"}, 65 {L_FLAK, "flak"}, 66 {L_SPY, "spy"}, 67 {L_TRAIN, "train"}, 68 {L_HEAVY, "heavy"}, 69 {0, NULL} 70 }; 71 72 struct symbol level[] = { 73 {-1, "none"}, 74 {NAT_TLEV, "technology"}, 75 {NAT_RLEV, "research"}, 76 {NAT_ELEV, "education"}, 77 {NAT_HLEV, "happiness"}, 78 {0, NULL} 79 }; 80 81 struct symbol meta_flags[] = { 82 {NSC_DEITY, "deity"}, 83 {NSC_BITS, "bits"}, 84 {NSC_HIDDEN, "hidden"}, 85 {0, NULL} 86 }; 87 88 struct symbol meta_type[] = { 89 {NSC_LONG, "d"}, 90 {NSC_DOUBLE, "g"}, 91 {NSC_STRING, "s"}, 92 {NSC_NOTYPE, NULL} 93 }; 94 95 struct symbol missions[] = { 96 {MI_NONE, "none"}, 97 {MI_INTERDICT, "interdiction"}, 98 {MI_SUPPORT, "support"}, 99 {MI_RESERVE, "reserve"}, 100 {MI_ESCORT, "escort"}, 101 {MI_AIR_DEFENSE, "air defense"}, 102 {MI_DSUPPORT, "defensive support"}, 103 {MI_OSUPPORT, "offensive support"}, 104 {0, NULL} 105 }; 106 107 struct symbol nation_flags[] = { 108 {NF_INFORM, "inform"}, 109 {NF_FLASH, "flash"}, 110 {NF_BEEP, "beep"}, 111 {NF_COASTWATCH, "coastwatch"}, 112 {NF_SONAR, "sonar"}, 113 {NF_TECHLISTS, "techlists"}, 114 {NF_SACKED, "sacked"}, 115 {0, NULL} 116 }; 117 118 struct symbol nation_rejects[] = { 119 {bit(REJ_TELE), "telegrams"}, 120 {bit(REJ_ANNO), "announcements"}, 121 {bit(REJ_LOAN), "loans"}, 122 {0, NULL} 123 }; 124 125 struct symbol nation_relations[] = { 126 {-1, "unknown"}, 127 {AT_WAR, "at-war"}, 128 {HOSTILE, "hostile"}, 129 {NEUTRAL, "neutral"}, 130 {FRIENDLY, "friendly"}, 131 {ALLIED, "allied"}, 132 {0, NULL} 133 }; 134 135 struct symbol nation_status[] = { 136 {STAT_UNUSED, "unused"}, 137 {STAT_NEW, "new"}, 138 {STAT_VIS, "visitor"}, 139 {STAT_SANCT, "sanctuary"}, 140 {STAT_ACTIVE, "active"}, 141 {STAT_GOD, "deity"}, 142 {0, NULL} 143 }; 144 145 struct symbol nuke_chr_flags[] = { 146 {N_NEUT, "neutron"}, 147 {0, NULL} 148 }; 149 150 struct symbol packing[] = { 151 {IPKG, "inefficient"}, 152 {NPKG, "normal"}, 153 {WPKG, "warehouse"}, 154 {UPKG, "urban"}, 155 {BPKG, "bank"}, 156 {0, NULL} 157 }; 158 159 struct symbol page_headings[] = { 160 {N_NOTUSED, "Comics"}, 161 {N_FOR, "Foreign Affairs"}, 162 {N_FRONT, "The Front Line"}, 163 {N_SEA, "The High Seas"}, 164 {N_SKY, "Sky Watch"}, 165 {N_MISS, "Guidance Systems"}, 166 {N_ARTY, "Firestorms"}, 167 {N_ECON, "Business & Economics"}, 168 {N_COLONY, "The Frontier"}, 169 {N_HOME, "The Home Front"}, 170 {N_SPY, "Espionage"}, 171 {N_TELE, "Telecommunications"}, 172 {0, NULL} 173 }; 174 175 struct symbol plague_stages[] = { 176 {PLG_HEALTHY, "healthy"}, 177 {PLG_DYING, "dying"}, 178 {PLG_INFECT, "infect"}, 179 {PLG_INCUBATE, "incubate"}, 180 {PLG_EXPOSED, "exposed"}, 181 {0, NULL} 182 }; 183 184 struct symbol plane_chr_flags[] = { 185 {P_T, "tactical"}, 186 {P_B, "bomber"}, 187 {P_F, "intercept"}, 188 {P_C, "cargo"}, 189 {P_V, "VTOL"}, 190 {P_M, "missile"}, 191 {P_L, "light"}, 192 {P_S, "spy"}, 193 {P_I, "image"}, 194 {P_O, "satellite"}, 195 {P_N, "SDI"}, 196 {P_E, "x-light"}, 197 {P_K, "helo"}, 198 {P_A, "ASW"}, 199 {P_P, "para"}, 200 {P_ESC, "escort"}, 201 {P_MINE, "mine"}, 202 {P_SWEEP, "sweep"}, 203 {P_MAR, "marine"}, 204 {0, NULL} 205 }; 206 207 struct symbol plane_flags[] = { 208 {PLN_LAUNCHED, "launched"}, 209 {PLN_SYNCHRONOUS, "synchronous"}, 210 {PLN_AIRBURST, "airburst"}, 211 {0, NULL} 212 }; 213 214 struct symbol resources[] = { 215 /* names should match resource selector names in sect_ca[] */ 216 {0, "none"}, 217 {offsetof(struct sctstr, sct_min), "min"}, 218 {offsetof(struct sctstr, sct_gmin), "gold"}, 219 {offsetof(struct sctstr, sct_fertil), "fert"}, 220 {offsetof(struct sctstr, sct_oil), "ocontent"}, 221 {offsetof(struct sctstr, sct_uran), "uran"}, 222 {0, NULL} 223 }; 224 225 struct symbol retreat_flags[] = { 226 {RET_GROUP, "group"}, 227 {RET_INJURED, "injured"}, 228 {RET_TORPED, "torpedoed"}, 229 {RET_SONARED, "sonared"}, 230 {RET_HELPLESS, "helpless"}, 231 {RET_BOMBED, "bombed"}, 232 {RET_DCHRGED, "depth-charged"}, 233 {RET_BOARDED, "boarded"}, 234 {0, NULL} 235 }; 236 237 struct symbol sect_chr_flags[] = { 238 {D_DEITY, "deity"}, 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_SUPPLY, "supply"}, 267 {M_CANAL, "canal"}, 268 {M_ANTIMISSILE, "anti-missile"}, 269 {0, NULL} 270 }; 271