/* Declarations of glabal variables */
extern int demo;

extern int ships;              // The number of ships in the game
extern int dddshapes;          // The number of shapes ddd is allowed
extern int shapes;             // The number of projectiles in the game
extern int maxstars;           // The maximum number of stars
extern int comms;              // The number of communications
extern float velconst;         // The games velocity constant
extern int nowaypoints;        // Number of waypoints
extern int complines;          //Number of lines of computer screen
extern int numguiobjects;
extern float ar;

extern int rendermethod;
extern int cockpitrendermethod;        
extern float renderdist;
extern float effectsrenderdist;
extern int lightsourcing;
extern int smalldetails;
extern int sparks;
extern int complexity;
extern int planets;
extern int starfield;
extern int debrisremoval;
extern int longlaser;
extern int flames;
extern int attachedobjects;

extern int ioncharge;
extern int gunpower[12];
extern int gunrange[12];
extern int gunrate[12];
extern int gunkey[12];
extern int gunmouse[12];
extern float gunvelocity[12];

extern float maxspeed;
extern float minspeed;
extern int statistics;
extern int computer;
extern int drawcockpit,drawdebris;
extern int targetstatistics;
extern int friendly;
extern int enemy;
extern int neutral;
extern int total;
extern int view;
extern char views[10][16];
extern float friendlypower;
extern float enemypower;
extern float neutralpower;
extern float totalpower;
extern float distance;
extern float viewx,viewy,viewz;              // View x y z
extern float viewrx,viewry,viewrz;           // View rx ry rz
extern char Semaphores;
extern float a;
extern int frame1,frame2,frame3;             // Frames for animation
extern int targetinfo;                       //Target info position - 0=down 10=up
extern int targetinfoupdown;
extern int targetframe;                      // A general keypressing frame
extern int incoming;                         // incoming fire boolean type

extern int videomode;                        // The integer videomode
extern int currentcomm;
extern int commtimer;
extern int currentprintcomm;
extern int col1,col2,col3,col4,var1;   // Colors and wotnot for messages
extern struct GUIOBJECT *gui;
extern struct OBJECT *o;                                                      // Object
extern struct PROJECTILE *p;
extern struct COMMUNICATION *c;             // Communication
extern struct STAR *star;                                                     // Star
extern struct SHAPEDATA *shapedata;         // Shapedata
extern struct WAYPOINT *w;
extern struct CREATEOBJECT *co;
extern struct OBJECTEVENT *oe;
extern struct COMMUNICATIONEVENT *ce;
extern struct MOUSE m;
extern struct JOY j;
extern struct PILOTSTRUCT pilot;
extern struct DEBRIS *d;
extern struct GROUND *gr;
extern int ground;
extern float height;

extern VtkObj ShapeHandle[150];                  // The shapehandle for each shape
extern int dpt[50];
extern int *matter;
extern char comp[20][20];
extern int compside[20];
extern int complatest;
extern long missiontime;
extern int complatesttimer;
extern int control;
extern int judx,judy;
extern short myXpos,myYpos;
extern int jcenterx,jcentery,jmaxx,jmaxy;
extern float first_time;
extern float this_time;
extern float old_time;
extern int removal,debris;                            // A removal picture
extern int completed,notcompleted;
extern int completedcount,critical;

extern int numcampaigns,nummissions,actualmission,missioncompleted;
extern int missiontype[12];
extern int missionessential[12];
extern char missionname[12][13];
extern int missiontune[12];
extern int startflag;
extern int terminateflag;
extern int finishtime;
extern int norand;
extern int debug;
extern int quiet;

extern MOD *modsong[10];
extern MOD *tempmodsong;
extern SAMPLE *sound1[20];
extern DWORD length1[20];
extern long size1[20];
extern int playing[20];

extern int triciacomputer;
extern SAMPLE *triciasound1[20];
extern DWORD tricialength1[20];
extern long triciasize1[20];
extern int tricia;
extern int triciaplaying[40];

extern DWORD id1;
extern SAMPLE *tempsound;
extern DWORD templength;
extern SAMPLE *msound1[40];
extern DWORD mlength1[40];
extern long msize1[40];
extern int music,fx,sampling,jsens,msens,volume,soundblaster;
extern int thereisnosound;

extern int scale;
extern int ccpp;
extern int no_projectiles;
extern int projectilefield;

extern unsigned char apikeypressed[128];// Table to track scancodes
extern int apimouse_x,apimouse_y,apilbutton,apirbutton,apibuttons;
extern int apijoystick_x_position,apijoystick_y_position,apijoystick_left_button,apijoystick_right_button;

extern long old_video_mode;
extern VtkPal MyPal,FullPal;
extern VtkObj light,camera,ccamera,spare,sun,cock,targetbox,targ,cockpit,red;
extern VtkObj lgun[10],rgun[10];
extern int modex,modey;

extern int keyAdd;
extern char key[256];
extern void (__interrupt __far *biosKeyboardHandler)();
extern char keyboardHandlerInstalled;
extern unsigned int jjj_num_timers;
extern unsigned long  *jjj_start_times;
extern unsigned char  jjjtimer_not_initailized;

extern float speedconst;
extern int difficulty;
extern int successflag;

extern int tat;
extern int targetturret,targetturretflash;
//extern int tat2,tat2x,tat2y;

// tar stuff
extern int handle;
extern char tempofile[256];
extern struct jjjtar_mainheader mainh;   // Contains the information about the whole file
extern struct jjjtar_filepointer *filep; // Pointer to the array of headers at the start of the file

