tile.h
changeset 2900 722c18106949
parent 2493 d834d0c1502a
child 3099 374e275300e3
child 9942 56446313309e
equal deleted inserted replaced
2899:6ff001a44709 2900:722c18106949
    87 }
    87 }
    88 
    88 
    89 static inline void SetTileType(TileIndex tile, TileType type)
    89 static inline void SetTileType(TileIndex tile, TileType type)
    90 {
    90 {
    91 	assert(tile < MapSize());
    91 	assert(tile < MapSize());
       
    92 	/* Allow only MP_VOID to be set to border tiles. This code is put here since
       
    93 	 * it seems there is a bug that violates this somewhere. (Formely know as
       
    94 	 * the "old ship pf" bug, which presented a case in which this broke). It
       
    95 	 * can be removed as soon as  the bug is squashed. */
       
    96 	assert((TileX(tile) < MapMaxX() && TileY(tile) < MapMaxY()) || type == MP_VOID);
    92 	SB(_m[tile].type_height, 4, 4, type);
    97 	SB(_m[tile].type_height, 4, 4, type);
    93 }
    98 }
    94 
    99 
    95 static inline bool IsTileType(TileIndex tile, TileType type)
   100 static inline bool IsTileType(TileIndex tile, TileType type)
    96 {
   101 {