(svn r4780) - Newstations: when building using a dynamic layout, add the station axis to the returned tile type. Also supply correct parameters to var 10.
authorpeter1138
Mon, 08 May 2006 06:22:01 +0000
changeset 3784 213a1a3f8697
parent 3783 0199c4b70cc2
child 3785 7d4c0a7850b2
(svn r4780) - Newstations: when building using a dynamic layout, add the station axis to the returned tile type. Also supply correct parameters to var 10.
station_cmd.c
--- a/station_cmd.c	Sun May 07 17:43:03 2006 +0000
+++ b/station_cmd.c	Mon May 08 06:22:01 2006 +0000
@@ -1105,9 +1105,10 @@
 				SetStationTileRandomBits(tile, GB(Random(), 0, 4));
 
 				if (statspec != NULL) {
-					uint32 platinfo = GetPlatformInfo(axis, layout, plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false);
+					/* Use a fixed axis for GetPlatformInfo as our platforms / numtracks are always the right way around */
+					uint32 platinfo = GetPlatformInfo(AXIS_X, 0, plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false);
 					uint16 callback = GetStationCallback(CBID_STATION_TILE_LAYOUT, platinfo, 0, statspec, st, tile);
-					if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, callback);
+					if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, callback + axis);
 				}
 
 				tile += tile_delta;