Syndicate::Data::MapTile Class Reference

#include <Syndicate/Data/MapTile.h>

Inheritance diagram for Syndicate::Data::MapTile:

Syndicate::Data::File List of all members.

Public Member Functions

 MapTile (void)
 ~MapTile (void)
template<typename TColors>
void get (uint8_t id, TColors *tile, unsigned pitch=_width, const TColors *colors=Colors< TColors >::_default) const
virtual void info (void)
bool load (char const *filename)
unsigned getLength (void)

Static Public Attributes

static const unsigned _nb_tiles = 256
static const unsigned _sub_tiles_per_tile_x = 2
static const unsigned _sub_tiles_per_tile_y = 3
static const unsigned _sub_tiles_per_tile = _sub_tiles_per_tile_x * _sub_tiles_per_tile_y
static const unsigned _width = _sub_tiles_per_tile_x * MapSubTile::_width
static const unsigned _height = _sub_tiles_per_tile_y * MapSubTile::_height
static const unsigned _width_on_map = 256
static const unsigned _height_on_map = 256
static const unsigned _depth_on_map = 128
static const unsigned _min_offset = _nb_tiles * _sub_tiles_per_tile * sizeof(le_uint32_t)

Protected Attributes

unsigned _data_length

Private Attributes

Data_data

Classes

struct  Data

Detailed Description

This class allow to access the hblk01.dat file.


Constructor & Destructor Documentation

Syndicate::Data::MapTile::MapTile ( void   )  [inline]

Syndicate::Data::MapTile::~MapTile ( void   )  [inline]


Member Function Documentation

template<typename TColors>
void Syndicate::Data::MapTile::get ( uint8_t  id,
TColors *  tile,
unsigned  pitch = _width,
const TColors *  colors = Colors< TColors >::_default 
) const [inline]

This method extract pixels of the tile in the tile array of uint8_t (palettized) or uint32_t (4bpp).

Parameters:
[in] id 
[out] tile array of pixels where the data should be stored
[in] pitch length of a scanline of tile in bytes
[in] colors lut for mapping palette indexes on the format of pixels

virtual void Syndicate::Data::File::info ( void   )  [virtual, inherited]

In debug mode it display the informations.

bool Syndicate::Data::File::load ( char const *  filename  )  [inherited]

This method load the content (unpacked) of the file at the adress pointed by _data.

Parameters:
[in] filename the name of the file.
Return values:
true if success.
false if fails. If previous file is loaded, the data keep unaffected.

unsigned Syndicate::Data::File::getLength ( void   )  [inline, inherited]


Member Data Documentation

const unsigned Syndicate::Data::MapTile::_nb_tiles = 256 [static]

const unsigned Syndicate::Data::MapTile::_sub_tiles_per_tile_x = 2 [static]

const unsigned Syndicate::Data::MapTile::_sub_tiles_per_tile_y = 3 [static]

const unsigned Syndicate::Data::MapTile::_sub_tiles_per_tile = _sub_tiles_per_tile_x * _sub_tiles_per_tile_y [static]

const unsigned Syndicate::Data::MapTile::_width = _sub_tiles_per_tile_x * MapSubTile::_width [static]

const unsigned Syndicate::Data::MapTile::_height = _sub_tiles_per_tile_y * MapSubTile::_height [static]

const unsigned Syndicate::Data::MapTile::_width_on_map = 256 [static]

const unsigned Syndicate::Data::MapTile::_height_on_map = 256 [static]

const unsigned Syndicate::Data::MapTile::_depth_on_map = 128 [static]

const unsigned Syndicate::Data::MapTile::_min_offset = _nb_tiles * _sub_tiles_per_tile * sizeof(le_uint32_t) [static]

Data* Syndicate::Data::MapTile::_data [private]

Reimplemented from Syndicate::Data::File.

unsigned Syndicate::Data::File::_data_length [protected, inherited]


The documentation for this class was generated from the following file:
Generated on Sun Sep 30 13:08:36 2007 for libSyndicate by  doxygen 1.5.2