_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <queue>
#include "stratagus.h"
#include "map.h"
#include "actions.h"
#include "fov.h"
#include "minimap.h"
#include "player.h"
#include "tileset.h"
#include "ui.h"
#include "unit.h"
#include "unit_manager.h"
#include "video.h"
#include "../video/intern_video.h"
#include "st_backtrace.h"
Classes | |
class | _filter_flags |
class | _TileSeen< MARK > |
map_fog.cpp - The map fog of war handling. | |
CFieldOfView | FieldOfView |
int | MapFogFilterFlags (CPlayer &player, const unsigned int index, int mask) |
int | MapFogFilterFlags (CPlayer &player, const Vec2i &pos, int mask) |
Filter map flags through fog. More... | |
static void | UnitsOnTileMarkSeen (const CPlayer &player, CMapField &mf, int cloak) |
static void | UnitsOnTileUnmarkSeen (const CPlayer &player, CMapField &mf, int cloak) |
void | MapMarkTileSight (const CPlayer &player, const unsigned int index) |
void | MapMarkTileSight (const CPlayer &player, const Vec2i &pos) |
void | MapUnmarkTileSight (const CPlayer &player, const unsigned int index) |
void | MapUnmarkTileSight (const CPlayer &player, const Vec2i &pos) |
void | MapMarkTileDetectCloak (const CPlayer &player, const unsigned int index) |
void | MapMarkTileDetectCloak (const CPlayer &player, const Vec2i &pos) |
void | MapUnmarkTileDetectCloak (const CPlayer &player, const unsigned int index) |
void | MapUnmarkTileDetectCloak (const CPlayer &player, const Vec2i &pos) |
void | MapSight (const CPlayer &player, const CUnit &unit, const Vec2i &pos, int w, int h, int range, MapMarkerFunc *marker) |
Mark sight changes. More... | |
void | UpdateFogOfWarChange () |
Update fog of war. More... | |
int MapFogFilterFlags | ( | CPlayer & | player, |
const unsigned int | index, | ||
int | mask | ||
) |
Find out what the tile flags are a tile is covered by fog
player | player who is doing operation |
index | map location |
mask | input mask to filter |
Filter map flags through fog.
Mark a tile for cloak detection.
player | Player to mark sight. |
index | Tile to mark. |
Mark a tile's sight. (Explore and make visible.)
player | Player to mark sight. |
index | tile to mark. |
void MapSight | ( | const CPlayer & | player, |
const CUnit & | unit, | ||
const Vec2i & | pos, | ||
int | w, | ||
int | h, | ||
int | range, | ||
MapMarkerFunc * | marker | ||
) |
Mark sight changes.
Mark the sight of unit. (Explore and make visible.)
player | player to mark the sight for (not unit owner) |
pos | location to mark |
w | width to mark, in square |
h | height to mark, in square |
range | Radius to mark. |
marker | Function to mark or unmark sight |
Unmark a tile for cloak detection.
player | Player to mark sight. |
index | tile to mark. |
Assert(*v != 0); This could happen if shadow caster type of field of view is enabled, because of multiple calls for tiles in vertical/horizontal/diagonal lines
Unmark a tile's sight. (Explore and make visible.)
player | Player to mark sight. |
indexx | tile to mark. |
TODO: change ThisPlayer to currently rendered player/players #RenderTargets
Mark all units on a tile as now visible.
player | The player this is for. |
mf | field location to check |
cloak | If we mark cloaked units too. |
This function unmarks units on x, y as seen. It uses a reference count.
player | The player to mark for. |
mf | field to check if building is on, and mark as seen |
cloak | If this is for cloaked units. |
void UpdateFogOfWarChange | ( | ) |
Update fog of war.
Update fog of war.
CFieldOfView FieldOfView |