AIMemory.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * AIMemory.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. #include "../AIUtility.h"
  12. #include "../../../lib/mapObjects/MapObjects.h"
  13. namespace NKAI
  14. {
  15. class AIMemory
  16. {
  17. public:
  18. std::set<const CGObjectInstance *> visitableObjs;
  19. std::set<const CGObjectInstance *> alreadyVisited;
  20. std::map<TeleportChannelID, std::shared_ptr<TeleportChannel>> knownTeleportChannels;
  21. std::map<const CGObjectInstance *, const CGObjectInstance *> knownSubterraneanGates;
  22. void removeFromMemory(const CGObjectInstance * obj);
  23. void removeFromMemory(ObjectIdRef obj);
  24. void addSubterraneanGate(const CGObjectInstance * entrance, const CGObjectInstance * exit);
  25. void addVisitableObject(const CGObjectInstance * obj);
  26. void markObjectVisited(const CGObjectInstance * obj);
  27. void markObjectUnvisited(const CGObjectInstance * obj);
  28. bool wasVisited(const CGObjectInstance * obj) const;
  29. void removeInvisibleObjects(CCallback * cb);
  30. };
  31. }