Loading

Paste #pghr7xyan

  1. static inline Owner GetCanalOwner(TileIndex t)
  2. {
  3.     assert(GetWaterClass(t) == WATER_CLASS_CANAL);
  4.  
  5.     if (IsCanal(t)) return GetTileOwner(t);
  6.  
  7.     Owner owner_canal = GetTileOwner(t);
  8.     SB(owner_canal, 0, 2, GB(_me[t].m6, 0, 2));
  9.     SB(owner_canal, 6, 2, GB(_me[t].m6, 6, 2));
  10.     /* Canals don't need OWNER_TOWN, and remapping OWNER_NONE
  11.      * to OWNER_TOWN makes it use one bit less. */
  12.     return owner_canal == OWNER_TOWN ? OWNER_NONE : owner_canal;
  13. }

Comments