changeset 7035:b87b4e10acdf draft

(svn r10299) -Codechange [FS#931]: industry foundations should be drawn as all other foundations, i.e. with DrawFoundation, instead of writing the same functionality itself.
author rubidium <rubidium@openttd.org>
date Sun, 24 Jun 2007 10:20:05 +0000
parents d5ac7ea64a4b
children 5facac7844e4
files src/industry_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -282,14 +282,12 @@
 	z = ti->z;
 	/* Add bricks below the industry? */
 	if (ti->tileh != SLOPE_FLAT) {
-		AddSortableSpriteToDraw(SPR_FOUNDATION_BASE + ti->tileh, PAL_NONE, ti->x, ti->y, 16, 16, 7, z);
-		AddChildSpriteScreen(image, pal, 31, 1);
+		DrawFoundation(ti, ti->tileh);
 		z += TILE_HEIGHT;
-	} else {
-		/* Else draw regular ground */
-		DrawGroundSprite(image, pal);
 	}
 
+	DrawGroundSprite(image, pal);
+
 	/* Add industry on top of the ground? */
 	image = dits->building.sprite;
 	if (image != 0) {