tile.h
changeset 3900 2c84ed52709d
parent 3794 f72053a38797
child 4010 4d674c7df23a
equal deleted inserted replaced
3899:5ba7f20a14ca 3900:2c84ed52709d
    51 }
    51 }
    52 
    52 
    53 static inline TileType GetTileType(TileIndex tile)
    53 static inline TileType GetTileType(TileIndex tile)
    54 {
    54 {
    55 	assert(tile < MapSize());
    55 	assert(tile < MapSize());
    56 	return GB(_m[tile].type_height, 4, 4);
    56 	return (TileType)GB(_m[tile].type_height, 4, 4);
    57 }
    57 }
    58 
    58 
    59 static inline void SetTileType(TileIndex tile, TileType type)
    59 static inline void SetTileType(TileIndex tile, TileType type)
    60 {
    60 {
    61 	assert(tile < MapSize());
    61 	assert(tile < MapSize());
    78 	assert(tile < MapSize());
    78 	assert(tile < MapSize());
    79 	assert(!IsTileType(tile, MP_HOUSE));
    79 	assert(!IsTileType(tile, MP_HOUSE));
    80 	assert(!IsTileType(tile, MP_VOID));
    80 	assert(!IsTileType(tile, MP_VOID));
    81 	assert(!IsTileType(tile, MP_INDUSTRY));
    81 	assert(!IsTileType(tile, MP_INDUSTRY));
    82 
    82 
    83 	return _m[tile].m1;
    83 	return (Owner)_m[tile].m1;
    84 }
    84 }
    85 
    85 
    86 static inline void SetTileOwner(TileIndex tile, Owner owner)
    86 static inline void SetTileOwner(TileIndex tile, Owner owner)
    87 {
    87 {
    88 	assert(tile < MapSize());
    88 	assert(tile < MapSize());