IMapRendererObserver.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * IMapRendererObserver.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. VCMI_LIB_NAMESPACE_BEGIN
  12. class int3;
  13. class CGObjectInstance;
  14. class CGHeroInstance;
  15. VCMI_LIB_NAMESPACE_END
  16. class IMapObjectObserver
  17. {
  18. public:
  19. IMapObjectObserver();
  20. virtual ~IMapObjectObserver();
  21. virtual bool hasOngoingAnimations() = 0;
  22. /// Plays fade-in animation and adds object to map
  23. virtual void onObjectFadeIn(const CGObjectInstance * obj) {}
  24. /// Plays fade-out animation and removed object from map
  25. virtual void onObjectFadeOut(const CGObjectInstance * obj) {}
  26. /// Adds object to map instantly, with no animation
  27. virtual void onObjectInstantAdd(const CGObjectInstance * obj) {}
  28. /// Removes object from map instantly, with no animation
  29. virtual void onObjectInstantRemove(const CGObjectInstance * obj) {}
  30. /// Perform hero movement animation, moving hero across terrain
  31. virtual void onHeroMoved(const CGHeroInstance * obj, const int3 & from, const int3 & dest) {}
  32. /// Perform initialization of hero teleportation animation with terrain fade animation
  33. virtual void onBeforeHeroTeleported(const CGHeroInstance * obj, const int3 & from, const int3 & dest) {}
  34. virtual void onAfterHeroTeleported(const CGHeroInstance * obj, const int3 & from, const int3 & dest) {}
  35. virtual void onBeforeHeroEmbark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) {};
  36. virtual void onAfterHeroEmbark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) {};
  37. virtual void onBeforeHeroDisembark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) {};
  38. virtual void onAfterHeroDisembark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) {};
  39. };