Fix units of mapTile().
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9415 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
3706aca886
commit
cdb554ab58
|
@ -314,8 +314,8 @@ static inline WZ_DECL_PURE MAPTILE *mapTile(SDWORD x, SDWORD y)
|
|||
ASSERT(y >= -1, "mapTile: y value is too small (%d,%d) in %dx%d",x,y,mapWidth,mapHeight);
|
||||
x = (x < 0 ? 0 : x);
|
||||
y = (y < 0 ? 0 : y);
|
||||
ASSERT(x < world_coord(mapWidth)+TILE_UNITS, "mapTile: x value is too big (%d,%d) in %dx%d",x,y,mapWidth,mapHeight);
|
||||
ASSERT(y < world_coord(mapHeight)+TILE_UNITS, "mapTile: y value is too big (%d,%d) in %dx%d",x,y,mapWidth,mapHeight);
|
||||
ASSERT(x < mapWidth + 1, "mapTile: x value is too big (%d,%d) in %dx%d",x,y,mapWidth,mapHeight);
|
||||
ASSERT(y < mapHeight + 1, "mapTile: y value is too big (%d,%d) in %dx%d",x,y,mapWidth,mapHeight);
|
||||
x = (x >= mapWidth ? mapWidth - 1 : x);
|
||||
y = (y >= mapHeight ? mapHeight - 1 : y);
|
||||
|
||||
|
|
Loading…
Reference in New Issue