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.

Game.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. void percentCallback(int percent);
  32. World mWorld;
  33. entity_t *mLara;
  34. Render *mRender;
  35. Camera *mCamera;
  36. private:
  37. void processPakSounds();
  38. void processTextures();
  39. void processSprites();
  40. void processMoveables();
  41. void processMoveable(int index, int i, int *ent,
  42. std::vector<skeletal_model_t *> &cache2,
  43. std::vector<unsigned int> &cache, int object_id);
  44. void processModel(int index);
  45. void processRoom(int index);
  46. void setupTextureColor(texture_tri_t *r_tri, float *colorf);
  47. bool mLoaded;
  48. char *mName;
  49. unsigned int mFlags;
  50. TombRaider mTombRaider;
  51. unsigned int mTextureStart;
  52. unsigned int mTextureLevelOffset;
  53. unsigned int mTextureOffset;
  54. };
  55. #endif