comparison src/shmem.h @ 6:8c6d5731234d

First entry of Paradise Server 2.9 patch 10 Beta
author darius
date Sat, 06 Dec 1997 04:37:04 +0000
parents
children
comparison
equal deleted inserted replaced
5:054275999194 6:8c6d5731234d
1 /*--------------------------------------------------------------------------
2 NETREK II -- Paradise
3
4 Permission to use, copy, modify, and distribute this software and its
5 documentation, or any derivative works thereof, for any NON-COMMERCIAL
6 purpose and without fee is hereby granted, provided that this copyright
7 notice appear in all copies. No representations are made about the
8 suitability of this software for any purpose. This software is provided
9 "as is" without express or implied warranty.
10
11 Xtrek Copyright 1986 Chris Guthrie
12 Netrek (Xtrek II) Copyright 1989 Kevin P. Smith
13 Scott Silvey
14 Paradise II (Netrek II) Copyright 1993 Larry Denys
15 Kurt Olsen
16 Brandon Gillespie
17 --------------------------------------------------------------------------*/
18
19 #ifndef shmem_h_
20 #define shmem_h_
21
22 #include "struct.h"
23
24 enum spec_weapons_e
25 {
26 WP_PLASMA,
27 WP_TRACTOR,
28 WP_MISSILE,
29 WP_FIGHTER,
30 WP_MAX
31 };
32
33 enum ships_systems
34 {
35 /* Terrain could, I suppose, affect any of these */
36 /* I may have forgotten a couple, feel free to add.. */
37 SS_PLASMA,
38 SS_TRACTOR,
39 SS_MISSILE,
40 SS_FIGHTER,
41 SS_PHOTON,
42 SS_PHASER,
43 SS_SHIELD,
44 SS_REPAIR,
45 SS_CLOAK,
46 SS_SCANNER,
47 SS_SENSOR,
48 SS_WARP,
49 SS_IMPULSE,
50 SS_DOCK,
51 SS_NAVIGATION,
52 SS_COMMUNICATION,
53 SHIPS_SYSTEMS
54 };
55
56 struct configuration
57 {
58 int tournplayers; /* how many players necessary for T-mode */
59 int ntesters; /* number of slots reserved for robots */
60
61 char binconfirm; /* binary confirmation */
62 float maxload; /* maximum load */
63 char udpAllowed; /* is UDP allowed */
64 int min_upd_delay; /* minimum update delay */
65 int min_observer_upd_delay; /* minimum observer update delay */
66
67 /* planet things */
68 int galaxygenerator; /* which method to generate the galaxy with */
69 int numplanets; /* number of planets */
70 float planupdspd; /* planet movement speed */
71 char resource_bombing; /* have growable and bombable resources? */
72 char revolts; /* are revolts allowed? */
73 unsigned char popscheme; /* individual planet popping scheme */
74 unsigned char popchoice; /* how to choose a planet for popping */
75 int popspeed; /* 100 is normal speed */
76 char evacuation; /* allow beaming up below 5 armies? */
77 char new_army_growth; /* base army growth on current pop? */
78 int planetsinplay; /* Max # of planets in play */
79 int planetlimittype; /* how planet taking is limited */
80 char beamlastarmies; /* if you can, or cannot beam up the last
81 * armies. */
82 char justify_galaxy; /* Do we want to ensure that the galaxy is
83 * "fair"? */
84 int num_wormpairs; /* The number of wormhole pairs -- DON'T SET
85 * ABOVE (NUMPLANETS/2) */
86 int num_nebula; /* the number of nebulas in the galaxy. */
87 int nebula_density; /* not yet used. Will be used for
88 * funky-shaped nebs */
89 int nebula_subclouds; /* the number of nebulous subclouds */
90 int num_asteroid; /* number of asteroid belts in the galaxy */
91 float asteroid_thickness; /* the thickness of an asteroid belt. */
92 int asteroid_density; /* the density (% chance) of an asteroid
93 * field */
94 int asteroid_radius; /* distance of a belt from its star */
95 float asteroid_thick_variance;/* float value -- useful range 0.0 - 10.0 or
96 * so */
97 int asteroid_dens_variance; /* int value -- useful range 0 - 200 */
98 int asteroid_rad_variance; /* int value -- useful range 0 - 255 */
99
100 float plkills; /* how many kills to allow plasmas */
101 float mskills; /* how many kills to allow missiles */
102 float erosion; /* hull erosion factor */
103 float penetration; /* shield penetration factor */
104 int newturn; /* TC's new style turns */
105 int hiddenenemy; /* enemies hidden in T-mode */
106 int gwidth; /* galactic width */
107 char bronco_shipvals; /* use bronco ship values? */
108 char afterburners; /* can people use afterburners? */
109 char warpdrive; /* is warping allowed? */
110 char fuel_explosions; /* are explosions based on gas? */
111 char newcloak; /* use new cloaking? */
112 char bronco_ranks; /* use bronco ranking? NYI, kinda */
113
114 char warpdecel; /* non-instant deceleration from warp */
115 char affect_shiptimers_outside_T; /* should ship destruction outside of
116 * T-mode affect the team ship
117 * timers? */
118 /* NYTested */
119 char durablescouting; /* if 0, then you have to keep scouting
120 * planets to get up-to-date info. If 1,
121 * then you only need to scout it once. */
122
123 /* NYI */
124 char facilitygrowth; /* if 0, then you can't bomb or grow
125 * facilities. if 1, then you can. */
126 char fireduringwarpprep; /* can you fire during warp prep? */
127 char fireduringwarp; /* can you fire while warping? */
128 char firewhiledocked; /* can you fire while docked? */
129
130 #define WPS_NOTRACT 0 /* tractors do not affect warp prep */
131 #define WPS_TABORT 1 /* tractors cause an abort at the end */
132 #define WPS_TPREVENT 2 /* tractors prevent entering warp */
133 #define WPS_TABORTNOW 3 /* tractors immediately abort warp prep */
134 #define WPS_TSUSPEND 4 /* tractors suspend countdown */
135 char warpprepstyle;
136
137 char baserankstyle; /* if nobody on the team has enough rank */
138 /* to get a special ship; and this is set */
139 /* to 1, then the player with the highest */
140 /* rank on the team may get the spec. ship */
141
142 char cloakduringwarpprep;
143 char cloakwhilewarping;
144 char tractabortwarp; /* this many tractors will abort warp */
145
146 float orbitdirprob; /* probability that the player will orbit
147 * clockwise */
148 char neworbits; /* New, incremental planet distances from the
149 * parent star -- important for games with
150 * terrain. */
151
152 int sun_effect[SHIPS_SYSTEMS];/* suns affect these systems */
153 int ast_effect[SHIPS_SYSTEMS];/* asteroids affect these systems */
154 int neb_effect[SHIPS_SYSTEMS];/* a nebula affects these */
155 int wh_effect[SHIPS_SYSTEMS]; /* wormhole effects */
156 int improved_tracking[SHIPS_SYSTEMS]; /* which weapons use IT */
157 int shipsallowed[NUM_TYPES]; /* which ships are allowed */
158 int weaponsallowed[WP_MAX]; /* which special weapons are allowed */
159 #ifdef LEAGUE_SUPPORT
160 /* league configuration stuff */
161 int timeouts; /* timeouts per team in league play */
162 int regulation_minutes; /* minutes in regulation play */
163 int overtime_minutes; /* minutes in overtime play */
164 int playersperteam; /* maximum number of players per team */
165 #endif
166 /* ping stuff */
167 int ping_period; /* ping period in seconds */
168 int ping_iloss_interval; /* in terms of ping_period */
169 int ping_allow_ghostbust; /* allow ghostbust detection from
170 * ping_ghostbust (cheating possible) */
171 int ping_ghostbust_interval; /* in terms of ping_period, when to ghostbust
172 * (if allowed) */
173
174 char cluecheck; /* should we check clue? */
175 int cluedelay; /* maximum time between clue checks */
176 int cluetime; /* time player has to respond to a clue check */
177 int cluesource; /* source of clue phrase */
178 #define CC_COMPILED_IN_PHRASE_LIST 0
179 #define CC_MOTD 1
180 #define CC_PHRASE_LIST_FILE 2
181
182 int variable_warp; /* allow variable warp or not [BDyess] */
183 int warpprep_suspendable; /* allow warp prep to be suspended [BDyess] */
184 int warpzone; /* radius of warp zone [BDyess] */
185
186 /* tmode stuff */
187 int nopregamebeamup; /* whether to disallow beamup before a game */
188 int gamestartnuke; /* whether everyone is nuked at game start */
189 int nottimeout; /* # minutes after loss of tmode before */
190 /* galaxy resets (0 disables) */
191
192 /* put planet growth timer constants here */
193 struct plgrow_
194 {
195 int fuel, agri, repair, shipyard;
196 } plgrow;
197 int helpfulplanets; /* planets help fuel/etmep */
198 };
199
200 extern struct player *players;
201 extern struct torp *torps;
202 extern struct missile *missiles;
203 extern struct thingy *thingies;
204 extern struct plasmatorp *plasmatorps;
205 extern struct status *status;
206 extern struct status2 *status2;
207 extern struct planet *planets;
208 extern struct t_unit *terrain_grid;
209 extern struct phaser *phasers;
210 extern int *stars;
211 extern struct mctl *mctl;
212 extern struct message *messages;
213 extern struct team *teams;
214
215 #define NUMPLANETS configvals->numplanets
216 #define GWIDTH configvals->gwidth
217 #define WORMPAIRS configvals->num_wormpairs
218
219 extern struct ship *shipvals;
220 extern struct configuration *configvals;
221 extern int *shipsallowed; /* points inside configvals */
222 extern int *weaponsallowed; /* ditto */
223 extern int *sun_effect; /* how do suns affect ship systems? */
224 extern int *ast_effect; /* asteroids */
225 extern int *neb_effect; /* nebulae */
226 extern int *wh_effect; /* wormholes */
227 extern int *num_nebula; /* number of nebulae */
228 extern int *nebula_density; /* funkyness of nebulae -- NYI */
229 extern int *nebula_subclouds; /* number of subclouds per nebula */
230 extern int *num_asteroid; /* number of asteroid fields */
231 extern float *asteroid_thickness; /* thickness of an asteroid belt */
232 extern int *asteroid_density; /* density of asteroid belts */
233 extern int *asteroid_radius; /* distance from owning star */
234 extern float *asteroid_thick_variance;
235 extern int *asteroid_dens_variance;
236 extern int *asteroid_rad_variance;
237 extern int *improved_tracking; /* smarter tracking algorithm */
238 extern char *galaxyValid; /* does galaxy go invalid? 0 if so */
239 #define CLUEPHRASE_SIZE 1024
240 extern char *cluephrase_storage;
241 void openmem( /* 0=or die, 1=fork daemon, 2=are daemon */ );
242 void blast_shmem();
243
244 #endif