diff --git a/TileEngine/Isometric Utils.cpp b/TileEngine/Isometric Utils.cpp index c47835e54..6c3e06221 100644 --- a/TileEngine/Isometric Utils.cpp +++ b/TileEngine/Isometric Utils.cpp @@ -874,20 +874,6 @@ INT32 OutOfBounds(INT32 sGridNo, INT32 sProposedGridNo) return(FALSE); } -//Lalien: This function should be used to check if the tile is not inside map array, -// it will return FALSE if the tile index is NOWHERE (-1) too. -// If the tile index has some special meaning ("-1" = does not exist) the check for NOWHERE should be used -BOOLEAN TileIsOutOfBounds(INT32 sGridNo) -{ - if( (sGridNo < 0) || (sGridNo >= MAX_MAP_POS) ) - { - return TRUE; - } - - return FALSE; -} - - INT32 NewGridNo(INT32 sGridNo, INT16 sDirInc) { INT32 sProposedGridNo = sGridNo + sDirInc; diff --git a/TileEngine/Isometric Utils.h b/TileEngine/Isometric Utils.h index bae7aa989..26467607f 100644 --- a/TileEngine/Isometric Utils.h +++ b/TileEngine/Isometric Utils.h @@ -49,8 +49,13 @@ void ConvertGridNoToCenterCellXY( INT32 sGridNo, INT16 *sXPos, INT16 *sYPos ); INT32 NewGridNo(INT32 sGridNo, INT16 sDirInc); INT16 DirectionInc(UINT8 ubDirection); INT32 OutOfBounds(INT32 sGridNo, INT32 sProposedGridNo); -BOOLEAN TileIsOutOfBounds(INT32 sGridNo); +//Lalien: This function should be used to check if the tile is not inside map array, +// it will return FALSE if the tile index is NOWHERE (-1) too. +// If the tile index has some special meaning ("-1" = does not exist) the check for NOWHERE should be used +// +// tazpn: inline this routine due to high call count +#define TileIsOutOfBounds(sGridNo) (( (sGridNo < 0) || (sGridNo >= MAX_MAP_POS) ) ? TRUE : FALSE) // Functions BOOLEAN GetMouseCell( INT32 *piMouseMapPos );