1
|
1 /* $Id: data.c,v 1.1.1.1 1997/12/06 05:41:28 darius Exp $ */
|
|
2
|
|
3 /*
|
|
4 * data.c
|
|
5 */
|
|
6 #include "copyright.h"
|
|
7
|
|
8 #include <stdio.h>
|
|
9 #ifdef hpux
|
|
10 #include <time.h>
|
|
11 #else
|
|
12 #include <sys/time.h>
|
|
13 #endif
|
|
14 #include "Wlib.h"
|
|
15 #include "defs.h"
|
|
16 #include "struct.h"
|
|
17 #include "data.h"
|
|
18 #include "proto.h"
|
|
19
|
|
20 int paradise = 0; /* is the server a paradise server */
|
|
21 #ifdef HOCKEY
|
|
22 int hockey = 0; /* is the server a hockey server [BDyess] */
|
|
23 #endif /*HOCKEY*/
|
|
24
|
|
25 int nplayers = 32;
|
|
26 int nshiptypes = 15;
|
|
27 int ntorps = 8;
|
|
28 int npthingies = 20;
|
|
29 int ngthingies = 0;
|
|
30 int nplasmas = 1;
|
|
31 int nphasers = 1;
|
|
32 int nplanets = 60;
|
|
33
|
|
34 int framenum = 0;
|
|
35 int mapterrain_framenum = 0;
|
|
36
|
|
37 #ifdef HOCKEY
|
|
38 /* hockey stuff [BDyess] */
|
|
39 int galacticHockeyLines = 1; /* draw lines on the galactic? [BDyess] */
|
|
40 int tacticalHockeyLines = 1; /* draw lines on the tactical? [BDyess] */
|
|
41 int cleanHockeyGalactic = 0; /* don't draw planets on the galactic when
|
|
42 playing hockey [BDyess] */
|
|
43 int teamColorHockeyLines = 1; /* color hockey lines by team [BDyess] */
|
|
44 struct hockeyLine hlines[NUM_HOCKEY_LINES];
|
|
45 #endif /*HOCKEY*/
|
|
46
|
|
47 int metaFork = 0; /* allow spawning off of clients from meta-
|
|
48 server window [BDyess] */
|
|
49
|
|
50 int viewBox = 1; /* flag for viewBox [BDyess] */
|
|
51 int allowViewBox = 1; /* allow flag for viewBox [BDyess] */
|
|
52 int sectorNums = 1; /* for numbering sectors in galactic -TH */
|
|
53 int lockLine = 0; /* flag for line in lock for galactic -TH */
|
|
54 int mapSort = 1; /* sort player list by team -TH */
|
|
55 int autoSetWar = 1; /* do war decl's when tmode starts -TH */
|
|
56 int tacPlanetInfo = 9; /* extras on local planets; add the */
|
|
57 /* values of what you want displayed: */
|
|
58 /* 1 = army count; 2 = repair; 4 = fuel; */
|
|
59 /* 8 = agri; 16 = shipyard; paradise only -TH*/
|
|
60
|
|
61 #ifdef WIDE_PLIST
|
|
62 char *playerList; /* string of fields for wide playerlist */
|
|
63 char *playerListStart; /* comma seperated set of strings for plist */
|
|
64 int resizePlayerList = 0;
|
|
65 #endif /* WIDE_PLIST */
|
|
66
|
|
67 #ifdef PACKET_LIGHTS
|
|
68 int packetLights = 0; /* flag for packetLights [BDyess] */
|
|
69 #endif /* PACKET_LIGHTS */
|
|
70
|
|
71 /* for showgalactic and showlocal rotation sequence [BDyess] */
|
|
72 char *showGalacticSequence, *showLocalSequence;
|
|
73
|
|
74 /* Lynx wants the playerlist blanked upon entry. Ok, whatever [BDyess] */
|
|
75 int allowPlayerlist = 1;
|
|
76
|
|
77 /* message window array [BDyess] */
|
|
78 struct messageWin messWin[WNUM];
|
|
79
|
|
80 /* global counters for number of queued messages. [BDyess] */
|
|
81 int me_messages = 0, all_messages = 0, team_messages = 0;
|
|
82
|
|
83 /* added 1/94 -JR */
|
|
84 int niftyNewMessages = 1; /* on by default */
|
|
85
|
|
86 /* needed for rc_distress [BDyess] */
|
|
87 int F_gen_distress = 0; /* generic distress/macro system support */
|
|
88 /* the index into distmacro array should correspond with the correct dist_type */
|
|
89
|
|
90 #define NUM_DIST 27
|
|
91
|
|
92
|
|
93 #define control(x) (x)+128
|
|
94
|
|
95 struct dmacro_list dist_prefered[NUM_DIST];
|
|
96
|
|
97 /* the index into distmacro array should correspond with the correct dist_type */
|
|
98 /* the character specification is ignored now, kept here anyway for reference */
|
|
99 struct dmacro_list dist_defaults[] =
|
|
100 {
|
|
101 {'X', "no zero", "this should never get looked at"},
|
|
102 {control('t'), "taking", " %T%c->%O (%S) Carrying %a to %l%?%n>-1%{ @ %n%}\0"},
|
|
103 {control('o'), "ogg", " %T%c->%O Help Ogg %p at %l\0"},
|
|
104 {control('b'), "bomb", " %T%c->%O %?%n>4%{bomb %l @ %n%!bomb%}\0"},
|
|
105 {control('c'), "space_control", " %T%c->%O Help Control at %L\0"},
|
|
106 {control('1'), "save_planet", " %T%c->%O Help at %l! %?%a>0%{ (have %a arm%?%a=1%{y%!ies%}) %} %s%% shld, %d%% dam, %f%% fuel\0"},
|
|
107 {control('2'), "base_ogg", " %T%c->%O Sync with --]> %g <[-- OGG ogg OGG base!!\0"},
|
|
108 {control('3'), "help1", " %T%c->%O Help me! %d%% dam, %s%% shd, %f%% fuel %a armies.\0"},
|
|
109 {control('4'), "help2", " %T%c->%O Help me! %d%% dam, %s%% shd, %f%% fuel %a armies.\0"},
|
|
110 {control('e'), "escorting", " %T%c->%O ESCORTING %g (%d%%D %s%%S %f%%F)\0"},
|
|
111 {control('p'), "ogging", " %T%c->%O Ogging %h\0"},
|
|
112 {control('m'), "bombing", " %T%c->%O Bombing %l @ %n\0"},
|
|
113 {control('l'), "controlling", " %T%c->%O Controlling at %l\0"},
|
|
114 {control('5'), "asw", " %T%c->%O Anti-bombing %p near %b.\0"},
|
|
115 {control('6'), "asbomb", " %T%c->%O DON'T BOMB %l. Let me bomb it (%S)\0"},
|
|
116 {control('7'), "doing1", " %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at lal. %d%% dam, %s%% shd, %f%% fuel\0"},
|
|
117 {control('8'), "doing2", " %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at lal. %d%% dam, %s%% shd, %f%% fuel\0"},
|
|
118 {control('f'), "free_beer", " %T%c->%O %p is free beer\0"},
|
|
119 {control('n'), "no_gas", " %T%c->%O %p @ %l has no gas\0"},
|
|
120 {control('h'), "crippled", " %T%c->%O %p @ %l crippled\0"},
|
|
121 {control('9'), "pickup", " %T%c->%O %p++ @ %l\0"},
|
|
122 {control('0'), "pop", " %T%c->%O %l%?%n>-1%{ @ %n%}!\0"},
|
|
123 /* F */ {'F', "carrying", " %T%c->%O %?%S=SB%{Your Starbase is c%!C%}arrying %?%a>0%{%a%!NO%} arm%?%a=1%{y%!ies%}.\0"},
|
|
124 {control('@'), "other1", " %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at lal. (%d%%D, %s%%S, %f%%F)\0"},
|
|
125 {control('#'), "other2", " %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at lal. (%d%%D, %s%%S, %f%%F)\0"},
|
|
126 /* E */ {'E', "help", " %T%c->%O Help(%S)! %s%% shd, %d%% dmg, %f%% fuel,%?%S=SB%{ %w%% wtmp,%!%}%E%{ ETEMP!%}%W%{ WTEMP!%} %a armies!\0"},
|
|
127 {'\0', '\0', '\0'},
|
|
128 };
|
|
129
|
|
130 struct dmacro_list *distmacro = dist_defaults;
|
|
131
|
|
132 int sizedist = sizeof(dist_defaults);
|
|
133
|
|
134
|
|
135 /* continuousmouse kludge */
|
|
136 int exitInputLoop;
|
|
137
|
|
138 /* ghoststart data */
|
|
139 int ghoststart = 0; /* is this a ghostbust restart? */
|
|
140 int ghost_pno = 0; /* my p_no if it is */
|
|
141
|
|
142 /* time client connected to server [BDyess] */
|
|
143 time_t timeStart;
|
|
144
|
|
145 #ifdef TIMER
|
|
146 /* dashboard timer data [BDyess] */
|
|
147 int timerType = T_SHIP; /* timer defaults to ship timer */
|
|
148 time_t timeBank[T_TOTAL]; /* array of times */
|
|
149 #endif /* TIMER */
|
|
150
|
|
151 #ifdef MACROS
|
|
152 struct macro *macrotable[256];
|
|
153 int macroState = 0; /* 0=nothing, 1=in macro mode, 2=in macro,
|
|
154 want destination */
|
|
155 char lastMessage[100] = {0};
|
|
156 #endif /* MACROS */
|
|
157
|
|
158 /* defaults list */
|
|
159 struct stringlist *defaults = NULL;
|
|
160
|
|
161 /* upgrade kludge flag */
|
|
162 int upgrading = 0;
|
|
163
|
|
164 /* clearzone data */
|
|
165 int czsize = (8 + 1 + /* MAXTHINGIES */ 8 + 1 + 1) * 32 + 60;
|
|
166 struct _clearzone *clearzone = 0;
|
|
167 int clearcount = 0;
|
|
168 #ifdef HOCKEY
|
|
169 int clearline[4][32 + 2 * 32 + NUM_HOCKEY_LINES];
|
|
170 #else
|
|
171 int clearline[4][32 + 2 * 32];
|
|
172 #endif /*HOCKEY*/
|
|
173 int clearlmark[2];
|
|
174 int clearlmcount;
|
|
175 int clearlcount;
|
|
176 int mclearzone[6][32]; /* for map window */
|
|
177
|
|
178 struct player *players;
|
|
179 struct player *me = NULL;
|
|
180 struct torp *torps;
|
|
181 struct thingy *thingies = 0;
|
|
182 struct plasmatorp *plasmatorps;
|
|
183 struct status *status;
|
|
184 struct status2 *status2;
|
|
185 struct ship *myship;
|
|
186 struct shiplist *shiptypes = NULL;
|
|
187 struct stats *mystats;
|
|
188 struct planet *planets;
|
|
189 struct t_unit *terrainInfo;
|
|
190 int received_terrain_info = 0;
|
|
191 int terrain_x;
|
|
192 int terrain_y;
|
|
193 struct phaser *phasers;
|
|
194 struct message *messages;
|
|
195 struct mctl *mctl;
|
|
196
|
|
197 int logPhaserMissed = 0; /* default to not log 'phaser missed' type
|
|
198 messages [BDyess] */
|
|
199 int phaserStats = 1; /* default to keeping phaser stats. -JR */
|
|
200 int phasFired = 0, phasHits = 0, totalDmg = 0; /* moved here to allow resetting */
|
|
201
|
|
202 int infoIcon = 0; /* default to bitmap icon, not info icon
|
|
203 [BDyess] */
|
|
204 int iconified = 0; /* 1 if the client is iconified [BDyess] */
|
|
205 char *defaultsFile = NULL; /* name of defaults file (.xtrekrc usually) */
|
|
206 short *slot = NULL; /* array of who's in what slot for playerlist */
|
|
207 char *defNickName = NULL;
|
|
208 char *defFlavor = NULL;
|
|
209 char *cloakchars = NULL; /* characters used for cloakers */
|
|
210 int cloakcharslen; /* length of cloakchars string */
|
|
211 int oldalert = 0;
|
|
212 /*int remap[16] =
|
|
213 {0, 1, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0};*/
|
|
214 int messpend;
|
|
215 int lastcount;
|
|
216 int mdisplayed;
|
|
217 int redrawall;
|
|
218 int nopilot = 1;
|
|
219 int selfdest;
|
|
220 int udcounter;
|
|
221 int showMySpeed = 0;
|
|
222 int showTractorPressor = 1;
|
|
223 int showAllTractorPressor = 0; /* shows _all_ TP's, not just self
|
|
224 [BDyess] */
|
|
225 int allowShowAllTractorPressor = 1; /* server can disable [BDyess] */
|
|
226 int showLock = 3;
|
|
227 int autoKey = 0;
|
|
228 int extraBorder = 1;
|
|
229 char *unixSoundPath = NULL;
|
|
230 char *unixSoundDev = NULL;
|
|
231 int playSounds = 1;
|
|
232 #ifdef ATM
|
|
233 /* udp options */
|
|
234 int tryUdp = 1;
|
|
235 #endif /* ATM */
|
|
236 struct plupdate pl_update[MAX_PLANETS]; /* should be jammed into struct
|
|
237 planet */
|
|
238 int currentship;
|
|
239 int lastm;
|
|
240 int delay; /* delay for decaring war */
|
|
241 int rdelay; /* delay for refitting */
|
|
242 int mapmode = GMAP_FREQUENT;
|
|
243 int namemode = 1;
|
|
244 int showStats;
|
|
245 int showShields = 1;
|
|
246 int warncount = 0;
|
|
247 int warntimer = -1;
|
|
248 int infomapped = 0;
|
|
249 void *infothing = NULL; /* infow contents [BDyess] */
|
|
250 int infoupdate = 0; /* update flag for infow [BDyess] */
|
|
251 int infotype = 0; /* type of info thing [BDyess] */
|
|
252 int keepInfo = 0;
|
|
253 int infowin_up = -2;
|
|
254 int mustexit = 0;
|
|
255 int messtime = 5;
|
|
256 int keeppeace = 0;
|
|
257 int drawgrid = 1;
|
|
258
|
|
259 /* playerlist settings */
|
|
260 int sortPlayers = 1; /* whether to sort playerlist [BDyess] */
|
|
261 int hideNoKills = 1;
|
|
262 int showDead = 1;
|
|
263 int showPreLogins = 1;
|
|
264 int sortOutfitting = 1; /* sorts '--' players to bottom [BDyess] */
|
|
265 int robsort = 0; /* flag for Rob. Allows changing of the */
|
|
266 /* quadrant the playerlist uses for your */
|
|
267 /* team. [BDyess] */
|
|
268 int Dashboard = 3; /* 0 = old dashboard, 1 = new dashboard, */
|
|
269 /* 2 = newdashboard2, 3 = rainbow dashboard */
|
|
270 /* [BDyess] */
|
|
271 int cup_half_full = 0; /* setting for new dashboard 2 [BDyess] */
|
|
272 int logmess = 0; /* logging of activities or not [BDyess] */
|
|
273 char *logFile = NULL; /* logfile to be used for logging [BDyess] */
|
|
274 FILE *logfilehandle;
|
|
275 int showPhaser = 0; /* settings for showphaser stuff [BDyess] */
|
|
276 int vary_hull = 0; /* setting for varying hull indicator
|
|
277 [BDyess] */
|
|
278 int warpStreaks = 1; /* flag for warp star streaking [BDyess] */
|
|
279 int fastQuit = 0; /* flag for fast quit [BDyess] */
|
|
280 int pigSelf = 1; /* pigcall response from self [BDyess] */
|
|
281 #ifdef CONTINUOUS_MOUSE
|
|
282 int continuousMouse = 0; /* continuous mouse flag [BDyess] */
|
|
283 int clickDelay = 5; /* # of updates to delay before repeating */
|
|
284 /* turns on and off continuousMouse for each button [BDyess] */
|
|
285 int buttonRepeatMask = 0;
|
|
286 /* mouse event [BDyess] */
|
|
287 int allowContinuousMouse = 1; /* allow continuous mouse to work
|
|
288 flag, so */
|
|
289 /* each server can turn it off [BDyess] */
|
|
290 #endif /* CONTINUOUS_MOUSE */
|
|
291 int autoQuit = 60; /* time to wait before auto-quit [BDyess] */
|
|
292
|
|
293 #ifdef GATEWAY
|
|
294 unsigned long netaddr = 0; /* for blessing */
|
|
295 #endif
|
|
296
|
|
297 #ifdef ATM
|
|
298 int msgBeep = 1; /* ATM - msg beep */
|
|
299 int scanmapped = 0; /* ATM - scanners */
|
|
300 #endif /* ATM */
|
|
301
|
|
302 int showlocal = 1;
|
|
303 int showgalactic = 1;
|
|
304 int sendmotdbitmaps = 1;
|
|
305
|
|
306 char *title = NULL;
|
|
307 char *shipnos = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
308 int sock = -1;
|
|
309 int xtrekPort = -1;
|
|
310 int queuePos = -1;
|
|
311 int pickOk = -1;
|
|
312 int lastRank = -1;
|
|
313 int promoted = 0;
|
|
314 int loginAccept = -1;
|
|
315 unsigned localflags = 0;
|
|
316 int tournMask = 15;
|
|
317 int nextSocket; /* socket to use when we get ghostbusted... */
|
|
318 int updatePlayer[MAX_PLAYER]; /* Needs updating on player * list */
|
|
319 char *serverName = NULL;
|
|
320 int loggedIn = 0;
|
|
321 int reinitPlanets = 0;
|
|
322 int redrawPlayer[MAX_PLAYER]; /* Needs redrawing on galactic map */
|
|
323 int lastUpdate[MAX_PLAYER]; /* Last update of this player */
|
|
324 int timerDelay = 200000; /* micro secs between updates */
|
|
325 int reportKills = 1; /* report kill messages? */
|
|
326
|
|
327 #ifdef ATM
|
|
328 int scanplayer; /* who to scan */
|
|
329 int showTractor = 1; /* show visible tractor beams */
|
|
330 int commMode = 0; /* UDP: 0=TCP only, 1=UDP updates */
|
|
331 int commModeReq = 0; /* UDP: req for comm protocol change */
|
|
332 int commStatus = 0; /* UDP: used when switching protocols */
|
|
333 int commSwitchTimeout = 0; /* UDP: don't wait forever */
|
|
334 int udpTotal = 1; /* UDP: total #of packets received */
|
|
335 int udpDropped = 0; /* UDP: count of packets dropped */
|
|
336 int udpRecentDropped = 0; /* UDP: #of packets dropped recently */
|
|
337 int udpSock = -1; /* UDP: the socket */
|
|
338 int udpDebug = 0; /* UDP: debugging info on/off */
|
|
339 int udpClientSend = 1; /* UDP: send our packets using UDP? */
|
|
340 int udpClientRecv = 1; /* UDP: receive with simple UDP */
|
|
341 int udpSequenceChk = 1; /* UDP: check sequence numbers */
|
|
342 int updateSpeed = 5; /* updates per second */
|
|
343 #ifdef GATEWAY
|
|
344 int gw_serv_port, gw_port, gw_local_port; /* UDP */
|
|
345 char *gw_mach = NULL; /* UDP */
|
|
346 #endif
|
|
347 #endif /* ATM */
|
|
348
|
|
349 /* MOTD data */
|
|
350 struct page *currpage = NULL;
|
|
351 struct page *motddata = NULL;
|
|
352
|
|
353 #ifdef METASERVER
|
|
354 /* metaserver window stuff */
|
|
355 int usemeta = 0;
|
|
356 char *metaserverAddress;
|
|
357 #endif /* METASERVER */
|
|
358
|
|
359 char blk_refitstring[80] = "s=scout, d=destroyer, c=cruiser, b=battleship, a=assault, o=starbase";
|
|
360 int blk_gwidth;
|
|
361 float blk_windgwidth;
|
|
362 #if 0
|
|
363 int blk_altbits = 1;
|
|
364 #else
|
|
365 int showKitchenSink = 0;
|
|
366 #endif
|
|
367 int blk_showStars = 1;
|
|
368 int blk_bozolist = -1;
|
|
369 /*
|
|
370 * These are considered "borgish" features by some, so the server has to turn
|
|
371 * them on. All are default off, no way for player to turn them on.
|
|
372 */
|
|
373 int blk_friendlycloak = 0; /* Show color of cloakers who are friendly. */
|
|
374
|
|
375 int forceMono = 0;
|
|
376
|
|
377 extern double Sin[], *Cos;
|
|
378
|
|
379 W_Icon stipple, clockpic, icon;
|
|
380 /*W_Icon teamicon[4];*/
|
|
381
|
|
382 W_Color borderColor, backColor, textColor, myColor, warningColor, shipCol[6],
|
|
383 rColor, yColor, gColor, unColor, foreColor;
|
|
384
|
|
385 W_Icon expview[EX_FRAMES];
|
|
386 W_Icon sbexpview[SBEXPVIEWS];
|
|
387 W_Icon cloud[NUMDETFRAMES];
|
|
388 W_Icon plasmacloud[NUMDETFRAMES];
|
|
389 W_Icon etorp, mtorp;
|
|
390 W_Icon drone_bm[16];
|
|
391 W_Icon eplasmatorp, mplasmatorp, fighter[VIEWS];
|
|
392 W_Icon warpbeacon, wbflash;
|
|
393 W_Icon shield, cloakicon;
|
|
394 W_Icon hull[8];
|
|
395 #ifdef ATM
|
|
396 W_Icon tractbits, pressbits; /* ATM - visible tractor */
|
|
397 #endif /* ATM */
|
|
398
|
|
399 W_Icon starBM[STARFRAMES], mstarBM;
|
|
400 W_Icon wormBM[WORMFRAMES];
|
|
401 W_Icon asteroidBM[16];
|
|
402 W_Icon asteroidfluff[3];
|
|
403 W_Icon mholeBM; /* wormhole galactic bitmap [BDyess] */
|
|
404
|
|
405 W_Icon bplanets[6];
|
|
406 W_Icon mbplanets[6];
|
|
407 W_Icon bplanets2[16];
|
|
408 W_Icon mbplanets2[16];
|
|
409 W_Icon bplanetsr[8]; /* TS "show resources" mode bitmaps */
|
|
410 W_Icon mbplanetsr[8]; /* GS "show resources" mode bitmaps */
|
|
411 W_Icon bplanetsMOO[16];
|
|
412 W_Icon mbplanetsMOO[16];
|
|
413 W_Icon mbplanetsA[NSCOUTAGES]; /* GS "show age" mode bitmaps */
|
|
414
|
|
415 W_Icon basteroid[6];
|
|
416 W_Icon mbasteroid[6];
|
|
417 W_Icon basteroid2[2];
|
|
418 W_Icon mbasteroid2[2];
|
|
419
|
|
420 W_Icon kitchenSink;
|
|
421
|
|
422 /*char teamlet[] =
|
|
423 {'I', 'F', 'R', 'K', 'O'};
|
|
424 char *teamshort[] =
|
|
425 {"IND", "FED", "ROM", "KLI", "ORI"};*/
|
|
426
|
|
427 char pseudo[PSEUDOSIZE];
|
|
428 char defpasswd[PSEUDOSIZE];
|
|
429 char login[PSEUDOSIZE];
|
|
430
|
|
431 struct rank ranks[NUMRANKS] =
|
|
432 {
|
|
433 {2.0, 1.0, 0.0, "Ensign"},
|
|
434 {4.0, 2.0, 0.8, "Lieutenant"},
|
|
435 {8.0, 3.0, 0.8, "Lt. Cmdr."},
|
|
436 {8.0, 3.0, 0.8, "Commander"},
|
|
437 {15.0, 4.0, 0.8, "Captain"},
|
|
438 {20.0, 5.0, 0.8, "Flt Cptn."},
|
|
439 {25.0, 6.0, 0.8, "Commodore"},
|
|
440 {40.0, 8.0, 0.8, "Rear Adml."},
|
|
441 {40.0, 8.0, 0.8, "Admiral"}
|
|
442 };
|
|
443
|
|
444
|
|
445 int nranks2 = 18;
|
|
446 struct rank2 *ranks2;
|
|
447
|
|
448
|
|
449 int nroyals = 5;
|
|
450 struct royalty *royal = 0;
|
|
451
|
|
452 W_Window messagew, w, mapw, statwin, baseWin, infow = 0, iconWin, tstatw,
|
|
453 war, warnw, helpWin, teamWin[4], qwin, /* messwa, messwt, messwi,
|
|
454 messwk, */ planetw, planetw2, playerw, rankw, optionWin = 0, /* reviewWin, phaserwin, */ metaWin = 0,
|
|
455 macroWin = 0, defWin, motdWin = 0;
|
|
456 #ifdef ATM
|
|
457 W_Window scanw, scanwin, udpWin;
|
|
458 #endif /* ATM */
|
|
459
|
|
460 #ifdef SHORT_PACKETS
|
|
461 W_Window spWin;
|
|
462 #endif
|
|
463
|
|
464 #ifdef TOOLS
|
|
465 W_Window toolsWin = NULL;
|
|
466 int shelltools = 1;
|
|
467
|
|
468 #endif
|
|
469
|
|
470 #ifdef SOUND
|
|
471 W_Window soundWin = 0;
|
|
472 #endif
|
|
473
|
|
474 #ifdef ROTATERACE
|
|
475 int rotate = 0;
|
|
476 int rotate_deg = 0;
|
|
477 #endif
|
|
478
|
|
479 #ifdef NOWARP
|
|
480 int messageon = 0;
|
|
481 int warp = 0;
|
|
482 #endif
|
|
483
|
|
484 int RSA_Client = 1;
|
|
485 int blk_zoom = 0; /* zoom in to 1/4 galaxy */
|
|
486
|
|
487 /* zoom map based on alert status? Timer is to let tab override for x updates. -JR*/
|
|
488 /* Now that I've done it, I find it pretty annoying ;-) Here it is anyway. */
|
|
489 int autoZoom=0, autoUnZoom=0, auto_zoom_timer=0, autoZoomOverride=15;
|
|
490
|
|
491 int use_msgw = 0; /* send last message to message window */
|
|
492
|
|
493 int show_shield_dam = 1; /* show shield damage by color */
|
|
494 #ifdef BORGTEST
|
|
495 int bd = 0; /* BORG TEST */
|
|
496 #endif
|
|
497
|
|
498
|
|
499 #ifdef SHORT_PACKETS
|
|
500 int tryShort = 1; /* for .xtrekrc option */
|
|
501 int recv_short = 0;
|
|
502 int recv_mesg = 1;
|
|
503 int recv_kmesg = 1;
|
|
504 int recv_threshold = 0;
|
|
505 char recv_threshold_s[8] = {'0', '\0'};
|
|
506 int recv_warn = 1;
|
|
507 int godToAllOnKills = 1;
|
|
508 #endif
|
|
509
|
|
510 int ping = 0; /* to ping or not to ping */
|
|
511 long packets_sent = 0; /* # all packets sent to server */
|
|
512 long packets_received = 0; /* # all packets received */
|
|
513 W_Window pStats;
|
|
514
|
|
515 int lowercaset = 0; /* I hate shift-T for team. put "lowercaset:
|
|
516 on" to allow 't' -JR */
|
|
517
|
|
518 #ifdef DNET
|
|
519 unsigned long sigsPending = 0;
|
|
520 unsigned long sockMask = 0;
|
|
521 unsigned long udpSockMask = 0;
|
|
522 #endif
|
|
523
|
|
524 #ifdef FEATURE
|
|
525 int why_dead = 0; /* add reason for death to SP kill msgs. */
|
|
526 int cloakerMaxWarp = 0; /* server reports cloaker's speed as 15. */
|
|
527 int F_dead_warp = 0; /* dead players reported at warp 14 */
|
|
528 int F_feature_packets = 0; /* whether to use them or not */
|
|
529 int F_multiline_enabled = 0;/* is the MMACRO flag enabled? */
|
|
530 int F_UseNewMacro = 1; /* Not sure this is actually checked... */
|
|
531 int F_terrain = 1; /* Enable terrain sending */
|
|
532 unsigned char F_terrain_major = 1; /* Version 1.0 of terrain */
|
|
533 unsigned char F_terrain_minor = 0;
|
|
534 int F_gz_motd = 0; /* Can't handle gzipped MOTD yet */
|
|
535 unsigned char F_gz_motd_major = 0; /* call it v0.0 then */
|
|
536 unsigned char F_gz_motd_minor = 0;
|
|
537
|
|
538 #ifdef BEEPLITE
|
|
539
|
|
540 int F_allow_beeplite = 1;
|
|
541 unsigned char F_beeplite_flags = LITE_PLAYERS_MAP |
|
|
542 LITE_PLAYERS_LOCAL |
|
|
543 LITE_SELF |
|
|
544 LITE_PLANETS |
|
|
545 LITE_SOUNDS |
|
|
546 LITE_COLOR;
|
|
547
|
|
548 char *distlite[NUM_DIST] = {
|
|
549 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
|
550 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
|
551 NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
|
552 };
|
|
553
|
|
554 int DefLite = 0;
|
|
555 int UseLite = 0;
|
|
556
|
|
557 int emph_planet_seq_n[MAX_PLANETS] = {0,};
|
|
558 int emph_player_seq_n[MAX_PLAYER] = {0,};
|
|
559 W_Icon emph_planet_seq[10];
|
|
560 W_Icon emph_player_seq[10];
|
|
561 W_Icon emph_player_seql[10];
|
|
562 int beep_lite_cycle_time_player = 10;
|
|
563 int beep_lite_cycle_time_planet = 10;
|
|
564 W_Color emph_planet_color[MAX_PLANETS];
|
|
565 W_Color emph_player_color[MAX_PLAYER];
|
|
566 #endif /* BEEPLITE */
|
|
567
|
|
568 #endif /* FEATURE */
|
|
569
|
|
570 #ifdef CHECK_DROPPED
|
|
571 int reportDroppedPackets = 0; /* report when dropped packet kludges
|
|
572 are used. */
|
|
573 int longest_ph_fuse = 0;
|
|
574 #endif
|
|
575
|
|
576
|
|
577 /* When you enter game send request for full update SRS 3/15/94 */
|
|
578 int askforUpdate = 0;
|
|
579
|
|
580 int jubileePhasers = 0; /* cycle phaser hits through all the colors.
|
|
581 Idea from COW-lite. -JR */
|
|
582
|
|
583 int scrollBeep = 1;
|
|
584
|
|
585 #ifdef RECORDER
|
|
586 int recordGame = 0;
|
|
587 char *recordFile = 0;
|
|
588 int maxRecord = 1000000; /* default 1 meg max */
|
|
589
|
|
590 int playback = 0;
|
|
591 char *playFile = 0;
|
|
592 int pb_update = 0, pb_advance = 0, paused = 1, pb_scan=0, pb_slow=0;
|
|
593 #endif
|
|
594
|
|
595 #ifdef COW_HAS_IT_WHY_SHOULDNT_WE
|
|
596 int showMapAtMotd = 0;
|
|
597 #endif
|
|
598
|
|
599 int redrawDelay = 0;
|
|
600
|
|
601 #ifdef LOCAL_SHIPSTATS
|
|
602 int localShipStats = 0;
|
|
603 char *statString;
|
|
604 int statHeight=20, localStatsX=200, localStatsY=260;
|
|
605 #endif
|
|
606
|
|
607 #ifdef SHOW_IND
|
|
608 int showIND=0;
|
|
609 #endif
|
|
610
|
|
611 char CLIENTVERS[] = "2.4p1ALFA";
|