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

OpenRaider.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 <istream>
  10. #include <string>
  11. /*!
  12. * \brief Main Game Singleton
  13. */
  14. class OpenRaider {
  15. public:
  16. /*!
  17. * \brief Constructs an object of OpenRaider
  18. */
  19. OpenRaider();
  20. /*!
  21. * \brief Deconstructs an object of OpenRaider
  22. */
  23. ~OpenRaider();
  24. int initialize();
  25. /*!
  26. * \brief Load the configuration file
  27. * \returns 0 on success
  28. */
  29. int loadConfig(const char *config);
  30. int command(std::string &command);
  31. int command(const char *command);
  32. void run();
  33. void frame();
  34. void handleKeyboard(KeyboardButton key, bool pressed);
  35. void handleText(char *text, bool notFinished);
  36. void handleMouseClick(unsigned int x, unsigned int y, KeyboardButton button, bool released);
  37. void handleMouseMotion(int xrel, int yrel);
  38. void handleMouseScroll(int xrel, int yrel);
  39. //! \fixme should be private
  40. char *mBaseDir;
  41. char *mPakDir;
  42. char *mAudioDir;
  43. char *mDataDir;
  44. private:
  45. char *expandDirectoryNames(const char *s);
  46. int set(std::istream &command);
  47. int bind(const char *action, const char *key);
  48. static int help(std::string &cmd);
  49. bool mRunning;
  50. bool mFPS;
  51. KeyboardButton keyBindings[ActionEventCount];
  52. };
  53. OpenRaider &getOpenRaider();
  54. #endif