(svn r3657) Fix indentation and remove now unused variable, which i forgot in r3655

This commit is contained in:
tron 2006-02-23 07:32:46 +00:00
parent 6f719ec50a
commit b79872366d
1 changed files with 20 additions and 21 deletions

View File

@ -27,34 +27,33 @@ void RoadVehEnterDepot(Vehicle *v);
static bool HasTileRoadAt(TileIndex tile, int i) static bool HasTileRoadAt(TileIndex tile, int i)
{ {
int mask;
byte b; byte b;
switch (GetTileType(tile)) { switch (GetTileType(tile)) {
case MP_STREET: case MP_STREET:
b = _m[tile].m5; b = _m[tile].m5;
switch (GB(b, 4, 4)) { switch (GB(b, 4, 4)) {
case 0: break; // normal road case 0: break; // normal road
case 1: b = (b & 8 ? 5 : 10); break; // level crossing case 1: b = (b & 8 ? 5 : 10); break; // level crossing
case 2: return (~b & 3) == i; // depot case 2: return (~b & 3) == i; // depot
default: return false; default: return false;
} }
break; break;
case MP_STATION: case MP_STATION:
return return
IS_BYTE_INSIDE(_m[tile].m5, 0x43, 0x43 + 8) && IS_BYTE_INSIDE(_m[tile].m5, 0x43, 0x43 + 8) &&
(~(_m[tile].m5 - 0x43) & 3) == i; (~(_m[tile].m5 - 0x43) & 3) == i;
case MP_TUNNELBRIDGE: case MP_TUNNELBRIDGE:
// bail out, if not a bridge middle part with road underneath // bail out, if not a bridge middle part with road underneath
if ((_m[tile].m5 & 0xF8) != 0xE8) return false; if ((_m[tile].m5 & 0xF8) != 0xE8) return false;
// road direction perpendicular to bridge // road direction perpendicular to bridge
b = (_m[tile].m5 & 0x01) ? 10 : 5; b = (_m[tile].m5 & 0x01) ? 10 : 5;
default: default:
return false; return false;
} }
return HASBIT(b, i); return HASBIT(b, i);