18#ifndef INCLUDED_ICMPTERRITORYMANAGER
19#define INCLUDED_ICMPTERRITORYMANAGER
42 virtual bool NeedUpdateAI(
size_t* dirtyID,
size_t* dirtyBlinkingID)
const = 0;
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
A simple fixed-point number class.
Definition: Fixed.h:120
Basic 2D array, intended for storing tile data, plus support for lazy updates by ICmpObstructionManag...
Definition: Grid.h:38
Definition: ICmpTerritoryManager.h:32
virtual void SetVisibility(bool visible)=0
Enables or disables rendering of an territory borders.
virtual void SetTerritoryBlinking(entity_pos_t x, entity_pos_t z, bool enable)=0
Set a piece of territory to blinking.
virtual const Grid< u8 > & GetTerritoryGrid()=0
For each tile, the TERRITORY_PLAYER_MASK bits are player ID; TERRITORY_CONNECTED_MASK is set if the t...
virtual bool IsTerritoryBlinking(entity_pos_t x, entity_pos_t z)=0
Check if a piece of territory is blinking.
virtual player_id_t GetOwner(entity_pos_t x, entity_pos_t z)=0
Get owner of territory at given position.
static const int TERRITORY_PROCESSED_MASK
Definition: ICmpTerritoryManager.h:55
static const int TERRITORY_BLINKING_MASK
Definition: ICmpTerritoryManager.h:54
virtual bool NeedUpdateTexture(size_t *dirtyID)=0
Returns whether the territory texture needs to be updated.
static const int NAVCELLS_PER_TERRITORY_TILE
Number of pathfinder navcells per territory tile.
Definition: ICmpTerritoryManager.h:50
static const int TERRITORY_PLAYER_MASK
Definition: ICmpTerritoryManager.h:52
virtual u8 GetTerritoryPercentage(player_id_t player)=0
Returns the percentage of the world controlled by a given player as defined by the number of territor...
virtual bool IsConnected(entity_pos_t x, entity_pos_t z)=0
Get whether territory at given position is connected to a root object (civ center etc) owned by that ...
virtual std::vector< u32 > GetNeighbours(entity_pos_t x, entity_pos_t z, bool filterConnected)=0
get the number of neighbour tiles for per player for the selected position
virtual void UpdateColors()=0
Updates the boundary and territory colors.
static const int TERRITORY_CONNECTED_MASK
Definition: ICmpTerritoryManager.h:53
virtual bool NeedUpdateAI(size_t *dirtyID, size_t *dirtyBlinkingID) const =0
Returns whether the AI territory map needs to be updated.
Definition: IComponent.h:33
uint8_t u8
Definition: types.h:37