2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
#ifndef CACHEDTEXTURE_H
|
|
|
|
|
#define CACHEDTEXTURE_H
|
|
|
|
|
|
2019-01-18 15:55:06 +01:00
|
|
|
#include "../gxruntime/gxcanvas.hpp"
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-17 17:01:06 +01:00
|
|
|
class CachedTextureFactory{
|
2014-01-31 08:23:00 +13:00
|
|
|
public:
|
2019-01-17 17:01:06 +01:00
|
|
|
CachedTextureFactory( int w,int h,int flags,int cnt );
|
|
|
|
|
CachedTextureFactory( const string &f,int flags,int w,int h,int first,int cnt );
|
|
|
|
|
CachedTextureFactory( const CachedTextureFactory &t );
|
|
|
|
|
~CachedTextureFactory();
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-17 17:01:06 +01:00
|
|
|
CachedTextureFactory &operator=( const CachedTextureFactory &t );
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
string getName()const;
|
|
|
|
|
|
|
|
|
|
const vector<gxCanvas*> &getFrames()const;
|
|
|
|
|
|
2019-01-17 17:01:06 +01:00
|
|
|
bool operator<( const CachedTextureFactory &t )const{ return rep<t.rep; }
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
static void setPath( const string &t );
|
|
|
|
|
|
|
|
|
|
private:
|
2019-01-17 17:01:06 +01:00
|
|
|
struct CachedTexture;
|
|
|
|
|
CachedTexture *rep;
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-17 17:01:06 +01:00
|
|
|
CachedTexture *findRep( const string &f,int flags,int w,int h,int first,int cnt );
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-17 17:01:06 +01:00
|
|
|
static set<CachedTexture*> rep_set;
|
2014-01-31 08:23:00 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|