src/newgrf_station.cpp
changeset 8954 ca1d17502817
parent 8812 1d894693b4da
child 9066 29d5a0dfc329
equal deleted inserted replaced
8953:19bf73113162 8954:ca1d17502817
   424 		/* Variables 0x60 to 0x65 are handled separately below */
   424 		/* Variables 0x60 to 0x65 are handled separately below */
   425 		case 0x67: { // Land info of nearby tiles
   425 		case 0x67: { // Land info of nearby tiles
   426 			Axis axis = GetRailStationAxis(tile);
   426 			Axis axis = GetRailStationAxis(tile);
   427 
   427 
   428 			if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required
   428 			if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required
   429 			byte tile_type = GetTerrainType(tile) << 2 | (IsTileType(tile, MP_WATER) ? 1 : 0) << 1;
   429 
   430 
   430 			Slope tileh = GetTileSlope(tile, NULL);
   431 			uint z;
   431 			bool swap = (axis == AXIS_Y && HasBit(tileh, SLOPE_W) != HasBit(tileh, SLOPE_E));
   432 			Slope tileh = GetTileSlope(tile, &z);
   432 
   433 			bool swap = (axis == AXIS_Y && HasBit(tileh, 0) != HasBit(tileh, 2));
   433 			return GetNearbyTileInformation(tile) ^ (swap ? SLOPE_EW : 0);
   434 			return GetTileType(tile) << 24 | z << 16 | tile_type << 8 | (tileh ^ (swap ? 5 : 0));
       
   435 		}
   434 		}
   436 
   435 
   437 		case 0x68: { // Station info of nearby tiles
   436 		case 0x68: { // Station info of nearby tiles
   438 			TileIndex nearby_tile = GetNearbyTile(parameter, tile);
   437 			TileIndex nearby_tile = GetNearbyTile(parameter, tile);
   439 
   438