Open Source Tomb Raider Engine
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Sprite.h 767B

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