Open Source Tomb Raider Engine
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Sprite.h 779B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. unsigned int size();
  28. Sprite &get(unsigned int index);
  29. private:
  30. std::vector<Sprite *> sprites;
  31. };
  32. #endif