mirror of
https://github.com/aap/librw.git
synced 2025-12-22 02:19:56 +00:00
improved uv animation code
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user