diff options
author | frosch <frosch@openttd.org> | 2008-10-25 18:58:24 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-10-25 18:58:24 +0000 |
commit | 31fcb98a3e125e18ab2e02e75df5648b00788381 (patch) | |
tree | a40cfa5d22c08a45c7c09a2ab334fff4dad30413 | |
parent | 7f4ee898ac2a8c044c6c0dc4a14e4d9d753dd188 (diff) | |
download | openttd-31fcb98a3e125e18ab2e02e75df5648b00788381.tar.xz |
(svn r14533) -Fix: ...hopefully most glitches wrt. inclined foundations.
-rw-r--r-- | src/landscape.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp index fd71cd7ec..87fae70f3 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -417,7 +417,11 @@ void DrawFoundation(TileInfo *ti, Foundation f) /* inclined foundation */ byte inclined = highest_corner * 2 + (f == FOUNDATION_INCLINED_Y ? 1 : 0); - AddSortableSpriteToDraw(inclined_base + inclined, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z); + AddSortableSpriteToDraw(inclined_base + inclined, PAL_NONE, ti->x, ti->y, + f == FOUNDATION_INCLINED_X ? 16 : 1, + f == FOUNDATION_INCLINED_Y ? 16 : 1, + TILE_HEIGHT + 1, ti->z + ); OffsetGroundSprite(31, 9); } else if (IsLeveledFoundation(f)) { AddSortableSpriteToDraw(leveled_base + SlopeWithOneCornerRaised(highest_corner), PAL_NONE, ti->x, ti->y, 16, 16, 7, ti->z - TILE_HEIGHT); @@ -462,7 +466,11 @@ void DrawFoundation(TileInfo *ti, Foundation f) /* inclined foundation */ byte inclined = GetHighestSlopeCorner(ti->tileh) * 2 + (f == FOUNDATION_INCLINED_Y ? 1 : 0); - AddSortableSpriteToDraw(inclined_base + inclined, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z); + AddSortableSpriteToDraw(inclined_base + inclined, PAL_NONE, ti->x, ti->y, + f == FOUNDATION_INCLINED_X ? 16 : 1, + f == FOUNDATION_INCLINED_Y ? 16 : 1, + TILE_HEIGHT + 1, ti->z + ); OffsetGroundSprite(31, 9); } ti->z += ApplyFoundationToSlope(f, &ti->tileh); |