@ElmWaterMtrl.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class ElmWaterMtrl : ElmData
  4. {
  5. enum FLAG
  6. {
  7. USES_TEX_ALPHA =1<<0,
  8. USES_TEX_BUMP =1<<1,
  9. USES_TEX_GLOW =1<<2,
  10. TEX_QUALITY_IOS=1<<3,
  11. };
  12. UID base_0_tex, base_1_tex, reflection_tex;
  13. byte flag;
  14. // get
  15. bool equal(C ElmMaterial &src)C;
  16. bool newer(C ElmMaterial &src)C;
  17. bool usesTexAlpha ()C; void usesTexAlpha (bool on);
  18. bool usesTexBump ()C; void usesTexBump (bool on);
  19. bool usesTexGlow ()C; void usesTexGlow (bool on);
  20. bool texQualityiOS()C; void texQualityiOS(bool on);
  21. // get
  22. bool equal(C ElmWaterMtrl &src)C;
  23. bool newer(C ElmWaterMtrl &src)C;
  24. virtual bool mayContain (C UID &id)C override;
  25. virtual bool containsTex(C UID &id, bool test_merged)C override;
  26. virtual void listTexs(MemPtr<UID> texs)C override;
  27. // operations
  28. void from(C EditWaterMtrl &src);
  29. uint undo(C ElmWaterMtrl &src); // don't adjust 'ver' here because it also relies on 'EditWaterMtrl', because of that this is included in 'ElmFileInShort', don't undo 'downsize_tex_mobile', 'flag' because they should be set only in 'from'
  30. uint sync(C ElmWaterMtrl &src); // don't adjust 'ver' here because it also relies on 'EditWaterMtrl', because of that this is included in 'ElmFileInShort', don't sync 'downsize_tex_mobile', 'flag' because they should be set only in 'from'
  31. // io
  32. virtual bool save(File &f)C override;
  33. virtual bool load(File &f)override;
  34. virtual void save(MemPtr<TextNode> nodes)C override;
  35. virtual void load(C MemPtr<TextNode> &nodes)override;
  36. public:
  37. ElmWaterMtrl();
  38. };
  39. /******************************************************************************/
  40. /******************************************************************************/
  41. /******************************************************************************/