diff options
author | tron <tron@openttd.org> | 2006-02-23 07:32:46 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-02-23 07:32:46 +0000 |
commit | b79872366debb336f43621f4d00d72d3fa3ac889 (patch) | |
tree | 967ff92961e20f8daae77f8e94af5dce4fc2f277 | |
parent | 6f719ec50a270a3f7ea90b1c8b10cea4b22f13a8 (diff) | |
download | openttd-b79872366debb336f43621f4d00d72d3fa3ac889.tar.xz |
(svn r3657) Fix indentation and remove now unused variable, which i forgot in r3655
-rw-r--r-- | road_cmd.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/road_cmd.c b/road_cmd.c index a8fcda2e1..242354d8d 100644 --- a/road_cmd.c +++ b/road_cmd.c @@ -27,34 +27,33 @@ void RoadVehEnterDepot(Vehicle *v); static bool HasTileRoadAt(TileIndex tile, int i) { - int mask; byte b; switch (GetTileType(tile)) { - case MP_STREET: - b = _m[tile].m5; - - switch (GB(b, 4, 4)) { - case 0: break; // normal road - case 1: b = (b & 8 ? 5 : 10); break; // level crossing - case 2: return (~b & 3) == i; // depot - default: return false; - } - break; + case MP_STREET: + b = _m[tile].m5; + + switch (GB(b, 4, 4)) { + case 0: break; // normal road + case 1: b = (b & 8 ? 5 : 10); break; // level crossing + case 2: return (~b & 3) == i; // depot + default: return false; + } + break; - case MP_STATION: - return - IS_BYTE_INSIDE(_m[tile].m5, 0x43, 0x43 + 8) && - (~(_m[tile].m5 - 0x43) & 3) == i; + case MP_STATION: + return + IS_BYTE_INSIDE(_m[tile].m5, 0x43, 0x43 + 8) && + (~(_m[tile].m5 - 0x43) & 3) == i; - case MP_TUNNELBRIDGE: - // bail out, if not a bridge middle part with road underneath - if ((_m[tile].m5 & 0xF8) != 0xE8) return false; - // road direction perpendicular to bridge - b = (_m[tile].m5 & 0x01) ? 10 : 5; + case MP_TUNNELBRIDGE: + // bail out, if not a bridge middle part with road underneath + if ((_m[tile].m5 & 0xF8) != 0xE8) return false; + // road direction perpendicular to bridge + b = (_m[tile].m5 & 0x01) ? 10 : 5; - default: - return false; + default: + return false; } return HASBIT(b, i); |