summaryrefslogtreecommitdiff
path: root/landscape.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-14 19:48:04 +0000
committertron <tron@openttd.org>2005-11-14 19:48:04 +0000
commit9d0e7b6458124277d850e9bc524d06fd2046c424 (patch)
treea9ba5d4f3c5c47ab3857060c5f95ed482530ed97 /landscape.c
parenta7843e154653745799ccdc1288d366ce63ef5802 (diff)
downloadopenttd-9d0e7b6458124277d850e9bc524d06fd2046c424.tar.xz
(svn r3181) -Bracing
-Indentation -Whitespace -DeMorgan's Law -Test with NULL or 0 for non-booleans -'\0' instead of 0 for chars -Remove redundantly redundant comments (like DoFoo(); // Do foo) -Join multiple short lines with a single statement -Split single lines with multiple statements -Avoid assignments in if
Diffstat (limited to 'landscape.c')
-rw-r--r--landscape.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/landscape.c b/landscape.c
index 8309b18d1..d213fc913 100644
--- a/landscape.c
+++ b/landscape.c
@@ -208,16 +208,16 @@ void DrawFoundation(TileInfo *ti, uint f)
uint32 sprite_base = SPR_SLOPES_BASE-14;
TileInfo ti2;
- FindLandscapeHeight(&ti2, ti->x, ti->y-1);
- if(hasFoundation( &ti2, true )) sprite_base += 22; // foundation in NW direction
- FindLandscapeHeight(&ti2, ti->x-1, ti->y);
- if(hasFoundation( &ti2, false )) sprite_base += 22*2; // foundation in NE direction
+ FindLandscapeHeight(&ti2, ti->x, ti->y - 1);
+ if (hasFoundation(&ti2, true)) sprite_base += 22; // foundation in NW direction
+ FindLandscapeHeight(&ti2, ti->x - 1, ti->y);
+ if (hasFoundation(&ti2, false)) sprite_base += 22 * 2; // foundation in NE direction
if (f < 15) {
// leveled foundation
if (sprite_base < SPR_SLOPES_BASE) sprite_base = SPR_FOUNDATION_BASE + 1; // use original slope sprites
- AddSortableSpriteToDraw(f-1 + sprite_base, ti->x, ti->y, 16, 16, 7, ti->z);
+ AddSortableSpriteToDraw(f - 1 + sprite_base, ti->x, ti->y, 16, 16, 7, ti->z);
ti->z += 8;
ti->tileh = 0;
OffsetGroundSprite(31, 1);