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.

Game.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*!
  2. * \file include/Game.h
  3. * \brief Game abstraction
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _GAME_H_
  8. #define _GAME_H_
  9. #include <list>
  10. #include "Camera.h"
  11. #include "global.h"
  12. #include "Render.h"
  13. #include "TombRaider.h"
  14. #include "World.h"
  15. typedef enum {
  16. Flag_DebugModel = (1 << 0)
  17. } GameFlags;
  18. /*!
  19. * \brief Game abstraction
  20. */
  21. class Game {
  22. public:
  23. Game();
  24. ~Game();
  25. int initialize();
  26. int loadLevel(const char *level);
  27. void destroy();
  28. void handleAction(ActionEvents action, bool isFinished);
  29. void handleMouseMotion(int xrel, int yrel);
  30. void display();
  31. int command(std::vector<char *> *args);
  32. //! \fixme should be private
  33. World mWorld;
  34. entity_t *mLara;
  35. Render *mRender;
  36. Camera *mCamera;
  37. private:
  38. void processPakSounds();
  39. void processTextures();
  40. void processSprites();
  41. void processMoveables();
  42. void processMoveable(int index, int i, int *ent,
  43. std::vector<skeletal_model_t *> &cache2,
  44. std::vector<unsigned int> &cache, int object_id);
  45. void processModels();
  46. void processRooms();
  47. void setupTextureColor(texture_tri_t *r_tri, float *colorf);
  48. bool mLoaded;
  49. char *mName;
  50. unsigned int mFlags;
  51. TombRaider mTombRaider;
  52. unsigned int mTextureStart;
  53. unsigned int mTextureLevelOffset;
  54. unsigned int mTextureOffset;
  55. };
  56. #endif