(svn r14533) -Fix: ...hopefully most glitches wrt. inclined foundations.
authorfrosch
Sat, 25 Oct 2008 18:58:24 +0000
changeset 10294 748d6a359208
parent 10293 1a3d4946ac21
child 10295 52982b3d0d84
(svn r14533) -Fix: ...hopefully most glitches wrt. inclined foundations.
src/landscape.cpp
--- a/src/landscape.cpp	Sat Oct 25 16:45:01 2008 +0000
+++ b/src/landscape.cpp	Sat Oct 25 18:58:24 2008 +0000
@@ -417,7 +417,11 @@
 			/* 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 @@
 			/* 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);