@AreaVer.h 1.4 KB

123456789101112131415161718192021222324252627282930
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class AreaVer
  4. {
  5. TimeStamp hm_removed_time, hm_height_time, hm_mtrl_time, hm_color_time,
  6. rebuild_time; // 'rebuild_time' doesn't need to be saved, it is only a helper member specifying when was the last rebuild ordered
  7. Version obj_ver;
  8. static bool HasHm(C TimeStamp&removed_time, C TimeStamp&height_time);
  9. bool hasHm()C; // if has heightmap (not removed)
  10. // get
  11. bool newerHm(C AreaVer &ver)C;
  12. bool oldHm(C TimeStamp &now=TimeStamp().getUTC())C;
  13. bool old(C TimeStamp &now=TimeStamp().getUTC())C;
  14. uint compare(C AreaVer *dest)C; // return which elements from 'this' should be sent to 'dest'
  15. // operations
  16. uint setHm(bool on); // make sure that 'hasHm' will return 'on'
  17. bool sync(C AreaVer &src);
  18. uint sync(C AreaVer &src, Heightmap &hm, C Heightmap &src_hm, uint mask);
  19. uint undo(C AreaVer &src, Heightmap &hm, C Heightmap &src_hm);
  20. // io
  21. bool save(File &f)C;
  22. bool load(File &f);
  23. };
  24. /******************************************************************************/
  25. /******************************************************************************/
  26. /******************************************************************************/