Loading

Paste #pttduycso

  1. /**
  2.  * Comment about getting owner of canal
  3.  */
  4. static inline Owner GetCanalOwner(TileIndex t)
  5. {
  6.     assert(HasTileWaterGround(t));
  7.  
  8.     if (GetWaterClass(t) != WATER_CLASS_CANAL) {
  9.         return GetTileOwner(t);
  10.         } else {
  11.         GB(_me[t].m6, 0, 2) || GB(_me[t].m6, 2, 2);
  12.     }
  13. }
  14. /**
  15.  * Comment about setting owner of canal
  16.  */
  17. static inline void SetCanalOwner(TileIndex t, Owner co)
  18. {
  19.     if (co == OWNER_NONE) co = OWNER_TOWN;
  20.     SB(_me[t].m6, 0, 2, GB(co, 0, 2));
  21.     SB(_me[t].m6, 6, 2, GB(co, 2, 2));
  22. }

Version history

Revision # Author Created at
pk9ivwxv6 Anonymous 03 Mar 2015, 18:44:25 UTC Diff

Comments