CGameInfo.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 CVideoPlayer;
  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. CVideoPlayer * videoh;
  39. };
  40. struct Mapa;
  41. /*
  42. CGameInfo class
  43. for allowing different functions for accessing game informations
  44. */
  45. class CGameInfo
  46. {
  47. ConstTransitivePtr<CGameState> state; //don't touch it in client's code
  48. public:
  49. ConstTransitivePtr<CArtHandler> arth;
  50. ConstTransitivePtr<CHeroHandler> heroh;
  51. ConstTransitivePtr<CCreatureHandler> creh;
  52. ConstTransitivePtr<CSpellHandler> spellh;
  53. ConstTransitivePtr<CObjectHandler> objh;
  54. ConstTransitivePtr<CDefObjInfoHandler> dobjinfo;
  55. CGeneralTextHandler * generaltexth;
  56. CMapHandler * mh;
  57. ConstTransitivePtr<CBuildingHandler> buildh;
  58. CTownHandler * townh;
  59. //CTownHandler * townh;
  60. void setFromLib();
  61. friend class CClient;
  62. friend void initVillagesCapitols(Mapa * map);
  63. CGameInfo();
  64. };
  65. //
  66. // public:
  67. //
  68. // ConstTransitivePtr<CGeneralTextHandler> generaltexth;
  69. #endif // __CGAMEINFO_H__