QGearsTile.h 810 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. };
  13. struct KeyFrame
  14. {
  15. Ogre::Real time;
  16. Ogre::Vector4 uv;
  17. };
  18. typedef std::vector< KeyFrame > KeyFrameList;
  19. struct Animation
  20. {
  21. Ogre::Real length;
  22. KeyFrameList key_frames;
  23. };
  24. typedef std::map< String, Animation > AnimationMap;
  25. struct Tile
  26. {
  27. int width;
  28. int height;
  29. Ogre::Vector2 destination;
  30. Ogre::Vector4 uv;
  31. Ogre::Real depth;
  32. Blending blending;
  33. AnimationMap animations;
  34. };
  35. }
  36. #endif // __QGearsTile_H__