//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef RTSSHAREDDEFS_H
#define RTSSHAREDDEFS_H

// says how many units we can select
#define DEFAULT_TEAMS 3				// the default teams, not playable
#define MAX_TEAMS_ID_RTS	8			// max amount of rts players. The team in playerresource should be used for alliances.

// general rts playdata
//#define MAXSELECTED		32
#define MAXSELECTED		64			// max amount of units we can select
//#define MAXUNITSLOTS	8			// max unit slots we have
#define MAXUNITSLOTS	80			// max unit slots we have. See hud_rts_unitpanel.h for all scale types
#define MAXABILITIESSLOTS 12		// max ability slots we have
#define MAX_ABILITYTYPES 100
#define CAPTURE_TIME 10.0f			// time needed to capture a point
#define CAPTURE_ADDRESOURCES 25
#define CAPTURE_NEXTADDRES 10.0f

// hud materials
// effects materials
#define	QUAD_TO_SELECT	"effects/select.vmt"
#define	QUAD_TO_MOVE	"effects/move.vmt"

#define QUEUE_MAX 5

// available slot modify options
enum GR_RTS_SLOTOPTIONS
{
	GROPEN_SLOT = 0,
	GROCCUPY_SLOT,
	GRCPUOCCUPY_SLOT,
	TOTAL_SLOTOPTIONS,		// always last!
};

// the type that is occuping the slot, human or cpu
enum GR_RTS_SLOTTYPES
{
	GRTYPE_NONE = 0,
	GRTYPE_HUMAN,
	GRTYPE_CPU,
	TOTAL_SLOTTYPES,	// always last!
};

// available colors
enum RTS_Colors
{
	GRCOLOR_NONE = 0,
	GRCOLOR_ORANGE,
	GRCOLOR_BLUE,
	GRCOLOR_CYAN,
	GRCOLOR_GREEN,
	GRCOLOR_RED,
	TOTAL_COLORS,		// always last!
};

// strategy text colors, used to inform the commander about an event
enum StrategyColors
{
	S_GREEN = 0,
	S_RED,
	S_TOTALTYPES,
};

// objective events types
enum Objective_Events
{
	OBJECTIVE_COMPLETED = 0,
	OBJECTIVE_FAILED,
	OBJECTIVE_SETVISIBLE,
	OBJECTIVE_HIDE,
};

// behaviors
//-----------------------------------------------------------------------------
// Purpose: names behaviors npc rts
//-----------------------------------------------------------------------------
enum RTSBehavior
{
	BEHAVIOR_NORMAL = 0,
	BEHAVIOR_AGGRESSIVE,	
};

// button bit masks
#define IN_BUTTON_NORMAL		    (1 << 0)
#define IN_BUTTON_AGGRESSIVE		(1 << 1)

//-----------------------------------------------------------------------------
// Purpose: Order types
//-----------------------------------------------------------------------------
enum RTSOrders
{
	ORDER_IDLE = 0,				// the order will also return to this state when done
	ORDER_MOVE,
	ORDER_ATTACK,
	ORDER_ACTION,
	ORDER_GROUNDATTACK,
	ORDER_DO_ABILITY,
};

//-----------------------------------------------------------------------------
// Purpose: All availabe abilities for units ( like structures, traps, etc )
//			When updating this list, also update the list in rts_parsedata.cpp!
//-----------------------------------------------------------------------------
enum ABILITIES
{
	ABILITY_NONE = 0,
	ABILITY_TURRET,	
	ABILITY_GRENADE,		// ability to throw a grenade
	ABILITY_HEAL,
	ABILITY_COMB_MINE,
	ABILITY_BUILDING,
	ABILITY_STRIDER_CANNON,
	ABILITY_TYPES_COUNT,
};

//-----------------------------------------------------------------------------
// Purpose: Reserve first three numbers for a team neutral and team enemy. Team 
// default means it just uses the default relationships from hl2. Team neutral 
// will never attack a player or other team, but won't help them too. 
// Team enemy will attack everybody.
//-----------------------------------------------------------------------------
enum TEAMSRTS
{
	TEAMRTS_DEFAULT = 0,
	TEAMRTS_NEUTRAL,
	TEAMRTS_ENEMY,
};

//-----------------------------------------------------------------------------
// Purpose: The available factions in this game
//-----------------------------------------------------------------------------
enum FACTION
{
	FACTION_REBEL = 0,
	FACTION_COMBINE,
};

//-----------------------------------------------------------------------------
// Purpose: Use these to indentify what kind of brush type we got ( some we can 
//			select, or maybe we want a different kind of mouse cursor for the 
//			client)
//			FIXME: Wrong naming
//-----------------------------------------------------------------------------
enum MOUSEBRUSH_TYPES
{
	MOUSEBRUSH_BASIC = 0,
	MOUSEBRUSH_ORDER,
	MOUSEBRUSH_BUILDING,
};

//-----------------------------------------------------------------------------
// Purpose: Use these to indentify what selection we got
//-----------------------------------------------------------------------------
enum SELECTION_TYPES
{	
	SELECTION_UNIT = 0,
	SELECTION_BUILDING,
	SELECTION_CAPTUREPOINT,
};

//-----------------------------------------------------------------------------
// Purpose: Fog of War parameters
//-----------------------------------------------------------------------------
// NOTE: When changing these values, also change the procedural generated texture in materials/fow/fow!!!
#define FOW_TILESIZE 64		// tile size in units
#define FOW_SIZE 32768

//-----------------------------------------------------------------------------
// Purpose: Custom way to clear or read fow
//-----------------------------------------------------------------------------
struct changefogofwar_t
{
	int type;
	Vector2D position;
	float radius;
	float delay;	// usage: delay = gpGlobals->curtime + delay; 
};

enum CHANGE_FOW
{
	FOW_CLEAR = 0,
	FOW_CLEARREMOVE,
	FOW_ADD,	// this would work like a gab generator or something
	FOW_ADDREMOVE,
};

// fow, basenpc
#define MAXFOWOBJ 5

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
typedef struct ability_state_t 
{
	bool m_bAvailable;		// can we use it?
	bool m_bOverridable;	// can be changed by the tech tree

	// this is for buildings and upgrades. It counts the buildings of this type.
	// In case the upgrade is done, this is 1.
	int m_iCount;
} ability_state_t;

enum MESSAGES_GR
{
	AS_NEW = 0,
	AS_MSTATE,
	AS_MCOUNT,
};

#endif // RTSSHAREDDEFS_H