File diff r3075:9bb9f1931ca7 → r3076:e978321c3641
clear.h
Show inline comments
 
@@ -4,6 +4,7 @@
 
#define CLEAR_H
 

	
 
#include "macros.h"
 
#include "tile.h"
 

	
 
/* ground type, m5 bits 2...4
 
 * valid densities (bits 0...1) in comments after the enum
 
@@ -43,4 +44,15 @@ static inline void SetFenceSE(TileIndex 
 
static inline uint GetFenceSW(TileIndex t) { return GB(_m[t].m4, 5, 3); }
 
static inline void SetFenceSW(TileIndex t, uint h) { SB(_m[t].m4, 5, 3, h); }
 

	
 

	
 
static inline void MakeClear(TileIndex t, ClearGround g, uint density)
 
{
 
	SetTileType(t, MP_CLEAR);
 
	SetTileOwner(t, OWNER_NONE);
 
	_m[t].m2 = 0;
 
	_m[t].m3 = 0;
 
	_m[t].m4 = 0 << 5 | 0 << 2;
 
	_m[t].m5 = 0 << 5 | g << 2 | density;
 
}
 

	
 
#endif