Advertisement
Guest User

Untitled

a guest
Feb 13th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.28 KB | None | 0 0
  1. #ifndef __ATLAS_TEXTURE_H__
  2. #define __ATLAS_TEXTURE_H__
  3.  
  4. #include "icon.h"
  5. #include "json/meta_entry.h"
  6.  
  7. #include <vector>
  8.  
  9. class AtlasTexture : public IIcon
  10. {
  11. private:
  12.     AnimMetaEntry _animMeta;
  13.     std::vector<uint8*> _frameData;
  14.     const char* _name;
  15.     bool _valid;
  16.     uint16 _originX, _originY;
  17.     uint16 _width, _height, _rWidth, _rHeight;
  18.     float _minu, _maxu, _minv, _maxv;
  19.     bool _rotated;
  20.  
  21. public:
  22.     AtlasTexture(const char*);
  23.     ~AtlasTexture();
  24.  
  25.     void copyFrom(const AtlasTexture&);
  26.  
  27.     bool isValid() const;
  28.  
  29.     void loadTexture();
  30.     void initTexture(uint16 width, uint16 height, uint16 ox, uint16 oy, bool rot);
  31.  
  32.     bool hasAnimData() const;
  33.     void clearFrameData();
  34.     uint8 getNumFrames() const;
  35.     uint8* getFrameData(uint8 frame, uint32* length) const;
  36.  
  37.     uint16 getOriginX() const;
  38.     uint16 getOriginY() const;
  39.     /* override */ const char* getIconName() const;
  40.     /* override */ uint16 getIconWidth() const;
  41.     /* override */ uint16 getIconHeight() const;
  42.     uint16 getRawWidth() const;
  43.     uint16 getRawHeight() const;
  44.     /* override */ float getMinU() const;
  45.     /* override */ float getMaxU() const;
  46.     /* override */ float getInterpU(float) const;
  47.     /* override */ float getMinV() const;
  48.     /* override */ float getMaxV() const;
  49.     /* override */ float getInterpV(float) const;
  50. };
  51.  
  52. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement