Implemented basic TexDictionary.

This commit is contained in:
Angelo Papenhoff
2015-01-20 19:22:57 +01:00
parent fb78a7a7b9
commit 62c6fe006e
6 changed files with 209 additions and 131 deletions

View File

@@ -107,7 +107,6 @@ struct Raster : PluginBase<Raster>
~Raster(void);
static Raster *createFromImage(Image *image);
static Raster *read(const char *name, const char *mask);
enum Format {
DEFAULT = 0,
@@ -137,12 +136,16 @@ struct Texture : PluginBase<Texture>
Raster *raster;
int32 refCount;
// temporary - pointer to next tex in dictionary
Texture *next;
Texture(void);
~Texture(void);
void decRef(void);
static Texture *streamRead(Stream *stream);
bool streamWrite(Stream *stream);
uint32 streamGetSize(void);
static Texture *read(const char *name, const char *mask);
enum FilterMode {
NEAREST = 1,
@@ -390,4 +393,15 @@ private:
void frameListStreamWrite(Stream *stream, Frame **flp, int32 nf);
};
struct TexDictionary
{
Texture *first;
TexDictionary(void);
void add(Texture *tex);
Texture *find(const char *name);
};
extern TexDictionary *CurrentTexDictionary;
}