hoa_map::MapTile Class Reference

Represents a single tile on the map. More...

#include <map.h>

Collaboration diagram for hoa_map::MapTile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MapTile (int16 lower, int16 middle, int16 upper)
 MapTile ()

Public Attributes

Tile Layer Indeces
Indeces to MapMode::_tile_images, mapping to the three tile layers.

Note:
A value less than zero means that no image is registered to that tile layer.


int16 lower_layer
int16 middle_layer
int16 upper_layer

Detailed Description

Represents a single tile on the map.

****************************************************************************

The images that a tile uses are not stored within this class. They are stored in the MapMode::_tile_images vector, and this class contains three indices to images in that vector. This class also does not contain any information about walkability. That information is kept in a seperate vector in the MapMode class.

Note:
The reason that tiles do not contain walkability information is that each tile is 32x32 pixels, but walkability is defined on a 16x16 granularity, meaning that there are four "walkable" sections to each tile. Code such as pathfinding is more simple if all walkability information is kept in a seperate container.

The coordinate system in MapMode is in terms of tiles. Specifically, the screen is defined to be 32 tile columns wide and 24 tile rows high. Using 32x32 tile images, this corresponds to a screen resolution of 1024x768, which is the default screen resolution of Allacrost. The origin [0.0f, 0.0f] is the top-left corner of the screen and the bottom-right corner coordinates are [32.0f, 24.0f]. Both map tiles and map objects in Allacrost are drawn on the screen using the bottom middle of the image as its reference point.

Definition at line 228 of file map.h.


Constructor & Destructor Documentation

hoa_map::MapTile::MapTile (  )  [inline]

Definition at line 238 of file map.h.

References lower_layer, middle_layer, and upper_layer.

hoa_map::MapTile::MapTile ( int16  lower,
int16  middle,
int16  upper 
) [inline]

Definition at line 241 of file map.h.

References lower_layer, middle_layer, and upper_layer.


Member Data Documentation

int16 hoa_map::MapTile::lower_layer

Definition at line 235 of file map.h.

Referenced by MapTile().

int16 hoa_map::MapTile::middle_layer

Definition at line 235 of file map.h.

Referenced by MapTile().

int16 hoa_map::MapTile::upper_layer

Definition at line 235 of file map.h.

Referenced by MapTile().


The documentation for this class was generated from the following file:
Generated on Fri Jul 6 23:14:41 2007 for Hero of Allacrost by  doxygen 1.5.1