#ifndef __I_GUI_SPRITE_BANK_H_INCLUDED__
#define __I_GUI_SPRITE_BANK_H_INCLUDED__
#include "IReferenceCounted.h"
#include "irrArray.h"
#include "SColor.h"
#include "rect.h"
namespace irr
{
namespace video
{
class ITexture;
}
namespace gui
{
struct SGUISpriteFrame
{
u32 textureNumber;
u32 rectNumber;
};
struct SGUISprite
{
SGUISprite() : Frames(), frameTime(0) {}
core::array<SGUISpriteFrame> Frames;
u32 frameTime;
};
class IGUISpriteBank : public virtual IReferenceCounted
{
public:
virtual core::array< core::rect<s32> >& getPositions() = 0;
virtual core::array< SGUISprite >& getSprites() = 0;
virtual u32 getTextureCount() const = 0;
virtual video::ITexture* getTexture(u32 index) const = 0;
virtual void addTexture(video::ITexture* texture) = 0;
virtual void setTexture(u32 index, video::ITexture* texture) = 0;
virtual s32 addTextureAsSprite(video::ITexture* texture) = 0;
virtual void clear() = 0;
virtual void draw2DSprite(u32 index, const core::position2di& pos,
const core::rect<s32>* clip=0,
const video::SColor& color= video::SColor(255,255,255,255),
u32 starttime=0, u32 currenttime=0,
bool loop=true, bool center=false) = 0;
virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos,
const core::rect<s32>* clip=0,
const video::SColor& color= video::SColor(255,255,255,255),
u32 starttime=0, u32 currenttime=0,
bool loop=true, bool center=false) = 0;
};
}
}
#endif