MapRendererContextState.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * MapRendererContext.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 "../lib/GameConstants.h"
  12. #include "../lib/int3.h"
  13. VCMI_LIB_NAMESPACE_BEGIN
  14. struct ObjectPosInfo;
  15. class CGObjectInstance;
  16. VCMI_LIB_NAMESPACE_END
  17. class IMapRendererContext;
  18. // from VwSymbol.def
  19. enum class EWorldViewIcon
  20. {
  21. TOWN = 0,
  22. HERO = 1,
  23. ARTIFACT = 2,
  24. TELEPORT = 3,
  25. GATE = 4,
  26. MINE_WOOD = 5,
  27. MINE_MERCURY = 6,
  28. MINE_STONE = 7,
  29. MINE_SULFUR = 8,
  30. MINE_CRYSTAL = 9,
  31. MINE_GEM = 10,
  32. MINE_GOLD = 11,
  33. RES_WOOD = 12,
  34. RES_MERCURY = 13,
  35. RES_STONE = 14,
  36. RES_SULFUR = 15,
  37. RES_CRYSTAL = 16,
  38. RES_GEM = 17,
  39. RES_GOLD = 18,
  40. ICONS_PER_PLAYER = 19,
  41. ICONS_TOTAL = 19 * 9 // 8 players + neutral set at the end
  42. };
  43. struct MapRendererContextState
  44. {
  45. public:
  46. MapRendererContextState();
  47. using MapObject = ObjectInstanceID;
  48. using MapObjectsList = std::vector<MapObject>;
  49. boost::multi_array<MapObjectsList, 3> objects;
  50. void addObject(const CGObjectInstance * object);
  51. void addMovingObject(const CGObjectInstance * object, const int3 & tileFrom, const int3 & tileDest);
  52. void removeObject(const CGObjectInstance * object);
  53. };