TileMap Class Reference
Provides a generic interface for dealing with tiles.
More...
#include <Backgrounds.hpp>
Inheritance diagram for TileMap:
[legend]Collaboration diagram for TileMap:
[legend]List of all members.
|
Public Member Functions |
|
| TileMap (TileManagerScreen screen, int tile_index, int map_index, TileManagerColors bg_colors, int bg_num=1) |
| | Simply reinvokes the base-class constructor.
|
Private Types |
|
typedef TileManagerBase | inherited |
| | Typedef to aid in changing class heirarchies without a lot of code change.
|
Detailed Description
Provides a generic interface for dealing with tiles.
Does housekeeping work and provides access to the map. Handles various sizes of tiles to background mappings. Defaults to background layer 2. To access the map, do something like this, but include error checking:
TileMap tm(TOP_SCREEN, 1, 0, COLORS_256, 0);
tm.
prepare(tileData,
sizeof(tileData), paletteData,
sizeof(paletteData);
tm.
load();
int x = 0, y = 0;
for(x = 0; x < 32; ++x) {
for(y = 0; y < 24; ++y) {
tm[x][y] = tileMap[x + y * 32];
}
}
- Todo:
- code operator[]
The documentation for this class was generated from the following files:
Generated on Fri Apr 22 13:47:46 2005 for PhoenixRising NDS Library by
1.3.6