CGameInfo.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #pragma once
  2. #include "../lib/ConstTransitivePtr.h"
  3. /*
  4. * CGameInfo.h, part of VCMI engine
  5. *
  6. * Authors: listed in file AUTHORS in main folder
  7. *
  8. * License: GNU General Public License v2.0 or later
  9. * Full text of license available in license.txt file, in main folder
  10. *
  11. */
  12. class CModHandler;
  13. class CMapHandler;
  14. class CArtHandler;
  15. class CHeroHandler;
  16. class CCreatureHandler;
  17. class CSpellHandler;
  18. class CBuildingHandler;
  19. class CObjectHandler;
  20. class CSoundHandler;
  21. class CMusicHandler;
  22. class CDefObjInfoHandler;
  23. class CTownHandler;
  24. class CGeneralTextHandler;
  25. class CConsoleHandler;
  26. class CCursorHandler;
  27. class CGameState;
  28. class IMainVideoPlayer;
  29. class CMap;
  30. //a class for non-mechanical client GUI classes
  31. class CClientState
  32. {
  33. public:
  34. CSoundHandler * soundh;
  35. CMusicHandler * musich;
  36. CConsoleHandler * consoleh;
  37. CCursorHandler * curh;
  38. IMainVideoPlayer * videoh;
  39. };
  40. extern CClientState * CCS;
  41. /// CGameInfo class
  42. /// for allowing different functions for accessing game informations
  43. class CGameInfo
  44. {
  45. ConstTransitivePtr<CGameState> state; //don't touch it in client's code
  46. public:
  47. ConstTransitivePtr<CModHandler> modh; //public?
  48. ConstTransitivePtr<CArtHandler> arth;
  49. ConstTransitivePtr<CHeroHandler> heroh;
  50. ConstTransitivePtr<CCreatureHandler> creh;
  51. ConstTransitivePtr<CSpellHandler> spellh;
  52. ConstTransitivePtr<CObjectHandler> objh;
  53. ConstTransitivePtr<CDefObjInfoHandler> dobjinfo;
  54. CGeneralTextHandler * generaltexth;
  55. CMapHandler * mh;
  56. CTownHandler * townh;
  57. //CTownHandler * townh;
  58. void setFromLib();
  59. friend class CClient;
  60. CGameInfo();
  61. };
  62. extern const CGameInfo* CGI;