annotate data.c @ 2:fba0b6e6cdc7

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