$treeview $search $mathjax
Stratagus
2.2.7
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <minimap.h>
minimap.cpp - The minimap. | |
void | UpdateXY (const Vec2i &pos) |
void | Update () |
void | Create () |
void | FreeOpenGL () |
void | Reload () |
void | Destroy () |
void | Draw () const |
void | DrawViewportArea (const CViewport &viewport) const |
void | AddEvent (const Vec2i &pos, Uint32 color) |
Vec2i | ScreenToTilePos (const PixelPos &screenPos) const |
PixelPos | TilePosToScreenPos (const Vec2i &tilePos) const |
bool | Contains (const PixelPos &screenPos) const |
Public Member Functions | |
CMinimap () | |
void | UpdateSeenXY (const Vec2i &) |
Public Attributes | |
int | X |
int | Y |
int | W |
int | H |
int | XOffset |
int | YOffset |
bool | WithTerrain |
bool | ShowSelected |
bool | Transparent |
bool | UpdateCache |
CMinimap::CMinimap | ( | ) | [inline] |
void CMinimap::UpdateXY | ( | const Vec2i & | pos | ) |
Update a single minimap tile after a change
pos | The map position to update in the minimap |
void CMinimap::UpdateSeenXY | ( | const Vec2i & | ) | [inline] |
void CMinimap::Update | ( | ) |
Update the minimap with the current game information
void CMinimap::Create | ( | ) |
Create a mini-map from the tiles of the map.
void CMinimap::FreeOpenGL | ( | ) |
Free OpenGL minimap
void CMinimap::Reload | ( | ) |
Reload OpenGL minimap
void CMinimap::Destroy | ( | ) |
Destroy mini-map.
void CMinimap::Draw | ( | ) | const |
Draw the minimap on the screen
void CMinimap::DrawViewportArea | ( | const CViewport & | viewport | ) | const |
Draw viewport area contour.
void CMinimap::AddEvent | ( | const Vec2i & | pos, | |
Uint32 | color | |||
) |
Add a minimap event
pos | Map tile position |
Convert screen position to tile map coordinate.
screenPos | Screen pixel coordinate. |
Convert tile map coordinate to screen position.
tilePos | Tile coordinate. |
bool CMinimap::Contains | ( | const PixelPos & | screenPos | ) | const |
int CMinimap::X |
int CMinimap::Y |
int CMinimap::W |
int CMinimap::H |