_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"
#include "map.h"
#include "actions.h"
#include "minimap.h"
#include "player.h"
#include "ui.h"
#include "unit.h"
#include "unit_manager.h"
#include "video.h"
#include "../video/intern_video.h"
Classes | |
class | _filter_flags |
class | _TileSeen< MARK > |
Macros | |
#define | IsMapFieldExploredTable(index) (VisibleTable[(index)]) |
#define | IsMapFieldVisibleTable(index) (VisibleTable[(index)] > 1) |
map_fog.cpp - The map fog of war handling. | |
int | FogOfWarOpacity |
Path to the current map. More... | |
Uint32 | FogOfWarColorSDL |
Fog of war Opacity. More... | |
CColor | FogOfWarColor |
fog of war color More... | |
static const int | FogTable [16] |
static std::vector< unsigned short > | VisibleTable |
static SDL_Surface * | OnlyFogSurface |
static CGraphic * | AlphaFogG |
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 Vec2i &pos, int w, int h, int range, MapMarkerFunc *marker) |
Mark sight changes. More... | |
void | UpdateFogOfWarChange () |
Update fog of war. More... | |
void | VideoDrawOnlyFog (int x, int y) |
static void | GetFogOfWarTile (int sx, int sy, int *fogTile, int *blackFogTile) |
static void | DrawFogOfWarTile (int sx, int sy, int dx, int dy) |
#define IsMapFieldExploredTable | ( | index | ) | (VisibleTable[(index)]) |
#define IsMapFieldVisibleTable | ( | index | ) | (VisibleTable[(index)] > 1) |
|
static |
Draw fog of war tile.
sx | Offset into fields to current tile. |
sy | Start of the current row. |
dx | X position into video memory. |
dy | Y position into video memory. |
|
static |
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.
void MapMarkTileDetectCloak | ( | const CPlayer & | player, |
const unsigned int | index | ||
) |
Mark a tile for cloak detection.
player | Player to mark sight. |
index | Tile to mark. |
void MapMarkTileSight | ( | const CPlayer & | player, |
const unsigned int | index | ||
) |
Mark a tile's sight. (Explore and make visible.)
player | Player to mark sight. |
index | tile to mark. |
void MapSight | ( | const CPlayer & | player, |
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 |
void MapUnmarkTileDetectCloak | ( | const CPlayer & | player, |
const unsigned int | index | ||
) |
Unmark a tile for cloak detection.
player | Player to mark sight. |
index | tile to mark. |
void MapUnmarkTileSight | ( | const CPlayer & | player, |
const unsigned int | index | ||
) |
Unmark a tile's sight. (Explore and make visible.)
player | Player to mark sight. |
indexx | tile to mark. |
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.
void VideoDrawOnlyFog | ( | int | x, |
int | y | ||
) |
Draw only fog of war
x | X position into video memory |
y | Y position into video memory |
|
static |
CColor FogOfWarColor |
fog of war color
Uint32 FogOfWarColorSDL |
Fog of war Opacity.
int FogOfWarOpacity |
Path to the current map.
Contrast of fog of war
|
static |
Mapping for fog of war tiles.
|
static |
|
static |