Open Source Tomb Raider Engine
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

OpenRaider.h 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. Window *mWindow;
  43. Sound *mSound;
  44. Menu *mMenu;
  45. Console *mConsole;
  46. Game *mGame;
  47. bool mMapListFilled;
  48. std::vector<char *> mMapList;
  49. float mCameraRotationDeltaX;
  50. float mCameraRotationDeltaY;
  51. char *mBaseDir;
  52. char *mPakDir;
  53. char *mAudioDir;
  54. char *mDataDir;
  55. private:
  56. int command(const char *command, std::vector<char *> *args);
  57. char *expandDirectoryNames(const char *s);
  58. int help(const char *cmd);
  59. int set(const char *var, const char *value);
  60. int bind(const char *action, const char *key);
  61. int bind(ActionEvents action, const char *key);
  62. void loadPakFolderRecursive(const char *dir);
  63. void fillMapList();
  64. bool mInit;
  65. bool mRunning;
  66. KeyboardButton keyBindings[ActionEventCount];
  67. };
  68. #endif