(svn r11679) -Add: [newgrf] support for station vars 67 and 68

This commit is contained in:
glx
2007-12-21 22:11:55 +00:00
parent c32c07e238
commit 4fc66235cb
2 changed files with 32 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
#include "newgrf.h"
#include "newgrf_commons.h"
#include "tile_map.h"
#include "station_map.h"
/** Constructor of generic class
* @param offset end of original data for this entity. i.e: houses = 110
@@ -277,6 +278,9 @@ TileIndex GetNearbyTile(byte parameter, TileIndex tile)
if (x >= 8) x -= 16;
if (y >= 8) y -= 16;
/* Swap width and height depending on axis for railway stations */
if (IsRailwayStationTile(tile) && GetRailStationAxis(tile) == AXIS_X) Swap(x, y);
/* Make sure we never roam outside of the map */
return TILE_MASK(tile + TileDiffXY(x, y));
}