water_cmd.c
changeset 2436 7d5df545bd5d
parent 2261 d3554e5d3e86
child 2493 f6b4300cc2b0
equal deleted inserted replaced
2435:9b9d43988058 2436:7d5df545bd5d
   386 	SpriteID image;
   386 	SpriteID image;
   387 } LocksDrawTileStruct;
   387 } LocksDrawTileStruct;
   388 
   388 
   389 #include "table/water_land.h"
   389 #include "table/water_land.h"
   390 
   390 
   391 static void DrawWaterStuff(TileInfo *ti, const WaterDrawTileStruct *wdts,
   391 static void DrawWaterStuff(const TileInfo *ti, const WaterDrawTileStruct *wdts,
   392 	uint32 palette, uint base
   392 	uint32 palette, uint base
   393 )
   393 )
   394 {
   394 {
   395 	uint32 image;
   395 	uint32 image;
   396 
   396 
   449 static uint GetSlopeZ_Water(TileInfo *ti)
   449 static uint GetSlopeZ_Water(TileInfo *ti)
   450 {
   450 {
   451 	return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + ti->z;
   451 	return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + ti->z;
   452 }
   452 }
   453 
   453 
   454 static uint GetSlopeTileh_Water(TileInfo *ti)
   454 static uint GetSlopeTileh_Water(const TileInfo *ti)
   455 {
   455 {
   456 	return ti->tileh;
   456 	return ti->tileh;
   457 }
   457 }
   458 
   458 
   459 static void GetAcceptedCargo_Water(TileIndex tile, AcceptedCargo ac)
   459 static void GetAcceptedCargo_Water(TileIndex tile, AcceptedCargo ac)
   691 			tile += (m5 == 1) ? TileDiffXY(-1, 0) : TileDiffXY(0, -1);
   691 			tile += (m5 == 1) ? TileDiffXY(-1, 0) : TileDiffXY(0, -1);
   692 		ShowShipDepotWindow(tile);
   692 		ShowShipDepotWindow(tile);
   693 	}
   693 	}
   694 }
   694 }
   695 
   695 
   696 static void ChangeTileOwner_Water(TileIndex tile, byte old_player, byte new_player)
   696 static void ChangeTileOwner_Water(TileIndex tile, PlayerID old_player, PlayerID new_player)
   697 {
   697 {
   698 	if (!IsTileOwner(tile, old_player)) return;
   698 	if (!IsTileOwner(tile, old_player)) return;
   699 
   699 
   700 	if (new_player != 255) {
   700 	if (new_player != 255) {
   701 		SetTileOwner(tile, new_player);
   701 		SetTileOwner(tile, new_player);