_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Types of the fog of war.
More...
#include <fow.h>
◆ States
| Enumerator |
|---|
| cFirstEntry | |
| cGenerateFog | |
| cGenerateTexture | |
| cBlurTexture | |
| cReady | |
◆ UpscaleTypes
| Enumerator |
|---|
| cSimple | |
| cBilinear | |
◆ VisionType
| Enumerator |
|---|
| cUnseen | |
| cExplored | |
| cVisible | |
◆ CFogOfWar()
◆ Clean()
| void CFogOfWar::Clean |
( |
const bool |
isHardClean = false | ) |
|
◆ Draw()
Generate fog of war texture for certain viewport.
- Parameters
-
| viewport | viewport to generate fog of war texture for |
| vpFogSurface | surface where to put the generated texture |
◆ EnableBilinearUpscale()
| void CFogOfWar::EnableBilinearUpscale |
( |
const bool |
enable | ) |
|
Enable or disable bilinear upscale for the final fog texture rendering
- Parameters
-
| enable | cmd to enable/disable |
◆ GetExploredOpacity()
| uint8_t CFogOfWar::GetExploredOpacity |
( |
| ) |
const |
|
inline |
◆ GetFogColor()
| CColor CFogOfWar::GetFogColor |
( |
| ) |
const |
|
inline |
◆ GetFogColorSDL()
| uint32_t CFogOfWar::GetFogColorSDL |
( |
| ) |
const |
|
inline |
◆ GetRevealedOpacity()
| uint8_t CFogOfWar::GetRevealedOpacity |
( |
| ) |
const |
|
inline |
◆ GetType()
◆ GetUnseenOpacity()
| uint8_t CFogOfWar::GetUnseenOpacity |
( |
| ) |
const |
|
inline |
◆ GetVisibilityForTile()
| uint8_t CFogOfWar::GetVisibilityForTile |
( |
const Vec2i |
tilePos | ) |
const |
|
inline |
◆ HideVisionFor()
| void CFogOfWar::HideVisionFor |
( |
const CPlayer & |
player | ) |
|
|
inline |
◆ Init()
+1 to the top & left and +1 to the bottom & right for 4x scale algorithm purposes, Extra tiles will always be VisionType::cUnseen.
TODO: Add fog initialization for replays and observer players
◆ InitBlurer()
| void CFogOfWar::InitBlurer |
( |
const float |
radius1, |
|
|
const float |
radius2, |
|
|
const uint16_t |
numOfIterations |
|
) |
| |
◆ IsBilinearUpscaleEnabled()
| bool CFogOfWar::IsBilinearUpscaleEnabled |
( |
| ) |
const |
|
inline |
◆ SetFogColor() [1/2]
◆ SetFogColor() [2/2]
| void CFogOfWar::SetFogColor |
( |
const uint8_t |
r, |
|
|
const uint8_t |
g, |
|
|
const uint8_t |
b |
|
) |
| |
◆ SetOpacityLevels()
| void CFogOfWar::SetOpacityLevels |
( |
const uint8_t |
explored, |
|
|
const uint8_t |
revealed, |
|
|
const uint8_t |
unseen |
|
) |
| |
Set fog of war opacity (alpha chanel values) for different levels of visibility
- Parameters
-
| explored | alpha channel value for explored tiles |
| revealed | alpha channel value for revealed tiles (when the map revealed) |
| unseen | alpha channel value for unseen tiles |
◆ SetTiledFogGraphic()
| void CFogOfWar::SetTiledFogGraphic |
( |
const std::string & |
fogGraphicFile | ) |
|
|
static |
◆ SetType()
Select which type of Fog of War to use
- Parameters
-
- Returns
- true if success, false for wrong fow_type
◆ ShowVisionFor()
| void CFogOfWar::ShowVisionFor |
( |
const CPlayer & |
player | ) |
|
|
inline |
◆ Update()
| void CFogOfWar::Update |
( |
bool |
doAtOnce = false | ) |
|
Proceed fog of war state update
- Parameters
-
| doAtOnce | command to calculate fog of war in single sycle |
pass through
FogOfWarTypes::cEnhanced
The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The