2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure
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.
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.
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
22 * See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
23 * related information and legal notices. It is expected that any future
24 * projects/authors will amend these files as needed.
28 * file.c: Empire game data file descriptions.
30 * Known contributors to this file:
54 #include "commodity.h"
57 struct empfile empfile[] = {
58 /* Dynamic game data */
59 {EF_SECTOR, "sect", "sector", EFF_XY | EFF_OWNER,
60 sizeof(struct sctstr), NULL, NULL, NULL,
61 -1, -1, 0, 0, NULL, 0, sect_ca},
62 {EF_SHIP, "ship", "ship", EFF_XY | EFF_OWNER | EFF_GROUP,
63 sizeof(struct shpstr), NULL, NULL, NULL,
64 -1, -1, 0, 0, NULL, 0, ship_ca},
65 {EF_PLANE, "plane", "plane", EFF_XY | EFF_OWNER | EFF_GROUP,
66 sizeof(struct plnstr), NULL, NULL, NULL,
67 -1, -1, 0, 0, NULL, 0, plane_ca},
68 {EF_LAND, "land", "land", EFF_XY | EFF_OWNER | EFF_GROUP,
69 sizeof(struct lndstr), NULL, NULL, NULL,
70 -1, -1, 0, 0, NULL, 0, land_ca},
71 {EF_NUKE, "nuke", "nuke", EFF_XY | EFF_OWNER,
72 sizeof(struct nukstr), NULL, NULL, NULL,
73 -1, -1, 0, 0, NULL, 0, nuke_ca},
74 {EF_NEWS, "news", "news", 0,
75 sizeof(struct nwsstr), NULL, NULL, NULL,
76 -1, -1, 0, 0, NULL, 0, news_ca},
77 {EF_TREATY, "treaty", "treaty", 0,
78 sizeof(struct trtstr), NULL, NULL, NULL,
79 -1, -1, 0, 0, NULL, 0, treaty_ca},
80 {EF_TRADE, "trade", "trade", 0,
81 sizeof(struct trdstr), NULL, NULL, NULL,
82 -1, -1, 0, 0, NULL, 0, trade_ca},
83 {EF_POWER, "pow", "power", 0,
84 sizeof(struct powstr), NULL, NULL, NULL,
85 -1, -1, 0, 0, NULL, 0, NULL},
86 {EF_NATION, "nat", "nation", EFF_OWNER,
87 sizeof(struct natstr), NULL, NULL, NULL,
88 -1, -1, 0, 0, NULL, 0, nat_ca},
89 {EF_LOAN, "loan", "loan", 0,
90 sizeof(struct lonstr), NULL, NULL, NULL,
91 -1, -1, 0, 0, NULL, 0, loan_ca},
92 {EF_MAP, "map", "map", 0,
93 DEF_WORLD_X * DEF_WORLD_Y / 2, NULL, NULL, NULL,
94 -1, -1, 0, 0, NULL, 0, NULL},
95 {EF_BMAP, "bmap", "bmap", 0,
96 DEF_WORLD_X * DEF_WORLD_Y / 2, NULL, NULL, NULL,
97 -1, -1, 0, 0, NULL, 0, NULL},
98 {EF_COMM, "commodity", "commodity", 0,
99 sizeof(struct comstr), NULL, NULL, NULL,
100 -1, -1, 0, 0, NULL, 0, commodity_ca},
101 {EF_LOST, "lost", "lostitems", EFF_OWNER,
102 sizeof(struct loststr), NULL, NULL, NULL,
103 -1, -1, 0, 0, NULL, 0, lost_ca},
105 /* Static game data (configuation) */
106 #define EFF_CFG (EFF_RDONLY | EFF_MEM | EFF_STATIC)
107 {EF_SECTOR_CHR, "sect chr", NULL, EFF_CFG,
108 sizeof(dchr[0]), NULL, NULL, NULL,
109 -1, -1, 0, 0, (char *)dchr, 0, dchr_ca},
110 {EF_SHIP_CHR, "ship chr", NULL, EFF_CFG,
111 sizeof(mchr[0]), NULL, NULL, NULL,
112 -1, -1, 0, 0, (char *)mchr, 0, mchr_ca},
113 {EF_PLANE_CHR, "plane chr", NULL, EFF_CFG,
114 sizeof(plchr[0]), NULL, NULL, NULL,
115 -1, -1, 0, 0, (char *)plchr, 0, plchr_ca},
116 {EF_LAND_CHR, "land chr", NULL, EFF_CFG,
117 sizeof(lchr[0]), NULL, NULL, NULL,
118 -1, -1, 0, 0, (char *)lchr, 0, lchr_ca},
119 {EF_NUKE_CHR, "nuke chr", NULL, EFF_CFG,
120 sizeof(nchr[0]), NULL, NULL, NULL,
121 -1, -1, 0, 0, (char *)nchr, 0, nchr_ca},
122 {EF_NEWS_CHR, "news chr", NULL, EFF_CFG,
123 sizeof(rpt[0]), NULL, NULL, NULL,
124 -1, -1, 0, 0, (char *)rpt, 0, rpt_ca},
125 {EF_TREATY_CHR, "treaty chr", NULL, EFF_CFG,
126 sizeof(tchr[0]), NULL, NULL, NULL,
127 -1, -1, 0, 0, (char *)tchr, 0, tchr_ca},
128 {EF_ITEM, "item", NULL, EFF_CFG,
129 sizeof(ichr[0]), NULL, NULL, NULL,
130 -1, -1, 0, 0, (char *)ichr, 0, ichr_ca},
131 {EF_INFRASTRUCTURE, "infrastructure", NULL, EFF_CFG,
132 sizeof(intrchr[0]), NULL, NULL, NULL,
133 -1, -1, 0, 0, (char *)intrchr, 0, intrchr_ca},
134 {EF_PRODUCT, "product", NULL, EFF_CFG,
135 sizeof(pchr[0]), NULL, NULL, NULL,
136 -1, -1, 0, 0, (char *)pchr, 0, pchr_ca},
137 {EF_TABLE, "table", NULL, EFF_CFG,
138 sizeof(empfile[0]), NULL, NULL, NULL,
139 -1, -1, 0, 0, (char *)empfile, 0, empfile_ca},
140 {EF_SHIP_CHR_FLAGS, "ship chr flags", NULL, EFF_CFG,
141 sizeof(ship_chr_flags[0]), NULL, NULL, NULL,
142 -1, -1, 0, 0, (char *)ship_chr_flags, 0, lookup_ca},
143 {EF_PLANE_CHR_FLAGS, "plane chr flags", NULL, EFF_CFG,
144 sizeof(plane_chr_flags[0]), NULL, NULL, NULL,
145 -1, -1, 0, 0, (char *)plane_chr_flags, 0, lookup_ca},
146 {EF_LAND_CHR_FLAGS, "land chr flags", NULL, EFF_CFG,
147 sizeof(land_chr_flags[0]), NULL, NULL, NULL,
148 -1, -1, 0, 0, (char *)land_chr_flags, 0, lookup_ca},
149 {EF_NUKE_CHR_FLAGS, "nuke chr flags", NULL, EFF_CFG,
150 sizeof(nuke_chr_flags[0]), NULL, NULL, NULL,
151 -1, -1, 0, 0, (char *)nuke_chr_flags, 0, lookup_ca},
152 {EF_META, "meta", NULL, EFF_CFG,
153 sizeof(mdchr_ca[0]), NULL, NULL, NULL,
154 -1, -1, 0, 0, (char *)mdchr_ca, 0, mdchr_ca},
155 {EF_META_TYPE, "meta type", NULL, EFF_CFG,
156 sizeof(meta_type[0]), NULL, NULL, NULL,
157 -1, -1, 0, 0, (char *)meta_type, 0, lookup_ca},
158 {EF_META_FLAGS, "meta flags", NULL, EFF_CFG,
159 sizeof(meta_flags[0]), NULL, NULL, NULL,
160 -1, -1, 0, 0, (char *)meta_flags, 0, lookup_ca},
163 {EF_BAD, NULL, NULL, 0,
165 -1, -1, 0,0,NULL, 0, NULL}