// -*- c++ -*-

#ifndef _GLOBAL_H
#define _GLOBAL_H

#include "hash.h"
#include "misc.h"

class Graphics;
class MsgQ;
class Player;
class TransTable;
class WDisplay;
class World;
class MapDisplay;

// this is where ALL global vars live

//  The main file should define I_AM_MAIN
// in orded to really declare the variables.
// No other .cc file should.

#ifdef I_AM_MAIN
#define EXT
#else
#define EXT extern
#endif


//
// game vars
//

EXT Graphics *screen;
EXT int numPlayers;
EXT Player **players;
EXT World *world;
EXT char *serverName; // only used in windows
EXT int currTurn;
EXT TransTable *trans; // translation table
EXT StateType state;
extern ObjectData Objects[];
extern ScienceData Sciences[];
extern UnitData Units[];
EXT char **cityNames;
extern char*initCityNames[];
EXT int savedGame; // true if this is a saved game
extern HashTable<Science, StrKey> sciences;
extern HashTable<BuildObject, StrKey> buildObjects;

// WorldCreate tells which method of world creation to use
EXT char WorldCreate;

EXT int distanceBetweenConts;
EXT int contChunkSize;
EXT int numberOfChunksPerCont;


//
// process vars
//

EXT char *debugFlags;				  // set by main()
EXT int sock;					  // socket to communicate with server
EXT int playerId;
EXT char *myName;
EXT MapDisplay *MainMap;

// this is the list of current moves we have made
// gets sent to all the other players at the end of our turn
EXT MsgQ *moveQ;

#endif // _GLOBAL_H
