Added new function RockOnMap.

This commit is contained in:
johns 2001-02-26 21:33:10 +00:00
parent c1f66a9c64
commit 9cc0ba3362

View file

@ -279,6 +279,28 @@ global int ForestOnMap(int tx,int ty)
return TheMap.Fields[tx+ty*TheMap.Width].Flags&MapFieldForest;
}
/**
** Rock on map tile.
**
** @param x X map tile position.
** @param y Y map tile position.
**
** @return True if rock, false otherwise.
*/
global int RockOnMap(int tx,int ty)
{
IfDebug(
if( tx<0 || ty<0 || tx>=TheMap.Width || ty>=TheMap.Height ) {
// FIXME: must cleanup calling function !
fprintf(stderr,"Used x %d, y %d\n",tx,ty);
abort();
return 0;
}
);
return TheMap.Fields[tx+ty*TheMap.Width].Flags&MapFieldRock;
}
/**
** Can move to this point, applying mask.
**