tile.c
branch0.4
changeset 10023 4a72310c9cf5
parent 9959 984493ab6fff
child 10050 53795ed4cdaf
equal deleted inserted replaced
10022:9cb1a8fd9155 10023:4a72310c9cf5
    66 {
    66 {
    67 	uint h;
    67 	uint h;
    68 	GetTileSlope(tile, &h);
    68 	GetTileSlope(tile, &h);
    69 	return h;
    69 	return h;
    70 }
    70 }
       
    71 
       
    72 uint GetTileMaxZ(TileIndex t)
       
    73 {
       
    74 	uint max;
       
    75 	uint h;
       
    76 
       
    77 	h = TileHeight(t);
       
    78 	max = h;
       
    79 	h = TileHeight(t + TileDiffXY(1, 0));
       
    80 	if (h > max) max = h;
       
    81 	h = TileHeight(t + TileDiffXY(0, 1));
       
    82 	if (h > max) max = h;
       
    83 	h = TileHeight(t + TileDiffXY(1, 1));
       
    84 	if (h > max) max = h;
       
    85 	return max * 8;
       
    86 }