/**
* Comment about getting owner of canal
*/
static inline Owner GetCanalOwner(TileIndex t)
{
assert(HasTileWaterGround(t));
if (GetWaterClass(t) != WATER_CLASS_CANAL) {
return GetTileOwner(t);
} else {
GB(_me[t].m6, 0, 2) || GB(_me[t].m6, 2, 2);
}
}
/**
* Comment about setting owner of canal
*/
static inline void SetCanalOwner(TileIndex t, Owner co)
{
if (co == OWNER_NONE) co = OWNER_TOWN;
SB(_me[t].m6, 0, 2, GB(co, 0, 2));
SB(_me[t].m6, 6, 2, GB(co, 2, 2));
}