#ifndef CONSTANTS_HH

#define CONSTANTS_HH


/*

 * Global stuff

 */

#define DEBUG 1

#define COLLISIONDEBUG 0

#define AXES 0

#define SPHERE_SKY 0


/*

 * Math stuff

 */

const double PI = 3.141592653;


// Main stuff
const int TIME_STEP = 1; // Minimum framerate
const int VALUE = 1;     // Don't know what this is, but this value doesn't break things.




// bullet resolution
const int RESOLUTION = 20;



// Small range for equality of vectors

const double EPSILON = .0001;



// Gravity

const double GRAVITY = -.02;

// Map Parameters

const int TERRAIN_COLS = 45; // must be an even multiple of the MAP_SIZE!

const int TERRAIN_ROWS = 45; // must be equal to TERRAIN_COLS

const int MAP_SIZE = 15;

const int SKY_RADIUS = 25; // only relevant if SPHERE_SKY is defined to be 1 (default 0)

const int TERRAIN_SMOOTH = 8;

const int TERRAIN_HEIGHT = 8;

#define BITMAP_ID 0x4D42

#define TERRAIN_NUMTEX 4

#define TERRAIN_TEXTURE "stone.bmp"

const double TEX_SCALE = .5;

// Sky Parameters
const double SKY_RED = 0.65;

const double SKY_GREEN = 0.75;

const double SKY_BLUE = 1;


// Default color for objects is <1, 1, 0>

const double COLORR = 1;

const double COLORG = 1;

const double COLORB = 0;




// Tank Stuff

const int MAX_PLAYERS = 8;

const double TANK_CLOSENESS = 1;

const double BULLET_RADIUS = 0.02;

const int BULLET_LIFE = 120;

const double TANK_RADIUS = 0.25;

const double INITIAL_THETA = 0;

const double INITIAL_PHI = 0;

const double MAX_POWER = 1.5*MAP_SIZE;

const double INITIAL_POWER = MAX_POWER / 2;

const double POWER_DIVISOR = 1.5*MAP_SIZE;

const double BARREL_LENGTH = 0.5;

const double PHI_INCREMENT = PI/96;

const double THETA_INCREMENT = PI/96;

// Tank Power Bars

const double POWER_BAR_OFFSET = 1.0;

const double POWER_BAR_HEIGHT = 0.5;

const double POWER_BAR_RADIUS = 0.05;

const double POWER_RED = 1;

const double POWER_GREEN = 1;

const double POWER_BLUE = 1;

/*

 * Keyboard controls

 */

const char FIRE1 = ' ';

const char PAUSE = 'p';

const char STEP = '.';

//aiming

const char THETA_UP = '6'; // up arrow

const char THETA_DOWN = '4'; // down arrow

const char PHI_UP = '8'; // right arrow

const char PHI_DOWN = '2'; // left arrow

const char POWER_UP = '+';

const char POWER_DOWN = '-';

//camera position

const char ZOOM_IN = 'z';

const char ZOOM_OUT = 'Z';

const char CAM_POSX = 'a';

const char CAM_NEGX = 'A';

const char CAM_POSY = 's';

const char CAM_NEGY = 'S';

const char CAM_POSZ = 'd';

const char CAM_NEGZ = 'D';

const double CAM_INCREMENT = 0.5;

const double VIEW_THETA = PI/6;

const double VIEW_PHI = 3*PI/4;

const double INIT_CAM_X = -MAP_SIZE / 4;

const double INIT_CAM_Y = MAP_SIZE / 2 + TERRAIN_HEIGHT / 2;

const double INIT_CAM_Z = -MAP_SIZE / 4;


#endif // CONSTANTS_HH