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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 "math/math.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);
  21. bool operator<(Entity &o);
  22. void display();
  23. void setSkeletalModel(unsigned int model);
  24. // Animation State
  25. unsigned int getAnimationFrame();
  26. void setAnimationFrame(unsigned int index);
  27. unsigned int getBoneFrame();
  28. void setBoneFrame(unsigned int index);
  29. unsigned int getIdleAnimation();
  30. void setIdleAnimation(unsigned int index);
  31. private:
  32. vec3_t pos;
  33. vec3_t angles;
  34. int room;
  35. unsigned int skeletalModel;
  36. MoveType moveType;
  37. int state;
  38. int objectId;
  39. // Animation State
  40. unsigned int boneFrame;
  41. unsigned int animationFrame;
  42. unsigned int idleAnimation;
  43. };
  44. #endif