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.

Sprite.h 804B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*!
  2. * \file include/Sprite.h
  3. * \brief World Sprite
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _SPRITE_H_
  8. #define _SPRITE_H_
  9. #include "math/math.h"
  10. #include "TombRaider.h"
  11. class Sprite {
  12. public:
  13. Sprite(TombRaider &tr, unsigned int room, unsigned int index);
  14. Sprite(TombRaider &tr, unsigned int item, unsigned int sequence, unsigned int index);
  15. void display();
  16. private:
  17. vec3_t vertex[4];
  18. vec2_t texel[4];
  19. vec3_t pos;
  20. vec_t radius; //!< \fixme yeah, I know (I don't? --xythobuz)
  21. int texture;
  22. };
  23. class SpriteSequence {
  24. public:
  25. SpriteSequence(TombRaider &tr, unsigned int item, unsigned int sequence);
  26. ~SpriteSequence();
  27. void add(Sprite &s);
  28. unsigned int size();
  29. Sprite &get(unsigned int index);
  30. private:
  31. std::vector<Sprite *> sprites;
  32. };
  33. #endif