int GetTileState(int x, int y, int l)
{
// if the index is out of bounds
if (x < 0 || y < 0 || x >= _mapDimensions.x || y >= _mapDimensions.y) {
if (TreatBorderAsSolid) {
return 1;
} else {
return 0;
}
} else {
int tile = GetTileValueFromFramwork(x, y, l);
if (tile == -1) {
// this means we have hit an empty cell
return 0;
} else if (SpriteIdIsSpecialTile(tile)) {
if (TreatSpecialAsSolid) {
return 1;
} else {
return 0;
}
} else if (floorVariantIndices.Contains(tile)) {
return 0;
} else {
return 1;
}
}
}