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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. /*!
  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. int initialize();
  36. void run();
  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. bool mMapListFilled;
  44. std::vector<char *> mMapList;
  45. float mCameraRotationDeltaX;
  46. float mCameraRotationDeltaY;
  47. char *mBaseDir;
  48. char *mPakDir;
  49. char *mAudioDir;
  50. char *mDataDir;
  51. private:
  52. int command(const char *command, std::vector<char *> *args);
  53. char *expandDirectoryNames(const char *s);
  54. int help(const char *cmd);
  55. int set(const char *var, const char *value);
  56. int bind(const char *action, const char *key);
  57. int bind(ActionEvents action, const char *key);
  58. void loadPakFolderRecursive(const char *dir);
  59. void fillMapList();
  60. bool mRunning;
  61. bool mFPS;
  62. KeyboardButton keyBindings[ActionEventCount];
  63. };
  64. #endif