$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

CMinimap Class Reference

#include <minimap.h>

List of all members.


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

Constructor & Destructor Documentation

CMinimap::CMinimap (  )  [inline]


Member Function Documentation

void CMinimap::UpdateXY ( const Vec2i pos  ) 

Update a single minimap tile after a change

Parameters:
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.

Todo:
Scaling and scrolling the minmap is currently not supported.

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

Parameters:
pos Map tile position

Vec2i CMinimap::ScreenToTilePos ( const PixelPos screenPos  )  const

Convert screen position to tile map coordinate.

Parameters:
screenPos Screen pixel coordinate.
Returns:
Tile coordinate.

PixelPos CMinimap::TilePosToScreenPos ( const Vec2i tilePos  )  const

Convert tile map coordinate to screen position.

Parameters:
tilePos Tile coordinate.
Returns:
Screen pixel coordinate.

bool CMinimap::Contains ( const PixelPos screenPos  )  const


Member Data Documentation


The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.