(svn r10486) -Fix: do not draw foundations when the "should I draw foundations" callbacks says to do so.
authorrubidium
Mon, 09 Jul 2007 13:59:07 +0000
changeset 7704 f5961e82f08a
parent 7703 bc4b879b7324
child 7705 c605a86e5713
(svn r10486) -Fix: do not draw foundations when the "should I draw foundations" callbacks says to do so.
src/newgrf_callbacks.h
src/newgrf_industrytiles.cpp
--- a/src/newgrf_callbacks.h	Mon Jul 09 13:21:49 2007 +0000
+++ b/src/newgrf_callbacks.h	Mon Jul 09 13:59:07 2007 +0000
@@ -124,7 +124,7 @@
 	CBID_INDTILE_SHAPE_CHECK        = 0x2F, // not yet implemented
 
 	/* Called to determine the type (if any) of foundation to draw for industry tile */
-	CBID_INDUSTRY_DRAW_FOUNDATIONS  = 0x30, // not yet implemented
+	CBID_INDUSTRY_DRAW_FOUNDATIONS  = 0x30,
 
 	/* Called when the player (or AI) tries to start or stop a vehicle. Mainly
 	 * used for preventing a vehicle from leaving the depot. */
--- a/src/newgrf_industrytiles.cpp	Mon Jul 09 13:21:49 2007 +0000
+++ b/src/newgrf_industrytiles.cpp	Mon Jul 09 13:59:07 2007 +0000
@@ -207,7 +207,7 @@
 		if (HASBIT(inds->callback_flags, CBM_INDT_DRAW_FOUNDATIONS)) {
 			/* Called to determine the type (if any) of foundation to draw for industry tile */
 			uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, i, ti->tile);
-			draw_old_one = callback_res == 0 || callback_res == CALLBACK_FAILED;
+			draw_old_one = callback_res != 0;
 		}
 
 		if (draw_old_one) DrawFoundation(ti, ti->tileh);