1
0
Fork 0

(svn r5398) Rename checkRadioTowerNearby() to IsRadioTowerNearby() and flip its return value to make it a bit less ambiguous

release/0.5
tron 2006-06-28 06:17:41 +00:00
parent 7f8695c4fd
commit c01951418d
1 changed files with 4 additions and 4 deletions

View File

@ -297,14 +297,14 @@ static void ClickTile_Unmovable(TileIndex tile)
/* checks, if a radio tower is within a 9x9 tile square around tile */ /* checks, if a radio tower is within a 9x9 tile square around tile */
static bool checkRadioTowerNearby(TileIndex tile) static bool IsRadioTowerNearby(TileIndex tile)
{ {
TileIndex tile_s = tile - TileDiffXY(4, 4); TileIndex tile_s = tile - TileDiffXY(4, 4);
BEGIN_TILE_LOOP(tile, 9, 9, tile_s) BEGIN_TILE_LOOP(tile, 9, 9, tile_s)
if (IsTransmitterTile(tile)) return false; if (IsTransmitterTile(tile)) return true;
END_TILE_LOOP(tile, 9, 9, tile_s) END_TILE_LOOP(tile, 9, 9, tile_s)
return true; return false;
} }
void GenerateUnmovables(void) void GenerateUnmovables(void)
@ -323,7 +323,7 @@ void GenerateUnmovables(void)
do { do {
tile = RandomTile(); tile = RandomTile();
if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == SLOPE_FLAT && h >= TILE_HEIGHT * 4) { if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == SLOPE_FLAT && h >= TILE_HEIGHT * 4) {
if (!checkRadioTowerNearby(tile)) continue; if (IsRadioTowerNearby(tile)) continue;
MakeTransmitter(tile); MakeTransmitter(tile);
if (--j == 0) break; if (--j == 0) break;
} }