File diff r18260:9616113792ef → r18261:0aa61ca7490f
src/water_cmd.cpp
Show inline comments
 
@@ -785,25 +785,25 @@ static void DrawTile_Water(TileInfo *ti)
 
	}
 
}
 

	
 
void DrawShipDepotSprite(int x, int y, Axis axis, DepotPart part)
 
{
 
	const DrawTileSprites &dts = _shipdepot_display_data[axis][part];
 

	
 
	DrawSprite(dts.ground.sprite, dts.ground.pal, x, y);
 
	DrawOrigTileSeqInGUI(x, y, &dts, COMPANY_SPRITE_COLOUR(_local_company));
 
}
 

	
 

	
 
static uint GetSlopePixelZ_Water(TileIndex tile, uint x, uint y)
 
static int GetSlopePixelZ_Water(TileIndex tile, uint x, uint y)
 
{
 
	int z;
 
	Slope tileh = GetTilePixelSlope(tile, &z);
 

	
 
	return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh);
 
}
 

	
 
static Foundation GetFoundation_Water(TileIndex tile, Slope tileh)
 
{
 
	return FOUNDATION_NONE;
 
}
 

	
 
@@ -1193,25 +1193,25 @@ static void ChangeTileOwner_Water(TileIn
 
	if (IsShipDepot(tile)) DoCommand(tile, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR);
 

	
 
	/* Set owner of canals and locks ... and also canal under dock there was before.
 
	 * Check if the new owner after removing depot isn't OWNER_WATER. */
 
	if (IsTileOwner(tile, old_owner)) SetTileOwner(tile, OWNER_NONE);
 
}
 

	
 
static VehicleEnterTileStatus VehicleEnter_Water(Vehicle *v, TileIndex tile, int x, int y)
 
{
 
	return VETSB_CONTINUE;
 
}
 

	
 
static CommandCost TerraformTile_Water(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new)
 
static CommandCost TerraformTile_Water(TileIndex tile, DoCommandFlag flags, int z_new, Slope tileh_new)
 
{
 
	/* Canals can't be terraformed */
 
	if (IsWaterTile(tile) && IsCanal(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_CANAL_FIRST);
 

	
 
	return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
 
}
 

	
 

	
 
extern const TileTypeProcs _tile_type_water_procs = {
 
	DrawTile_Water,           // draw_tile_proc
 
	GetSlopePixelZ_Water,     // get_slope_z_proc
 
	ClearTile_Water,          // clear_tile_proc