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.

Entity.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*!
  2. * \file include/Entity.h
  3. * \brief World Entities
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _ENTITY_H_
  8. #define _ENTITY_H_
  9. #include "SkeletalModel.h"
  10. #include "TombRaider.h"
  11. class Entity {
  12. public:
  13. typedef enum {
  14. MoveTypeWalkNoSwim = -1,
  15. MoveTypeWalk = 0,
  16. MoveTypeNoClipping = 1,
  17. MoveTypeFly = 2,
  18. MoveTypeSwim = 3
  19. } MoveType;
  20. Entity(TombRaider &tr, unsigned int index, unsigned int i, unsigned int model);
  21. bool operator<(Entity &o);
  22. void display();
  23. void move(char movement);
  24. void print();
  25. SkeletalModel &getModel();
  26. void setSkeletalModel(unsigned int model);
  27. MoveType getMoveType();
  28. void setMoveType(MoveType m);
  29. int getObjectId();
  30. void setAngles(float a[3]);
  31. float getPos(unsigned int i);
  32. float getAngle(unsigned int i);
  33. int getRoom();
  34. // Animation State
  35. unsigned int getAnimation();
  36. void setAnimation(unsigned int index);
  37. unsigned int getBoneFrame();
  38. void setBoneFrame(unsigned int index);
  39. unsigned int getIdleAnimation();
  40. void setIdleAnimation(unsigned int index);
  41. private:
  42. float pos[3];
  43. float angles[3];
  44. int room;
  45. unsigned int skeletalModel;
  46. MoveType moveType;
  47. int state;
  48. int objectId;
  49. // Animation State
  50. unsigned int boneFrame;
  51. unsigned int animationFrame;
  52. unsigned int idleAnimation;
  53. };
  54. #endif