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
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 * var.h: various variable definitions
30 * Known contributors to this file:
42 #define PLG_INCUBATE 3
45 #define VT_ITEM (1<<5)
46 #define VT_COND (2<<5)
47 #define VT_DIST (3<<5)
49 #define VT_SELL (5<<5)
50 #define VT_SPARE1 (6<<5)
51 #define VT_SPARE2 (7<<5)
52 #define VT_TYPE (7<<5)
54 #define isitem(x) (((x) & VT_TYPE) == VT_ITEM)
55 #define iscond(x) (((x) & VT_TYPE) == VT_COND)
56 #define isdist(x) (((x) & VT_TYPE) == VT_DIST)
57 #define isdel(x) (((x) & VT_TYPE) == VT_DEL)
58 #define issell(x) (((x) & VT_TYPE) == VT_SELL)
59 #define unitem(x) ((x) & (VT_ITEM -1))
61 #define V_ITEM(x) ((x)|VT_ITEM) /* a moveable, sellable(?) commodity */
62 #define V_COND(x) ((x)|VT_COND) /* condition (plg time, etc) */
63 #define V_DIST(x) ((x)|VT_DIST) /* distribution command */
64 #define V_DEL(x) ((x)|VT_DEL) /* delivery command */
65 #define V_SELL(x) ((x)|VT_SELL) /* make a sale */
90 #define V_MINE V_COND(C_MINE)
91 #define V_PSTAGE V_COND(C_PSTAGE)
92 #define V_PTIME V_COND(C_PTIME)
93 #define V_REM V_COND(C_REM)
94 #define V_CHE V_COND(C_CHE)
95 #define V_FALLOUT V_COND(C_FALLOUT)
97 /* should this be here?? */
98 #define get_che_cnum(x) ((x) >> 8)
99 #define set_che_cnum(x, cn) ((x) = ((x) & 0xff) | ((cn) << 8))
100 #define get_che_value(x) ((x) & 0xff)
101 #define set_che_value(x, n) ((x) = ((x) & 0xff00) | (n))
103 #define V_CIVIL V_ITEM(I_CIVIL)
104 #define V_MILIT V_ITEM(I_MILIT)
105 #define V_SHELL V_ITEM(I_SHELL)
106 #define V_GUN V_ITEM(I_GUN)
107 #define V_PETROL V_ITEM(I_PETROL)
108 #define V_IRON V_ITEM(I_IRON)
109 #define V_DUST V_ITEM(I_DUST)
110 #define V_BAR V_ITEM(I_BAR)
111 #define V_FOOD V_ITEM(I_FOOD)
112 #define V_OIL V_ITEM(I_OIL)
113 #define V_LCM V_ITEM(I_LCM)
114 #define V_HCM V_ITEM(I_HCM)
115 #define V_UW V_ITEM(I_UW)
116 #define V_RAD V_ITEM(I_RAD)
118 #define V_CDEL V_DEL(I_CIVIL)
119 #define V_MDEL V_DEL(I_MILIT)
120 #define V_SDEL V_DEL(I_SHELL)
121 #define V_GDEL V_DEL(I_GUN)
122 #define V_PDEL V_DEL(I_PETROL)
123 #define V_IDEL V_DEL(I_IRON)
124 #define V_DDEL V_DEL(I_DUST)
125 #define V_BDEL V_DEL(I_BAR)
126 #define V_FDEL V_DEL(I_FOOD)
127 #define V_ODEL V_DEL(I_OIL)
128 #define V_LDEL V_DEL(I_LCM)
129 #define V_HDEL V_DEL(I_HCM)
130 #define V_UDEL V_DEL(I_UW)
131 #define V_RDEL V_DEL(I_RAD)
133 #define V_CDIST V_DIST(I_CIVIL)
134 #define V_MDIST V_DIST(I_MILIT)
135 #define V_SDIST V_DIST(I_SHELL)
136 #define V_GDIST V_DIST(I_GUN)
137 #define V_PDIST V_DIST(I_PETROL)
138 #define V_IDIST V_DIST(I_IRON)
139 #define V_DDIST V_DIST(I_DUST)
140 #define V_BDIST V_DIST(I_BAR)
141 #define V_FDIST V_DIST(I_FOOD)
142 #define V_ODIST V_DIST(I_OIL)
143 #define V_LDIST V_DIST(I_LCM)
144 #define V_HDIST V_DIST(I_HCM)
145 #define V_UDIST V_DIST(I_UW)
146 #define V_RDIST V_DIST(I_RAD)