tile.c
changeset 2049 538e73c53f54
parent 1981 3c9c682f1212
child 2186 db48cf29b983
equal deleted inserted replaced
2048:54fd558314dc 2049:538e73c53f54
     2 #include "tile.h"
     2 #include "tile.h"
     3 
     3 
     4 void SetMapExtraBits(TileIndex tile, byte bits)
     4 void SetMapExtraBits(TileIndex tile, byte bits)
     5 {
     5 {
     6 	assert(tile < MapSize());
     6 	assert(tile < MapSize());
     7 	SB(_map_extra_bits[tile >> 2], (tile & 3) * 2, 2, bits & 3);
     7 	SB(_m[tile].extra, 0, 2, bits & 3);
     8 }
     8 }
     9 
     9 
    10 uint GetMapExtraBits(TileIndex tile)
    10 uint GetMapExtraBits(TileIndex tile)
    11 {
    11 {
    12 	assert(tile < MapSize());
    12 	assert(tile < MapSize());
    13 	return GB(_map_extra_bits[tile >> 2], (tile & 3) * 2, 2);
    13 	return GB(_m[tile].extra, 0, 2);
    14 }
    14 }
    15 
    15 
    16 
    16 
    17 uint GetTileSlope(TileIndex tile, uint *h)
    17 uint GetTileSlope(TileIndex tile, uint *h)
    18 {
    18 {