#ifndef _structs_h
#define _structs_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 sound;
  int gamestatus;
  int mspeed;
  int volume;
  int music_volume;
  int fullscreen;
  int particles;
  int maporder;
  int windowed_resolution;
	int screen_width, screen_height;
  int loaded_game;
  int very_first_turn;
  int scroll_divider;
  int AI_scroll_divider;
  int battle_animation;
} _globalsettings;

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

typedef struct _logic_variables
{
  bool first;
  bool cancel_attack;
  bool cancel_unload;
  bool cancel_teleport;
  int unitselected;
  int oldux, olduy;
  int attacker, defender;
  int unitx, unity;
  int movedthisturn;
  int unitmenu;
  int oldmx, oldmy, oldcapstatus, unloadstatus;
  int unloadnum;
  int windelay;
  int logicstate;
  int unitmoving;
  int time;
  int theplayer;
} _logic_variables;

typedef struct _mission_variables
{
  int mission_number;
  int modeflag;
  int daysleft;
  int defendx, defendy;
  int conquerx, conquery;
  int first_opponent;  //only used in the menu
} _mission_variables;

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;

#endif
