improved uv animation code

This commit is contained in:
aap
2016-01-14 23:49:00 +01:00
parent da0417571d
commit 56e48f4d76
7 changed files with 211 additions and 102 deletions

View File

@@ -49,15 +49,6 @@ TexDictionary::destroy(void)
free(this);
}
int32
TexDictionary::count(void)
{
int32 n = 0;
FORLIST(lnk, this->textures)
n++;
return n;
}
Texture*
TexDictionary::find(const char *name)
{
@@ -151,8 +142,10 @@ Texture::read(const char *name, const char *mask)
Raster *raster = NULL;
Texture *tex;
if(currentTexDictionary && (tex = currentTexDictionary->find(name)))
if(currentTexDictionary && (tex = currentTexDictionary->find(name))){
tex->refCount++;
return tex;
}
tex = Texture::create(NULL);
strncpy(tex->name, name, 32);
strncpy(tex->mask, mask, 32);