Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
#include "precompiled.h"
#include "simulation2/system/Component.h"
#include "ICmpTerritoryManager.h"
#include "graphics/Overlay.h"
#include "graphics/Terrain.h"
#include "graphics/TextureManager.h"
#include "graphics/TerritoryBoundary.h"
#include "maths/MathUtil.h"
#include "ps/Profile.h"
#include "ps/XML/Xeromyces.h"
#include "renderer/Renderer.h"
#include "renderer/Scene.h"
#include "renderer/TerrainOverlay.h"
#include "simulation2/MessageTypes.h"
#include "simulation2/components/ICmpOwnership.h"
#include "simulation2/components/ICmpPathfinder.h"
#include "simulation2/components/ICmpPlayer.h"
#include "simulation2/components/ICmpPlayerManager.h"
#include "simulation2/components/ICmpPosition.h"
#include "simulation2/components/ICmpTerritoryDecayManager.h"
#include "simulation2/components/ICmpTerritoryInfluence.h"
#include "simulation2/helpers/Grid.h"
#include "simulation2/helpers/Render.h"
#include <queue>
Classes | |
class | TerritoryOverlay |
class | CCmpTerritoryManager |
struct | CCmpTerritoryManager::SBoundaryLine |
struct | Tile |
Functions | |
template<typename Decider > | |
void | Floodfill (const Tile &origin, const Tile &gridSize, Decider decider) |
Queue based eight directional floodfill algorithm. More... | |
static void | NearestTerritoryTile (entity_pos_t x, entity_pos_t z, u16 &i, u16 &j, u16 w, u16 h) |
Compute the tile indexes on the grid nearest to a given point. More... | |
void Floodfill | ( | const Tile & | origin, |
const Tile & | gridSize, | ||
Decider | decider | ||
) |
Queue based eight directional floodfill algorithm.
origin | Where to start the floodfill. In the first iteration it is passed as the second argument to the |
true
. gridSize | Tiles outside the boundary are never exteded. The |
decider | It is called with a tile wich was already added as the first argument and a neighbour as the second argument. The invocation shall return whether to extend the wavefront to the neighbour (if allways true is returned, an infinite loop will occur). In the first iteration the |
|
static |
Compute the tile indexes on the grid nearest to a given point.