view data.h @ 1:ff5e05767bd3 ALPHA

Empty changelog
author darius
date Sat, 06 Dec 1997 05:41:28 +0000
parents
children
line wrap: on
line source

/* $Id: data.h,v 1.1.1.1 1997/12/06 05:41:28 darius Exp $ */

/*
 * data.h
 */

#ifndef data_h_
#define data_h_

#include "copyright.h"
#include "struct.h"
#include <stdio.h>		/* for def of file */
#ifdef hpux
#include <time.h>
#else
#include <sys/time.h>
#endif

#define EX_FRAMES 		5
#define SBEXPVIEWS 		7
#define NUMDETFRAMES		5	/* # frames in torp explosion */
#define ex_width        	64
#define ex_height       	64
#define sbexp_width        	80
#define sbexp_height       	80
#define cloud_width 		9
#define cloud_height 		9
#define plasmacloud_width 	13
#define plasmacloud_height 	13
#define etorp_width 		3
#define etorp_height 		3
#define NDRONEVIEWS 16		/* dependent on oldbitmaps.h */
#define drone_width 		6
#define drone_height 		6
#define fighter_width           5
#define fighter_height          5
#define warpbeacon_width	8
#define warpbeacon_height	12
#define eplasmatorp_width 	7
#define eplasmatorp_height 	7
#define mplasmatorp_width 	5
#define mplasmatorp_height 	5
#define mtorp_width 		3
#define mtorp_height 		3
#define crossmask_width 	16
#define crossmask_height 	16
#define planet_width 		30
#define planet_height 		30
#define wormhole_width          80
#define wormhole_height         80
#define terrain_width           20
#define terrain_height          20
#define mplanet_width 		16
#define mplanet_height 		16
#define cloak_width		20
#define cloak_height		20

extern int paradise;		/* is the server a paradise server? */
#ifdef HOCKEY
extern int hockey;		/* is the server a hockey server [BDyess] */
#endif /*HOCKEY*/

extern int nplayers;
extern int nshiptypes;
extern int ntorps;
extern int npthingies;
extern int ngthingies;
extern int nplasmas;
extern int nphasers;
extern int nplanets;

#ifdef HOCKEY
/* hockey stuff [BDyess] */
extern int galacticHockeyLines;  /* draw lines on the galactic? [BDyess] */
extern int tacticalHockeyLines;  /* draw lines on the tactical? [BDyess] */
extern int cleanHockeyGalactic;  /* don't draw planets on the galactic when
                                    playing hockey [BDyess] */
extern int teamColorHockeyLines; /* color hockey lines by team [BDyess] */
extern struct	hockeyLine hlines[NUM_HOCKEY_LINES];
#endif /*HOCKEY*/

extern int metaFork;		/* allow spawning off of clients from meta-
				   server window [BDyess] */
extern int viewBox;		/* flag for viewBox [BDyess] */
extern int allowViewBox;	/* allow flag for viewBox [BDyess] */

extern int sectorNums;		/* flag for numbered sectors in galactic -TH */
extern int lockLine;		/* for line from me to lock in galac -TH */
extern int mapSort;		/* use new sorting in galactic -TH */
extern int autoSetWar;		/* automatically set war dec's -TH */
extern int tacPlanetInfo;	/* info on local planets; see data.c -TH */

#ifdef WIDE_PLIST
extern char *playerList;	/* string of fields for wide playerlist */
extern char *playerListStart;	/* comma seperated set of strings for plist */
extern int resizePlayerList;
#endif				/* WIDE_PLIST */

#ifdef PACKET_LIGHTS
extern int packetLights;	/* flag for packetLights [BDyess] */
#endif				/* PACKET_LIGHTS */

/* for showgalactic and showlocal rotation sequence [BDyess] */
extern char *showGalacticSequence, *showLocalSequence;

/* Lynx wants the playerlist blanked upon entry.  Ok, whatever [BDyess] */
extern int allowPlayerlist;

/* message window array [BDyess] */
extern struct messageWin messWin[];

/* global counters for number of queued messages [BDyess] */
extern int me_messages, all_messages, team_messages;

/* added 1/94 -JR */
extern int niftyNewMessages;

/* needed for rc_distress [BDyess] */
extern int F_gen_distress;

extern struct dmacro_list *distmacro;
extern struct dmacro_list dist_defaults[];
extern struct dmacro_list dist_prefered[];
extern int sizedist;

#ifdef BEEPLITE
extern int F_allow_beeplite;
extern unsigned char F_beeplite_flags;

extern char *distlite[];
extern int UseLite;
extern int DefLite;
extern int emph_planet_seq_n[];
extern int emph_player_seq_n[];
extern W_Icon emph_planet_seq[];
extern W_Icon emph_player_seq[];
extern W_Icon emph_player_seql[];
extern W_Color emph_planet_color[MAX_PLANETS];
extern W_Color emph_player_color[MAX_PLAYER];
#define emph_planet_seq_frames 5
#define emph_planet_seq_width 24
#define emph_planet_seq_height 24
#define emph_player_seq_frames 3
#define emph_player_seq_width 24
#define emph_player_seq_height 24
#define emph_player_seql_frames 3
#define emph_player_seql_width 30
#define emph_player_seql_height 30
extern int beep_lite_cycle_time_player;
extern int beep_lite_cycle_time_planet;
#endif				/* BEEPLITE */

/* time client connected to server [BDyess] */
extern time_t timeStart;

#ifdef TIMER
/* timer data */
extern int timerType;
extern time_t timeBank[];
#endif				/* TIMER */

#ifdef MACROS
extern struct macro *macrotable[256];
extern int macroState;
extern char lastMessage[100];
#endif				/* MACROS */

/* ghoststart data */
extern int ghoststart;
extern int ghost_pno;

/* defaults list */
extern struct stringlist *defaults;

/* upgrade kludge flag [BDyess] */
extern int upgrading;

/* continuousmouse kludge [BDyess] */
extern int exitInputLoop;

/* clearzone data */
extern int czsize;
extern struct _clearzone *clearzone;
extern int clearcount;
#ifdef HOCKEY
extern int clearline[4][32 + 2 * 32 + NUM_HOCKEY_LINES];
#else
extern int clearline[4][32 + 2 * 32];
#endif /*HOCKEY*/
extern int clearlmark[2];
extern int clearlmcount;
extern int clearlcount;
extern int mclearzone[6][32];	/* for map window */

extern struct player *players;
extern struct player *me;
extern struct torp *torps;
extern struct thingy *thingies;
extern struct plasmatorp *plasmatorps;
extern struct status *status;
extern struct status2 *status2;
extern struct ship *myship;
extern struct shiplist *shiptypes;
extern struct stats *mystats;
extern struct planet *planets;
extern struct t_unit *terrainInfo;
extern int received_terrain_info;
extern int terrain_x;
extern int terrain_y;
extern struct phaser *phasers;
extern struct team *teams;
extern struct planet pdata[];

extern int logPhaserMissed;	/* log or not 'phaser missed' messages
				   [BDyess] */
extern int phaserStats;		/* Phaser statistics on or off -JR */
extern int phasFired, phasHits, totalDmg; /* the stats */

extern int infoIcon;		/* information icon flag [BDyess] */
extern int iconified;		/* iconified or not flag [BDyess] */
extern char *defaultsFile;
extern short *slot;
extern char *defNickName;
extern char *defFlavor;
extern int oldalert;
/*extern int remap[];*/
extern int udcounter;
extern char *title;
extern char *cloakchars;	/* characters used for cloakers, defaults to
				   ?? */
extern int cloakcharslen;
extern struct plupdate pl_update[];
extern int currentship;
extern int messpend;
extern int lastcount;
extern int mdisplayed;
extern int redrawall;
extern int nopilot;
extern int watch;
extern int selfdest;
extern int lastm;
extern int delay;
extern int rdelay;
extern int mapmode;
extern int namemode;
extern int showShields;
extern int showStats;
#ifdef ATM
extern int msgBeep;		/* ATM - msg beep */
#endif				/* ATM */
extern int warncount;
extern int warntimer;
extern int infomapped;
extern void *infothing;		/* infow contents [BDyess] */
extern int infoupdate;		/* update flag for infow [BDyess] */
extern int infotype;		/* type of info thing [BDyess] */
extern int keepInfo;		/* .xtrekrc setting */
extern int infowin_up;		/* how long should it remain up? */
#ifdef ATM
extern int scanmapped;		/* ATM - scanner stuff */
#endif				/* ATM */
extern int mustexit;
extern int messtime;
extern int keeppeace;
extern int drawgrid;

/* playerlist settings */
extern int sortPlayers;
extern int hideNoKills;
extern int showDead;
extern int showPreLogins;
extern int sortOutfitting;
extern int robsort;

/* dashboard settings */
extern int Dashboard;
extern int newDashboard;
extern int cup_half_full;

extern int logmess;
extern char *logFile;
extern FILE *logfilehandle;
extern int showPhaser;
extern int vary_hull;
extern int warpStreaks;
extern int fastQuit;
extern int pigSelf;
#ifdef CONTINUOUS_MOUSE
extern int continuousMouse;
extern int allowContinuousMouse;
extern int clickDelay;
 /* turns on and off continuousMouse for each button [BDyess] */
extern int buttonRepeatMask;
#endif				/* CONTINUOUS_MOUSE */
extern int autoQuit;

#ifdef GATEWAY
extern unsigned long netaddr;	/* for blessing */
#endif

#ifdef NOWARP
extern int messageon;
#endif

extern char blk_refitstring[80];
extern int blk_gwidth;
extern float blk_windgwidth;
/*extern int blk_altbits;*/
extern int showKitchenSink;
extern int blk_showStars;
extern int blk_bozolist;
extern int blk_friendlycloak;

extern int forceMono;

extern int showlocal, showgalactic;
extern int sendmotdbitmaps;
extern char *shipnos;
extern int sock;
extern int xtrekPort;
extern int queuePos;
extern int pickOk;
extern int lastRank;
extern int promoted;
extern int loginAccept;
extern unsigned localflags;
extern int tournMask;
extern int nextSocket;
extern int updatePlayer[];
extern char *serverName;
extern int loggedIn;
extern int reinitPlanets;
extern int redrawPlayer[];
extern int lastUpdate[];
extern int timerDelay;
extern int reportKills;
extern char *unixSoundPath;
extern char *unixSoundDev;
extern int playSounds;

#ifdef ATM
extern int scanplayer;
extern int showTractor;
extern int commMode;		/* UDP */
extern int commModeReq;		/* UDP */
extern int commStatus;		/* UDP */
extern int commSwitchTimeout;	/* UDP */
extern int udpTotal;		/* UDP */
extern int udpDropped;		/* UDP */
extern int udpRecentDropped;	/* UDP */
extern int udpSock;		/* UDP */
extern int udpDebug;		/* UDP */
extern int udpClientSend;	/* UDP */
extern int udpClientRecv;	/* UDP */
extern int udpSequenceChk;	/* UDP */
extern int updateSpeed;

#ifdef METASERVER
/* metaserver window stuff */
extern int usemeta;
extern char *metaserverAddress;
#endif				/* METASERVER */

/* MOTD data */
extern struct page *currpage;
extern struct page *motddata;

#ifdef GATEWAY
extern int gw_serv_port, gw_port, gw_local_port;	/* UDP */
extern char *gw_mach;		/* UDP */
#endif
#endif				/* ATM */

extern int showMySpeed;
extern int showTractorPressor;
extern int showAllTractorPressor;
extern int allowShowAllTractorPressor;
extern int showLock;
extern int autoKey;
extern int extraBorder;
#ifdef ATM
/* udp options */
extern int tryUdp;
#endif				/* ATM */


extern double Sin[], *Cos;

extern W_Icon stipple, clockpic, icon;
/*extern W_Icon teamicon[4];*/

#define VIEWS 16
extern W_Icon expview[EX_FRAMES];
extern W_Icon sbexpview[SBEXPVIEWS];
extern W_Icon cloud[NUMDETFRAMES];
extern W_Icon plasmacloud[NUMDETFRAMES];
extern W_Icon etorp, mtorp;
extern W_Icon drone_bm[16];
extern W_Icon eplasmatorp, mplasmatorp, fighter[VIEWS];
extern W_Icon warpbeacon, wbflash;
extern W_Icon hull[8];

extern W_Icon cloakicon;

#ifdef ATM
extern W_Icon tractbits, pressbits;
#endif				/* ATM */

#define NEW_SHIP_BM

struct ship_shape *shape_of_ship( /* team, class */ );

/**************************/
/* stellar object bitmaps */
/*
  b	tactical owner
  mb	galactic owner
  b2	tactical resources
  mb2	galactic resources
  */

#define	STARFRAMES	10
#define WORMFRAMES      8

extern W_Icon starBM[STARFRAMES], mstarBM;
extern W_Icon wormBM[WORMFRAMES];
extern W_Icon mholeBM;		/* wormhole galactic bitmap [BDyess] */

extern W_Icon bplanets[6];	/* TS "show owner" mode bitmaps */
extern W_Icon mbplanets[6];	/* GS "show owner" mode bitmaps */
extern W_Icon bplanets2[16];	/* TS "show facilities" mode bitmaps */
extern W_Icon mbplanets2[16];	/* GS "show facilities" mode bitmaps */
extern W_Icon bplanetsr[8];	/* TS "show resources" mode bitmaps */
extern W_Icon mbplanetsr[8];	/* GS "show resources" mode bitmaps */
extern W_Icon bplanetsMOO[16];	/* TS MOO-style bitmaps */
extern W_Icon mbplanetsMOO[16];	/* GS MOO-style bitmaps */
#define NSCOUTAGES	5
extern W_Icon mbplanetsA[NSCOUTAGES];	/* GS "show age" mode bitmaps */

extern W_Icon basteroid[6];
extern W_Icon mbasteroid[6];
extern W_Icon basteroid2[2];
extern W_Icon mbasteroid2[2];
extern W_Icon asteroidBM[16];
extern W_Icon asteroidfluff[3]; /* for "smoothness" */

extern W_Icon kitchenSink;

extern W_Color borderColor, backColor, textColor, myColor, warningColor, shipCol[6],
        rColor, yColor, gColor, unColor, foreColor;

/*extern char teamletdata[];
extern char *teamshortdata[];*/
extern char pseudo[PSEUDOSIZE];
extern char defpasswd[PSEUDOSIZE];
extern char login[PSEUDOSIZE];

extern struct rank ranks[NUMRANKS];
extern struct rank2 *ranks2;
extern struct royalty *royal;
extern int nranks2;
extern int nroyals;

extern W_Window messagew, w, mapw, statwin, baseWin, infow, iconWin, tstatw, war,
        warnw, helpWin, teamWin[4], qwin,	/* messwa, messwt, messwi,
    messwk, */ planetw, planetw2, rankw, playerw, optionWin, /* reviewWin, phaserwin, */ metaWin,
        macroWin, defWin, motdWin;
#ifdef ATM
extern W_Window scanw, scanwin, udpWin;
#endif				/* ATM */

#ifdef SHORT_PACKETS
extern W_Window spWin;
#endif

#ifdef TOOLS
extern W_Window toolsWin;
extern int shelltools;

#endif

#ifdef SOUND
extern W_Window soundWin;
#endif

#ifdef ROTATERACE
extern int rotate;
extern int rotate_deg;
#endif

#ifdef NOWARP
extern int messageon;
extern int warp;
#endif

extern int RSA_Client;
extern int blk_zoom;
extern int autoZoom, autoUnZoom, auto_zoom_timer, autoZoomOverride;

extern int use_msgw;

extern int show_shield_dam;
extern int bd;			/* BORG TEST */


#ifdef SHORT_PACKETS
extern int tryShort;
extern int recv_short;
extern int recv_mesg;
extern int recv_kmesg;
extern int recv_threshold;
extern char recv_threshold_s[];
extern int recv_warn;
extern int godToAllOnKills;
#endif

/* ping client stuff, ick */
extern int ping;		/* to ping or not to ping */
extern long packets_sent;	/* # all packets sent to server */
extern long packets_received;	/* # all packets received */
extern W_Window pStats;

extern int lowercaset;

extern char *agriWord;

#ifdef DNET
extern unsigned long sigsPending, sockMask, udpSockMask;
#endif

#ifdef FEATURE
extern int F_feature_packets;
extern int why_dead;
extern int cloakerMaxWarp;
extern int F_dead_warp;
extern int F_multiline_enabled;
extern int F_UseNewMacro;
extern int F_terrain;
extern unsigned char F_terrain_major;
extern unsigned char F_terrain_minor;
extern int F_gz_motd;
extern unsigned char F_gz_motd_major;
extern unsigned char F_gz_motd_minor;
#endif

#ifdef CHECK_DROPPED
extern int reportDroppedPackets;/* report on various dropped packet kludges */
extern int longest_ph_fuse;
#endif

#ifdef UPDATE_SIZES
extern int totalbytes;
extern int updatebytes, alivebytes;
extern int peakbytes;
extern int packetbytes[100];
#endif

extern int askforUpdate;

extern int jubileePhasers;

extern int scrollBeep;

#ifdef RECORDER
extern int recordGame;
extern char *recordFile;
extern int maxRecord;

extern int playback;
extern char *playFile;
extern int pb_update, paused, pb_advance, pb_scan, pb_slow;
#endif

#ifdef COW_HAS_IT_WHY_SHOULDNT_WE
extern int showMapAtMotd;
#endif

extern int redrawDelay;

#ifdef LOCAL_SHIPSTATS
extern int localShipStats;
extern char *statString;
extern int statHeight, localStatsX, localStatsY;
#endif

#ifdef SHOW_IND
extern int showIND;
#endif

/* char[] containing the client version */

extern char CLIENTVERS[];
#endif