tile.c
changeset 3379 ea8aa9e71328
parent 3279 7c642c5c501c
child 3422 12cdb13ddb56
equal deleted inserted replaced
3378:6f5846e508e0 3379:ea8aa9e71328
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 #include "stdafx.h"
     3 #include "stdafx.h"
     4 #include "tile.h"
     4 #include "tile.h"
     5 
       
     6 void SetMapExtraBits(TileIndex tile, byte bits)
       
     7 {
       
     8 	assert(tile < MapSize());
       
     9 	SB(_m[tile].extra, 0, 2, bits & 3);
       
    10 }
       
    11 
       
    12 uint GetMapExtraBits(TileIndex tile)
       
    13 {
       
    14 	assert(tile < MapSize());
       
    15 	return GB(_m[tile].extra, 0, 2);
       
    16 }
       
    17 
     5 
    18 /** Converts the heights of 4 corners into a tileh, and returns the minimum height of the tile
     6 /** Converts the heights of 4 corners into a tileh, and returns the minimum height of the tile
    19   * @param n,w,e,s the four corners
     7   * @param n,w,e,s the four corners
    20   * @param h uint pointer to write the height to
     8   * @param h uint pointer to write the height to
    21   * @return the tileh
     9   * @return the tileh