CGameInfo.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef __CGAMEINFO_H__
  2. #define __CGAMEINFO_H__
  3. #include "../global.h"
  4. #include "../lib/ConstTransitivePtr.h"
  5. /*
  6. * CGameInfo.h, part of VCMI engine
  7. *
  8. * Authors: listed in file AUTHORS in main folder
  9. *
  10. * License: GNU General Public License v2.0 or later
  11. * Full text of license available in license.txt file, in main folder
  12. *
  13. */
  14. class CMapHandler;
  15. class CArtHandler;
  16. class CHeroHandler;
  17. class CCreatureHandler;
  18. class CSpellHandler;
  19. class CBuildingHandler;
  20. class CObjectHandler;
  21. class CSoundHandler;
  22. class CMusicHandler;
  23. class CDefObjInfoHandler;
  24. class CTownHandler;
  25. class CGeneralTextHandler;
  26. class CConsoleHandler;
  27. class CCursorHandler;
  28. class CGameState;
  29. class IMainVideoPlayer;
  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. struct Mapa;
  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<CArtHandler> arth;
  48. ConstTransitivePtr<CHeroHandler> heroh;
  49. ConstTransitivePtr<CCreatureHandler> creh;
  50. ConstTransitivePtr<CSpellHandler> spellh;
  51. ConstTransitivePtr<CObjectHandler> objh;
  52. ConstTransitivePtr<CDefObjInfoHandler> dobjinfo;
  53. CGeneralTextHandler * generaltexth;
  54. CMapHandler * mh;
  55. ConstTransitivePtr<CBuildingHandler> buildh;
  56. CTownHandler * townh;
  57. //CTownHandler * townh;
  58. void setFromLib();
  59. friend class CClient;
  60. friend void initVillagesCapitols(Mapa * map);
  61. CGameInfo();
  62. };
  63. //
  64. // public:
  65. //
  66. // ConstTransitivePtr<CGeneralTextHandler> generaltexth;
  67. #endif // __CGAMEINFO_H__