Class hierarchy Compound list File list Compound Members
Map2D Class Reference
Map2D - This type holds all the layers for a complete game level. More...
List of all members.
Public Members
- Map2D (int isoMap=0)
- Default Constructor.
- long add (const Layer2D* layer)
- Add a layer to the map.
- long remove (const Layer2D* layer)
- Remove a layer from the map and delete it.
- long changePriority (Layer2D* layer, const int priority)
- Change the priority of a layer within the map.
- Layer2D* getLayer (const String& name) const
- Retrieve a layer by name.
- long render (View& view)
- Render the map to the specified view.
- long advance (float Fraction)
- Advance each layer of the map by Fraction.
- int isIsoMap () const
- Returns non-zero if this is an isoMap.
Detailed Description
Map2D - This type holds all the layers for a complete game level.
It has member functions for layer maintenance and rendering.
Highest priority layers are displayed last (covering those of lower
priority where they overlap; hovewer, portions of a layer may be, and
usually are, transparent).
Member Function Documentation
Map2D::Map2D(int isoMap=0)
Default Constructor.
If isoMap is non-zero, the map may not contain
TileLayers. If isoMap is zero (the default), the map may not
contain IsoTileLayers. An attempt is made to add a disallowed layer
will fail. Rendering methods are entirely different for the two
types of maps.
long Map2D::add(const Layer2D* layer)
Add a layer to the map.
Each layer must have a unique name.
layers are ordered by priority. if multiple layers have the
same priority, they are arranged in the order added.
long Map2D::remove(const Layer2D* layer)
Remove a layer from the map and delete it.
long Map2D::changePriority(Layer2D* layer, const int priority)
Change the priority of a layer within the map.
Layer2D* Map2D::getLayer(const String& name) const
Retrieve a layer by name.
long Map2D::render(View& view)
Render the map to the specified view.
long Map2D::advance(float Fraction)
Advance each layer of the map by Fraction.
int Map2D::isIsoMap() const
Returns non-zero if this is an isoMap.
The documentation for this class was generated from the following file: