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.

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. long getRoom();
  34. // Animation State
  35. unsigned long getAnimation();
  36. void setAnimation(unsigned long index);
  37. unsigned long getBoneFrame();
  38. void setBoneFrame(unsigned long index);
  39. unsigned long getIdleAnimation();
  40. void setIdleAnimation(unsigned long index);
  41. private:
  42. float pos[3];
  43. float angles[3];
  44. long room;
  45. unsigned int skeletalModel;
  46. MoveType moveType;
  47. int state;
  48. int objectId;
  49. // Animation State
  50. unsigned long boneFrame;
  51. unsigned long animationFrame;
  52. unsigned long idleAnimation;
  53. };
  54. #endif