Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

OpenRaider.h 1.5KB

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