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

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