$treeview $search $mathjax
Stratagus  2.2.6
$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 (int vx, int vy)
void DrawCursor (int vx, int vy)
void AddEvent (int x, int y, Uint32 color)
int Screen2MapX (int x)
int Screen2MapY (int y)

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 ( int  vx,
int  vy 
)

Draw the minimap on the screen

void CMinimap::DrawCursor ( int  vx,
int  vy 
)

Draw minimap cursor.

Parameters:
vx View point X position.
vy View point Y position.

void CMinimap::AddEvent ( int  x,
int  y,
Uint32  color 
)

Add a minimap event

Parameters:
x Map X tile position
y Map Y tile position

int CMinimap::Screen2MapX ( int  x  ) 

Convert minimap cursor X position to tile map coordinate.

Parameters:
x Screen X pixel coordinate.
Returns:
Tile X coordinate.

int CMinimap::Screen2MapY ( int  y  ) 

Convert minimap cursor Y position to tile map coordinate.

Parameters:
y Screen Y pixel coordinate.
Returns:
Tile Y coordinate.


Member Data Documentation


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