Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef __ATLAS_TEXTURE_H__
- #define __ATLAS_TEXTURE_H__
- #include "icon.h"
- #include "json/meta_entry.h"
- #include <vector>
- class AtlasTexture : public IIcon
- {
- private:
- AnimMetaEntry _animMeta;
- std::vector<uint8*> _frameData;
- const char* _name;
- bool _valid;
- uint16 _originX, _originY;
- uint16 _width, _height, _rWidth, _rHeight;
- float _minu, _maxu, _minv, _maxv;
- bool _rotated;
- public:
- AtlasTexture(const char*);
- ~AtlasTexture();
- void copyFrom(const AtlasTexture&);
- bool isValid() const;
- void loadTexture();
- void initTexture(uint16 width, uint16 height, uint16 ox, uint16 oy, bool rot);
- bool hasAnimData() const;
- void clearFrameData();
- uint8 getNumFrames() const;
- uint8* getFrameData(uint8 frame, uint32* length) const;
- uint16 getOriginX() const;
- uint16 getOriginY() const;
- /* override */ const char* getIconName() const;
- /* override */ uint16 getIconWidth() const;
- /* override */ uint16 getIconHeight() const;
- uint16 getRawWidth() const;
- uint16 getRawHeight() const;
- /* override */ float getMinU() const;
- /* override */ float getMaxU() const;
- /* override */ float getInterpU(float) const;
- /* override */ float getMinV() const;
- /* override */ float getMaxV() const;
- /* override */ float getInterpV(float) const;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement