Overview Chapter

class CDXMap

Constructors and Destructors
CDXMapCDXMap Default Constructor.
CDXMapCDXMap Constructor.
~CDXMapDefault destructor.
Overridables
BltTileInternal function to blt a tile to the screen.
BltTileTransInternal function to blt a tile transparently to the screen.
ClearClears out the map and sets all the map tiles to 0.
CreateCreates a new map.
DrawDraws the map to the surface pointed to by lpDDS.
DrawClippedDraws the map to the surface pointed to by lpDDS.
DrawTransDraws the map to the surface pointed to by lpDDS with transparent tiles.
FillFills the map with a tile specified by TileNum.
GetCellThis gets the CDXMapCell object from the map at the given MapX and MapY coordinates.
GetTileReturns the value of the tile at MapX, MapY.
GetTileCoordThis returns a RECT struct containing the coordinates of any tile in the map relative to screen coordinates.
InitDataInitializes the array of data with the specified fill value.
LoadLoads a map from a file.
LoadTilesLoads a different set of tiles to the map.
MoveToSet the position in the map.
SaveSaves a map to a file.
ScreenTileSizeSets the screen tile width and screen tile height.
ScrollDownScroll the map down by the offset passed in.
ScrollLeftScroll the map left by the offset passed in.
ScrollRightScroll the map right by the offset passed in.
ScrollUpScroll the map upwards by the offset passed in.
SetTileSets the value of the tile at MapX, MapY.
SetViewPortSets the top left coordinates of the viewport and sets the screen width and height in map units.
WrapScrollDownScroll the map down by the offset passed in.
WrapScrollLeftScroll the map left by the offset passed in.
WrapScrollRightScroll the map right by the offset passed in.
WrapScrollUpScroll the map up by the offset passed in.
   
                      
Data Members
public
CDXMapCell* DATA;Pointer to the CDXMapCell object for tiles.
int SCREEN_H;Screen pixel height, from CDXScreen pointer.
int SCREEN_TH;Number of tiles high on screen.
int SCREEN_TW;Number of tiles wide on screen.
int SCREEN_W;Screen pixel width, from CDXScreen pointer.
int SIZE;Map size, width * height.
CDXScreen* Screen;Pointer to the CDXScreen object.
CDXTile* Tiles;Pointer to the CDXTile object.
int m_Height;The map height in map units.
int m_PixelHeight;The height of the map in pixels.
int m_PixelWidth;The width of the map in pixels.
int m_PosX;The current map X position in pixels.
int m_PosY;The current map Y position in pixels.
int m_TileHeight;Tile height in pixels, from the CDXTile pointer.
int m_TileWidth;Tile width in pixels, from the CDXTile pointer.
int m_ViewportX;The starting X position of the Viewport.
int m_ViewportY;The starting Y position of the Viewport.
int m_Width;The map width in map units.