tree.h
changeset 3079 a26f87fba4c1
parent 2981 ca5959cf9fc7
equal deleted inserted replaced
3078:cfce0beffa16 3079:a26f87fba4c1
    54 
    54 
    55 static inline void AddTreeCounter(TileIndex t, int a) { _m[t].m2 += a; }
    55 static inline void AddTreeCounter(TileIndex t, int a) { _m[t].m2 += a; }
    56 static inline uint GetTreeCounter(TileIndex t) { return GB(_m[t].m2, 0, 4); }
    56 static inline uint GetTreeCounter(TileIndex t) { return GB(_m[t].m2, 0, 4); }
    57 static inline void SetTreeCounter(TileIndex t, uint c) { SB(_m[t].m2, 0, 4, c); }
    57 static inline void SetTreeCounter(TileIndex t, uint c) { SB(_m[t].m2, 0, 4, c); }
    58 
    58 
       
    59 
       
    60 static inline void MakeTree(TileIndex t, TreeType type, uint count, uint growth, TreeGround ground, uint density)
       
    61 {
       
    62 	SetTileType(t, MP_TREES);
       
    63 	SetTileOwner(t, OWNER_NONE);
       
    64 	_m[t].m2 = density << 6 | ground << 4 | 0;
       
    65 	_m[t].m3 = type;
       
    66 	_m[t].m4 = 0 << 5 | 0 << 2;
       
    67 	_m[t].m5 = count << 6 | growth;
       
    68 }
       
    69 
    59 #endif
    70 #endif