Open Source Tomb Raider Engine
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Game.h 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*!
  2. * \file include/Game.h
  3. * \brief Game abstraction
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _GAME_H_
  8. #define _GAME_H_
  9. #include <string>
  10. #include <vector>
  11. #include "Entity.h"
  12. #include "UI.h"
  13. #include "TombRaider.h"
  14. /*!
  15. * \brief Game abstraction
  16. */
  17. class Game : public UI {
  18. public:
  19. Game();
  20. ~Game();
  21. int initialize();
  22. bool isLoaded();
  23. int loadLevel(const char *level);
  24. void destroy();
  25. virtual void display();
  26. virtual void handleAction(ActionEvents action, bool isFinished);
  27. virtual void handleMouseMotion(int xrel, int yrel);
  28. virtual void moveToTop() { }
  29. virtual void makeInvisible() { }
  30. unsigned int getTextureStart();
  31. unsigned int getTextureOffset();
  32. Entity &getLara();
  33. private:
  34. void processPakSounds();
  35. void processTextures();
  36. void processSprites();
  37. void processMoveables();
  38. void processMoveable(int index, int i, int object_id);
  39. void processModels();
  40. void processRooms();
  41. std::string levelName;
  42. bool mLoaded;
  43. TombRaider mTombRaider;
  44. unsigned int mTextureStart;
  45. unsigned int mTextureOffset;
  46. long mLara;
  47. };
  48. Game &getGame();
  49. #endif