QGearsTile.h 829 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __QGearsTile_H__
  2. #define __QGearsTile_H__
  3. #include <OgreVector2.h>
  4. #include <OgreVector4.h>
  5. #include "common/TypeDefine.h"
  6. namespace QGears
  7. {
  8. enum Blending
  9. {
  10. B_ALPHA
  11. ,B_ADD
  12. ,B_SUBTRACT
  13. };
  14. struct KeyFrame
  15. {
  16. Ogre::Real time;
  17. Ogre::Vector4 uv;
  18. };
  19. typedef std::vector< KeyFrame > KeyFrameList;
  20. struct Animation
  21. {
  22. Ogre::Real length;
  23. KeyFrameList key_frames;
  24. };
  25. typedef std::map< String, Animation > AnimationMap;
  26. struct Tile
  27. {
  28. int width;
  29. int height;
  30. Ogre::Vector2 destination;
  31. Ogre::Vector4 uv;
  32. Ogre::Real depth;
  33. Blending blending;
  34. AnimationMap animations;
  35. };
  36. }
  37. #endif // __QGearsTile_H__