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.5KB

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