QGearsTile.h 848 B

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