(svn r4199) - Codechange: Use industry map accessors to get industry graphics type.
authorpeter1138
Fri, 31 Mar 2006 10:44:32 +0000
changeset 3391 c3747f4b259b
parent 3390 f910bc27153e
child 3392 7c330e18dfe1
(svn r4199) - Codechange: Use industry map accessors to get industry graphics type.
smallmap_gui.c
--- a/smallmap_gui.c	Fri Mar 31 10:14:25 2006 +0000
+++ b/smallmap_gui.c	Fri Mar 31 10:44:32 2006 +0000
@@ -4,6 +4,7 @@
 #include "openttd.h"
 #include "bridge_map.h"
 #include "clear_map.h"
+#include "industry_map.h"
 #include "functions.h"
 #include "spritecache.h"
 #include "station_map.h"
@@ -427,7 +428,7 @@
 	TileType t = GetEffectiveTileType(tile);
 
 	if (t == MP_INDUSTRY) {
-		byte color = _industry_smallmap_colors[_m[tile].m5];
+		byte color = _industry_smallmap_colors[GetIndustryGfx(tile)];
 		return color + (color << 8) + (color << 16) + (color << 24);
 	}
 
@@ -489,7 +490,7 @@
 			break;
 
 		case MP_INDUSTRY:
-			bits = IS_BYTE_INSIDE(_m[tile].m5, 0x10, 0x12) ? MKCOLOR(0xD0D0D0D0) : MKCOLOR(0xB5B5B5B5);
+			bits = IS_BYTE_INSIDE(GetIndustryGfx(tile), 0x10, 0x12) ? MKCOLOR(0xD0D0D0D0) : MKCOLOR(0xB5B5B5B5);
 			break;
 
 		case MP_TREES: