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 758B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "TombRaider.h"
  10. class Sprite {
  11. public:
  12. Sprite(TombRaider &tr, unsigned int room, unsigned int index);
  13. Sprite(TombRaider &tr, unsigned int item, unsigned int sequence, unsigned int index);
  14. void display();
  15. private:
  16. float vertex[4][3];
  17. float texel[4][2];
  18. float pos[3];
  19. float radius; //!< \fixme yeah, I know (I don't? --xythobuz)
  20. int texture;
  21. };
  22. class SpriteSequence {
  23. public:
  24. SpriteSequence(TombRaider &tr, unsigned int item, unsigned int sequence);
  25. ~SpriteSequence();
  26. unsigned int size();
  27. Sprite &get(unsigned int index);
  28. private:
  29. std::vector<Sprite *> sprites;
  30. };
  31. #endif