#ifndef __RAWKS_GLOBALS__
#define __RAWKS_GLOBALS__

#ifndef __RAWKS_DEFINES__
#include "defines.h"
#endif

#ifdef __RAWKS_MAIN__
#define LOCALITY
#else
#define LOCALITY extern
#endif

#ifdef __GL_GL_H__
extern Matrix Identity;
#endif

#ifdef DST_USA
/* /usr/include/sys/time.h different on IRIX4 and IRIX5 */
LOCALITY struct timeval New_scene_time,Cur_time;
#endif

LOCALITY long	Sizex,Sizey;
LOCALITY int	Window;
LOCALITY int	Font;
LOCALITY float	Sintable[512];
LOCALITY float	Costable[512];
LOCALITY float	Rndtable[512];
LOCALITY int	Num_players,Num_scores;
LOCALITY float	D_time; /* delta time in 100ths of second (ms) */
LOCALITY int	Firstbullet_i,Nextbullet_i; /* index to active bullets */
LOCALITY int	Firstpartic_i,Nextpartic_i; /* index to harmless particles */
LOCALITY int	Thrust_count;
LOCALITY int	Frm,Old_frm;
LOCALITY short	Qval;
LOCALITY int	Qread;
LOCALITY int	Collision_det;
LOCALITY int	Has_snd_hardware;
LOCALITY int	Show_high;
LOCALITY int	Snd_inited,Start_sound[START_SND_QUEUESIZE];
LOCALITY int	End_sound,Kill_all_sounds;
LOCALITY int	Sound_child; /* pid of sound gen process */
LOCALITY int	Game_over,Paused;
LOCALITY int	Num_ships;
LOCALITY int	Num_missions,Selected_mission,Next_level;
LOCALITY int	Smallfont,Largefont,Mediumfont;
LOCALITY float	Speed;
LOCALITY int	Flag;
LOCALITY int	Restartable;

#ifdef __RAWKS_STRUCT__
LOCALITY sfx_info	Sfx_info[SFX_N_SOUNDS];
LOCALITY rock		Rock_head;
LOCALITY rock		**Ships;
LOCALITY rock		*Rock_geom_lib; /* A kludge to cache already loaded
					     rocks loading levels */
LOCALITY level		*Level;
LOCALITY mission	**Mission_list;
LOCALITY playerinfo	P[MAX_PLAYERS+1];     /* P for Players */
LOCALITY trajectory	B[BULLETARRAYSIZE]; /* B for Bullets */
LOCALITY trajectory	S[STUFFARRAYSIZE]; /* S for Stuff (harmless) */
LOCALITY cmd_line_opts	Opts;
#endif

#endif /* __RAWKS_GLOBALS__ */
