Overview Members Chapter Previous Next

CDXSprite::TileHit

BOOL TileHit( CDXMap* pMap , int Tile ) ;

Checks for collisions between the source sprite and tiles in a map. Returns TRUE if any part of the sprite overlaps with a tile of value Tile in the specified map. In mMap->GetTile(x,y) it's necessary to keep within the X and Y boundaries! So min(X,MaxX-1) ensures that you can't exceed the max X or Y position.