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.

OpenRaider.h 1.3KB

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