bool ContainsPoint (LandData data, int checkx, int checky)
{
int x = 0, y = 0, i = 0;
for (i = 0; i < data.Bitmap.Length; i++) {
byte tempByte = 0;
if (i < data.Bitmap.Length)
tempByte = data.Bitmap [i];
else
break; //All the rest are false then
int bitNum = 0;
for (bitNum = 0; bitNum < 8; bitNum++) {
if (x == checkx / 4 && y == checky / 4)
return Convert.ToBoolean (Convert.ToByte (tempByte >> bitNum) & 1);
x++;
//Remove the offset so that we get a calc from the beginning of the array, not the offset array
if (x > ((m_scene.RegionInfo.RegionSizeX / 4) - 1)) {
x = 0; //Back to the beginning
y++;
}
}
}
return false;
}