#ifndef _structs_h
#define _structs_h

#include "units.h"

typedef struct _loc
{
  int x;
  int y;
} _loc;

typedef struct _aipath
{
  int dir;
  int total_moves;
  _aipath()
  {
    dir = -1;
    total_moves = 0;
  }
} _aipath;

typedef struct _aitarget
{
  int type;
  float health;
  int damage_cost;
  int attacker_cost;
  _loc loc;
} _aitarget;

typedef struct _connectedlocs
{
  vector<_loc> loc;
} _connectedlocs;

typedef struct _globalsettings
{
	bool networking;
	bool sound;
	bool netgame;
	short surrenderval;
	int gamestatus;
	int mspeed;
	int volume;
	int music_volume;
	int fullscreen;
	int particles;
	int maporder;
	int windowed_resolution;
	int current_resolution;
	int screen_width, screen_height;
//	int loaded_game; replaced by gamestate.game_loaded_from_file
//	int very_first_turn; replaced by gamestate.game_just_started
	int scroll_divider;
	int AI_scroll_divider;
	int battle_animation;
	string orignetname, netname;  //orignetname is the user's network name, netname is what the server then tells us to use 
	string netlobby;
	string lastmap;
} _globalsettings;

typedef struct _init_variables
{
	int screenmode;
	int screen_x;
	int screen_y;
	int current_res;
} _init_variables;

typedef struct _ingameoptions
{
	bool show_damage;
	int funding;
	int time;
	void reset();
} _ingameoptions;

typedef struct _action
{
	int type;
	_loc loc;
	_loc destination;
} _action;

typedef struct _actionset
{
	_action action[3];
} _actionset;

typedef struct _buildorder
{
	int unit;
	float ratio;
} _buildorder;

typedef struct setunit  //units predeployed on the map, if any
{
	int x;
	int y;
	int player;
	int type;
	int exist;
} setunit;

typedef struct _maparrange
{
	string name;
	int players;
	int l, h;
	bool bad;
} _maparrange;

typedef struct _armystats
{
	int pricefraction;
	int attackfraction[3];
	int resistfraction[3];
	int movemod;
	int rangemaxmod;
} _armystats;

#endif
