Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpRangeManager.h
Show First 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | #endif | ||||
virtual void ExploreTerritories() = 0; | virtual void ExploreTerritories() = 0; | ||||
/** | /** | ||||
* Reveal the shore for specified player p. | * Reveal the shore for specified player p. | ||||
* This works like for entities: if RevealShore is called multiple times with enabled, it | * This works like for entities: if RevealShore is called multiple times with enabled, it | ||||
* will be necessary to call it the same number of times with !enabled to make the shore | * will be necessary to call it the same number of times with !enabled to make the shore | ||||
* fall back into the FoW. | * fall back into the FoW. | ||||
*/ | */ | ||||
virtual void RevealShore(player_id_t p, bool enable) = 0; | virtual void RevealShore(player_id_t p, bool enable, u16 h) = 0; | ||||
/** | /** | ||||
* Set whether the whole map should be made visible to the given player. | * Set whether the whole map should be made visible to the given player. | ||||
* If player is -1, the map will be made visible to all players. | * If player is -1, the map will be made visible to all players. | ||||
*/ | */ | ||||
virtual void SetLosRevealAll(player_id_t player, bool enabled) = 0; | virtual void SetLosRevealAll(player_id_t player, bool enabled) = 0; | ||||
/** | /** | ||||
* Set whether vision is blocked by terrain. | |||||
*/ | |||||
virtual void SetVisionBlockingEnabled(bool enabled) = 0; | |||||
/** | |||||
* Returns whether the whole map has been made visible to the given player. | * Returns whether the whole map has been made visible to the given player. | ||||
*/ | */ | ||||
virtual bool GetLosRevealAll(player_id_t player) const = 0; | virtual bool GetLosRevealAll(player_id_t player) const = 0; | ||||
/** | /** | ||||
* Set the LOS to be restricted to a circular map. | * Set the LOS to be restricted to a circular map. | ||||
*/ | */ | ||||
virtual void SetLosCircular(bool enabled) = 0; | virtual void SetLosCircular(bool enabled) = 0; | ||||
Show All 25 Lines | #endif | ||||
virtual u8 GetUnionPercentMapExplored(const std::vector<player_id_t>& players) const = 0; | virtual u8 GetUnionPercentMapExplored(const std::vector<player_id_t>& players) const = 0; | ||||
/** | /** | ||||
* Perform some internal consistency checks for testing/debugging. | * Perform some internal consistency checks for testing/debugging. | ||||
*/ | */ | ||||
virtual void Verify() = 0; | virtual void Verify() = 0; | ||||
/* | |||||
* Return if tile with given coordinates has given los state for player | |||||
* Used by tests | |||||
*/ | |||||
virtual bool TestVisibility(int i, int j, player_id_t player, ELosState state) const = 0; | |||||
/** | |||||
* Get amount of explored vertices by player | |||||
* Used by tests | |||||
*/ | |||||
virtual u32 GetExploredVertices(player_id_t player) const = 0; | |||||
DECLARE_INTERFACE_TYPE(RangeManager) | DECLARE_INTERFACE_TYPE(RangeManager) | ||||
}; | }; | ||||
#endif // INCLUDED_ICMPRANGEMANAGER | #endif // INCLUDED_ICMPRANGEMANAGER |
Wildfire Games · Phabricator