Open Source Tomb Raider Engine
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

OpenRaider.h 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*!
  2. * \file include/OpenRaider.h
  3. * \brief Main Game Object
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _OPENRAIDER_H_
  8. #define _OPENRAIDER_H_
  9. #include <string>
  10. /*!
  11. * \brief Main Game Singleton
  12. */
  13. class OpenRaider {
  14. public:
  15. /*!
  16. * \brief Constructs an object of OpenRaider
  17. */
  18. OpenRaider();
  19. /*!
  20. * \brief Deconstructs an object of OpenRaider
  21. */
  22. ~OpenRaider();
  23. int initialize();
  24. /*!
  25. * \brief Load the configuration file
  26. * \returns 0 on success
  27. */
  28. int loadConfig(const char *config);
  29. int command(std::string command);
  30. void run();
  31. void frame();
  32. void handleKeyboard(KeyboardButton key, bool pressed);
  33. void handleText(char *text, bool notFinished);
  34. void handleMouseClick(unsigned int x, unsigned int y, KeyboardButton button, bool released);
  35. void handleMouseMotion(int xrel, int yrel);
  36. void handleMouseScroll(int xrel, int yrel);
  37. //! \fixme should be private
  38. char *mBaseDir;
  39. char *mPakDir;
  40. char *mAudioDir;
  41. char *mDataDir;
  42. KeyboardButton keyBindings[ActionEventCount];
  43. bool mRunning;
  44. bool mFPS;
  45. };
  46. OpenRaider &getOpenRaider();
  47. #endif