____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

CMinimap Class Reference

#include <minimap.h>

List of all members.

Public Member Functions

 CMinimap ()
void UpdateTerrain ()
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)
int Screen2MapX (int x)
int Screen2MapY (int y)

Public Attributes

int X
int Y
int W
int H
int XOffset
int YOffset
bool WithTerrain
bool ShowSelected
bool Transparent


Detailed Description

Definition at line 37 of file minimap.h.


Constructor & Destructor Documentation

CMinimap::CMinimap (  )  [inline]

Definition at line 40 of file minimap.h.


Member Function Documentation

void CMinimap::UpdateTerrain (  ) 

void CMinimap::Update (  ) 

void CMinimap::Create ( void   ) 

void CMinimap::FreeOpenGL (  ) 

Free OpenGL minimap

Definition at line 176 of file minimap.cpp.

References MinimapTexture.

Referenced by CVideo::ResizeScreen().

void CMinimap::Reload (  ) 

Reload OpenGL minimap

Definition at line 184 of file minimap.cpp.

References CreateMinimapTexture().

Referenced by ReloadOpenGL().

void CMinimap::Destroy (  ) 

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

Draw the minimap on the screen

Definition at line 486 of file minimap.cpp.

References DrawEvents(), H, MinimapSurface, MinimapSurfaceGL, MinimapTexture, MinimapTextureHeight, MinimapTextureWidth, TheScreen, UseOpenGL, W, X, and Y.

Referenced by EditorUpdateDisplay(), and UpdateDisplay().

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

Draw minimap cursor.

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

Definition at line 578 of file minimap.cpp.

References CVideo::DrawTransRectangle(), CViewport::MapHeight, CViewport::MapWidth, MINIMAP_FAC, MinimapScaleX, MinimapScaleY, CUserInterface::SelectedViewport, UI, Video, CUserInterface::ViewportCursorColor, X, XOffset, Y, y, and YOffset.

Referenced by EditorUpdateDisplay(), and UpdateDisplay().

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

Add a minimap event

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

Definition at line 596 of file minimap.cpp.

References H, MAX_MINIMAP_EVENTS, MINIMAP_FAC, MinimapEvents, MinimapScaleX, MinimapScaleY, NumMinimapEvents, MinimapEvent::Size, W, X, MinimapEvent::X, XOffset, Y, MinimapEvent::Y, and YOffset.

Referenced by CPlayer::Notify().

int CMinimap::Screen2MapX ( int  x  ) 

Convert minimap cursor X position to tile map coordinate.

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

Definition at line 519 of file minimap.cpp.

References CMap::Info, Map, CMapInfo::MapWidth, MINIMAP_FAC, MinimapScaleX, X, and XOffset.

Referenced by EditorCallbackButtonDown(), EditorCallbackMouse(), UIHandleButtonDown(), UIHandleMouseMove(), and UISelectStateButtonDown().

int CMinimap::Screen2MapY ( int  y  ) 

Convert minimap cursor Y position to tile map coordinate.

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

Definition at line 534 of file minimap.cpp.

References CMap::Info, Map, CMapInfo::MapHeight, MINIMAP_FAC, MinimapScaleY, Y, and YOffset.

Referenced by EditorCallbackButtonDown(), EditorCallbackMouse(), UIHandleButtonDown(), UIHandleMouseMove(), and UISelectStateButtonDown().


Member Data Documentation

Definition at line 60 of file minimap.h.

Referenced by AddEvent(), Create(), DrawCursor(), DrawUnitOn(), Screen2MapX(), and UpdateTerrain().

Definition at line 61 of file minimap.h.

Referenced by AddEvent(), Create(), DrawCursor(), DrawUnitOn(), Screen2MapY(), and UpdateTerrain().

Definition at line 62 of file minimap.h.

Referenced by CclSetMinimapTerrain(), UiToggleTerrain(), and Update().

Definition at line 63 of file minimap.h.

Referenced by DrawUnitOn().

Definition at line 64 of file minimap.h.

Referenced by Update().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:23 2009 for Bos Wars by  doxygen 1.5.6