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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. class Entity {
  11. public:
  12. typedef enum {
  13. MoveTypeWalkNoSwim = -1,
  14. MoveTypeWalk = 0,
  15. MoveTypeNoClipping = 1,
  16. MoveTypeFly = 2,
  17. MoveTypeSwim = 3
  18. } MoveType;
  19. Entity(float p[3], float a[3], int id, long r, unsigned int model);
  20. void display();
  21. void move(char movement);
  22. void print();
  23. SkeletalModel& getModel();
  24. void setSkeletalModel(unsigned int model);
  25. MoveType getMoveType();
  26. void setMoveType(MoveType m);
  27. int getObjectId();
  28. void setAngles(float a[3]);
  29. float getPos(unsigned int i);
  30. float getAngle(unsigned int i);
  31. long getRoom();
  32. // Animation State
  33. unsigned long getAnimation();
  34. void setAnimation(unsigned long index);
  35. unsigned long getBoneFrame();
  36. void setBoneFrame(unsigned long index);
  37. unsigned long getIdleAnimation();
  38. void setIdleAnimation(unsigned long index);
  39. private:
  40. float pos[3];
  41. float angles[3];
  42. long room;
  43. unsigned int skeletalModel;
  44. MoveType moveType;
  45. int state;
  46. int objectId;
  47. // Animation State
  48. unsigned long boneFrame;
  49. unsigned long animationFrame;
  50. unsigned long idleAnimation;
  51. };
  52. #endif