]> git.pond.sub.org Git - empserver/blob - src/lib/global/file.c
Indented with src/scripts/indent-emp.
[empserver] / src / lib / global / file.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2000, 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 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.
25  *
26  *  ---
27  *
28  *  fileglb.c: Empire selection global structures.
29  * 
30  *  Known contributors to this file:
31  *     
32  */
33
34 #include <struct.h>
35 #include "misc.h"
36 #include "var.h"
37 #include "xy.h"
38 #include "loan.h"
39 #include "nsc.h"
40 #include "nuke.h"
41 #include "plane.h"
42 #include "ship.h"
43 #include "land.h"
44 #include "sect.h"
45 #include "trade.h"
46 #include "treaty.h"
47 #include "file.h"
48 #include "power.h"
49 #include "news.h"
50 #include "nat.h"
51 #include "lost.h"
52 #include "optlist.h"
53
54 #include "gamesdef.h"
55 #include "commodity.h"
56
57 #if !defined(_WIN32)
58 #define FILEPATH(p) EMPPATH(data/p)
59 #else
60 #define FILEPATH(p) EMPPATH(data\\p)
61 #endif
62
63 struct empfile empfile[] = {
64     {"sect", FILEPATH(sector), EFF_COM | EFF_XY | EFF_OWNER,
65      0, sizeof(struct sctstr),
66      0, 0, 0, {fldoff(sctstr, sct_nv), fldoff(sctstr, sct_vtype[0]),
67                fldoff(sctstr, sct_vamt[0])}, MAXSCTV,
68      -1, -1, 0, 0, 0, 0, 0},
69     {"ship", FILEPATH(ship), EFF_COM | EFF_XY | EFF_OWNER | EFF_GROUP,
70      0, sizeof(struct shpstr),
71      0, 0, 0, {fldoff(shpstr, shp_nv), fldoff(shpstr, shp_vtype[0]),
72                fldoff(shpstr, shp_vamt[0])}, MAXSHPV,
73      -1, -1, 0, 0, 0, 0, 0},
74     {"plane", FILEPATH(plane), EFF_XY | EFF_OWNER | EFF_GROUP,
75      0, sizeof(struct plnstr),
76      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
77     {"land", FILEPATH(land), EFF_COM | EFF_XY | EFF_OWNER | EFF_GROUP,
78      0, sizeof(struct lndstr),
79      0, 0, 0, {fldoff(lndstr, lnd_nv), fldoff(lndstr, lnd_vtype[0]),
80                fldoff(lndstr, lnd_vamt[0])}, MAXLNDV,
81      -1, -1, 0, 0, 0, 0, 0},
82     {"nuke", FILEPATH(nuke), EFF_XY | EFF_OWNER, 0, sizeof(struct nukstr),
83      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
84     {"news", FILEPATH(news), 0,
85      0, sizeof(struct nwsstr),
86      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
87     {"treaty", FILEPATH(treaty), 0, 0, sizeof(struct trtstr),
88      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
89     {"trade", FILEPATH(trade), 0, 0, sizeof(struct trdstr),
90      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
91     {"pow", FILEPATH(power), 0, 0, sizeof(struct powstr),
92      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
93     {"nat", FILEPATH(nation), 0, 0, sizeof(struct natstr),
94      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
95     {"loan", FILEPATH(loan), 0,
96      0, sizeof(struct lonstr),
97      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
98     {"map", FILEPATH(map), 0, 0, DEF_WORLD_X * DEF_WORLD_Y / 2,
99      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
100     {"bmap", FILEPATH(bmap), 0, 0, DEF_WORLD_X * DEF_WORLD_Y / 2,
101      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
102     {"commodity", FILEPATH(commodity), 0, 0, sizeof(struct comstr),
103      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0},
104     {"lost", FILEPATH(lostitems), 0, 0, sizeof(struct loststr),
105      0, 0, 0, {0, 0, 0}, 0, -1, -1, 0, 0, 0, 0, 0}
106 };