#include <Map.h>
Public Member Functions | |
Map () | |
Public constructor. | |
virtual | ~Map () |
Virtual destructor. | |
void | SetSize (int x, int y) |
Sets map size. | |
int | GetWidth () const |
Gets map width. | |
int | GetHeight () const |
Gets map height. | |
void | Clear () |
Clears map. | |
void | FractalCreate (int maxlevel, int waterlevel) |
Creates map using fractals. | |
Tile * | GetTile (int x, int y) |
Gets tile at given location. | |
Private Attributes | |
int | m_Width |
Map width. | |
int | m_Height |
Map height. | |
Tile * | m_pTile |
Pointer to array of tiles. |
Map | ( | ) |
Public constructor.
~Map | ( | ) | [virtual] |
Virtual destructor.
void SetSize | ( | int | width, | |
int | height | |||
) |
Sets map size.
width | New map width. |
height | New map height. |
int GetWidth | ( | ) | const [inline] |
Gets map width.
int GetHeight | ( | ) | const [inline] |
Gets map height.
void Clear | ( | ) |
Clears map.
void FractalCreate | ( | int | range, | |
int | offset | |||
) |
Creates map using fractals.
The 'range' argument defines the maximum difference between highest and lowest tiles. Allows creation of maps with different vertical scales.
The 'offset' argument defines the amount that tiles are shifted downward. Negative tile levels are treated as water so this value controls the water level on the map.
range | Fractal height range. |
offset | Downward fractal shift. |
Tile * GetTile | ( | int | x, | |
int | y | |||
) |
Gets tile at given location.
x | X coordinate of tile. |
y | Y coordinate of tile. |
Navigation
Home Page
Screen Shots
Developers
Documentation
Doxygen
Namespace List
Class List
Class Hierarchy
File List
Todo List
Links
SDL Library
License
SourceForge Project
Forums
Download
Regimental Command
Copyright © 2008
Randi J. Relander