summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-01 07:36:15 +0000
committertron <tron@openttd.org>2006-02-01 07:36:15 +0000
commit84fb96fe85e75b038b527471428189170021f8b7 (patch)
treea7d69d6390e8880d090f15560161694c3ce6126d /tunnelbridge_cmd.c
parent22dc05faf2219f6e3803f9cbff92249823bb11eb (diff)
downloadopenttd-84fb96fe85e75b038b527471428189170021f8b7.tar.xz
(svn r3511) More whitespace ([FS#46] by Rubidium)
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 2c1a50c40..19fb0330d 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -693,7 +693,7 @@ static TileIndex FindEdgesOfBridge(TileIndex tile, TileIndex *endtile)
TileIndex start;
// find start of bridge
- for(;;) {
+ for (;;) {
if (IsTileType(tile, MP_TUNNELBRIDGE) && (_m[tile].m5 & 0xE0) == 0x80)
break;
tile += direction ? TileDiffXY(0, -1) : TileDiffXY(-1, 0);
@@ -702,7 +702,7 @@ static TileIndex FindEdgesOfBridge(TileIndex tile, TileIndex *endtile)
start = tile;
// find end of bridge
- for(;;) {
+ for (;;) {
if (IsTileType(tile, MP_TUNNELBRIDGE) && (_m[tile].m5 & 0xE0) == 0xA0)
break;
tile += direction ? TileDiffXY(0, 1) : TileDiffXY(1, 0);
@@ -1007,9 +1007,15 @@ static void DrawBridgePillars(const TileInfo *ti, int x, int y, int z)
if (!(ti->tileh & p[3])) back_height += 8;
}
- for(; z>=front_height || z>=back_height; z=z-8) {
- if (z>=front_height) AddSortableSpriteToDraw(image, x,y, p[4], p[5], 0x28, z); // front facing pillar
- if (z>=back_height && z<i-8) AddSortableSpriteToDraw(image, x - p[6], y - p[7], p[4], p[5], 0x28, z); // back facing pillar
+ for (; z >= front_height || z >= back_height; z = z - 8) {
+ if (z >= front_height) {
+ // front facing pillar
+ AddSortableSpriteToDraw(image, x,y, p[4], p[5], 0x28, z);
+ }
+ if (z >= back_height && z < i - 8) {
+ // back facing pillar
+ AddSortableSpriteToDraw(image, x - p[6], y - p[7], p[4], p[5], 0x28, z);
+ }
}
}
}