Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Game.h 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. class Game {
  13. public:
  14. Game();
  15. ~Game();
  16. int initialize();
  17. bool isLoaded();
  18. int loadLevel(const char* level);
  19. void destroy();
  20. void display();
  21. void handleAction(ActionEvents action, bool isFinished);
  22. void handleMouseMotion(int xrel, int yrel, int xabs, int yabs);
  23. void handleControllerAxis(float value, KeyboardButton axis);
  24. void handleControllerButton(KeyboardButton button, bool released);
  25. Entity& getLara();
  26. void setLara(long lara);
  27. private:
  28. void processPakSounds();
  29. void processTextures();
  30. void processSprites();
  31. void processMoveables();
  32. void processMoveable(int index, int i, int object_id);
  33. void processModels();
  34. void processRooms();
  35. std::string levelName;
  36. bool mLoaded;
  37. long mLara;
  38. bool activeEvents[ActionEventCount];
  39. };
  40. Game& getGame();
  41. #endif