/*
	Combat Team II engine header
*/
int old_event = -1;
int cur_event = -1;
int Box (int sx, int sy, int w, int h, BYTE color);
int InArea (int sx, int sy, int w, int h);
extern int mmode;

// new stuff here...
unsigned long int frames = 0;
extern DWORD CurrentLightLevel;
int manX, manY, manZ;
int startX, startY, startZ;
int adjX = 0, adjY = 0;
int aframe = 0;
int viewmode = 0;

int player = 0;		// start player = 1

BYTE colors[PLAYERS] = {
	96, 32, 144, 192
};

#define AIM_COST 2		// aim_accuracy_bonus = 5 * aim_bonus
#define TURN_COST 1
#define MOVE_COST 2
#define FIRE_COST 10
#define TRAP_COST 6
#define DOOR_COST 3		// actually 2 + 3 (move + door)

int moving;

#define MAX_WEAPONS 4

/*
	weapon info
*/

int hit_percent[MAX_WEAPONS] = {
	50,
	30,
	65,
	40
};

int hit_damage[MAX_WEAPONS] = {
	40,
	60,
	80,
	50
};

int damage_falloff[MAX_WEAPONS] = {
	2,
	4,
	5,
	3,
};

int weapon_price[MAX_WEAPONS] = {
	250,
	500,
	1000,
	500
};

int ammo_price[MAX_WEAPONS] = {
	20,
	30,
	50,
	40
};

int ammo_count[4] = {
	15,
	12,
	25,
	25
};

char *wname[MAX_WEAPONS] = {
	"Pistol",
	"Shotgun",
	"Assault Rifle",
	"Submachine gun"
};

#define START_MONEY 5000

/*
#define HIT_PERCENT 50	// coming soon different hit percents...
#define HIT_DAMAGE 100	// maximum damage available now, different dam coming..
*/

int deads;
int target = 0;
int soldier = 0;	// start soldier = 0
int sprdir = 0;
extern long team (long x, long y, long z);
extern long xsoldier (long x, long y, long z);
extern int start_mixing;

int sdead = 0;

#define CURRENT_CT2_SAMPLES 13
extern sb_sample *sample[CURRENT_CT2_SAMPLES];
/*
	AI turn silent ???
*/
int silent_AI_turn = 0;

DWORD refresh_ticks;
int counter_soldier;
char output[80];

extern int method;
extern int GenX, GenY;
extern char MouseControlFlag;

extern int firedelay;
extern int keyfirstdelay;
extern int keynextdelay;

int LoadPalette (void);
void DarkenPalette (void);

extern long UpdateTeamFile (void);
extern int human_players;
