Changeset - r17855:ef86bb998ddc
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-07-12 16:36:53
frosch@openttd.org
(svn r22661) -Fix (r22659): Silence a gcc warning.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_station.cpp
Show inline comments
 
@@ -675,25 +675,25 @@ uint16 GetStationCallback(CallbackID cal
 
 * @param numtracks Number of platforms.
 
 * @return Succeeded or failed command.
 
 */
 
CommandCost PerformStationTileSlopeCheck(TileIndex north_tile, TileIndex cur_tile, const StationSpec *statspec, Axis axis, byte plat_len, byte numtracks)
 
{
 
	TileIndexDiff diff = cur_tile - north_tile;
 
	Slope slope = GetTileSlope(cur_tile, NULL);
 

	
 
	ResolverObject object;
 
	NewStationResolver(&object, statspec, NULL, cur_tile);
 

	
 
	object.callback        = CBID_STATION_LAND_SLOPE_CHECK;
 
	object.callback_param1 = slope << 4 | slope ^ (axis == AXIS_Y && HasBit(slope, CORNER_W) != HasBit(slope, CORNER_E) ? SLOPE_EW : 0);
 
	object.callback_param1 = slope << 4 | (slope ^ (axis == AXIS_Y && HasBit(slope, CORNER_W) != HasBit(slope, CORNER_E) ? SLOPE_EW : 0));
 
	object.callback_param2 = numtracks << 24 | plat_len << 16 | (axis == AXIS_Y ? TileX(diff) << 8 | TileY(diff) : TileY(diff) << 8 | TileX(diff));
 
	object.u.station.axis  = axis;
 

	
 
	const SpriteGroup *group = ResolveStation(&object);
 
	uint16 cb_res = group != NULL ? group->GetCallbackResult() : CALLBACK_FAILED;
 

	
 
	/* Failed callback means success. */
 
	if (cb_res == CALLBACK_FAILED) return CommandCost();
 

	
 
	/* The meaning of bit 10 is inverted in the result of this callback. */
 
	return GetErrorMessageFromLocationCallbackResult(ToggleBit(cb_res, 10), statspec->grf_prop.grffile->grfid, STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
 
}
0 comments (0 inline, 0 general)