diff options
author | tron <tron@openttd.org> | 2005-11-14 19:48:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-14 19:48:04 +0000 |
commit | f7abff5f963cddfdd134ac52ffd8e72e3ed88f0c (patch) | |
tree | a9ba5d4f3c5c47ab3857060c5f95ed482530ed97 /landscape.c | |
parent | d8b56c123eab7f7b48f2af3579130e366f6106ab (diff) | |
download | openttd-f7abff5f963cddfdd134ac52ffd8e72e3ed88f0c.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.c | 10 |
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); |