public int getIndex(Locatable locatable) {
		if (locatable == null) {
			return -1;
		}

		final Tile location = locatable.tile();
		final Tile mapBase = ctx.game.mapOffset();

		int localX = location.x() - mapBase.x();
		int localY = location.y() - mapBase.y();

		int x = localX - localX % 8;
		int remainder = localY % 8;
		int y = (remainder == 0) ? localX + 8 : localY + 8 - remainder;

		int index = -2 + (x / 8) + 9 * (-2 + (y / 8));
		if (index > -1 && index < rooms.length) {
			return index;
		}

		return -1;
	}