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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. static bool compare(Entity* a, Entity* b);
  23. void display();
  24. void move(char movement);
  25. void print();
  26. SkeletalModel& getModel();
  27. void setSkeletalModel(unsigned int model);
  28. MoveType getMoveType();
  29. void setMoveType(MoveType m);
  30. int getObjectId();
  31. void setAngles(float a[3]);
  32. float getPos(unsigned int i);
  33. float getAngle(unsigned int i);
  34. long getRoom();
  35. // Animation State
  36. unsigned long getAnimation();
  37. void setAnimation(unsigned long index);
  38. unsigned long getBoneFrame();
  39. void setBoneFrame(unsigned long index);
  40. unsigned long getIdleAnimation();
  41. void setIdleAnimation(unsigned long index);
  42. private:
  43. float pos[3];
  44. float angles[3];
  45. long room;
  46. unsigned int skeletalModel;
  47. MoveType moveType;
  48. int state;
  49. int objectId;
  50. // Animation State
  51. unsigned long boneFrame;
  52. unsigned long animationFrame;
  53. unsigned long idleAnimation;
  54. };
  55. #endif