1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00
This commit is contained in:
Ivan Savenko
2011-05-28 10:05:25 +00:00
parent c6a69d35cf
commit 19f0836211
5 changed files with 37 additions and 13 deletions

View File

@ -591,12 +591,18 @@ SDLImage::SDLImage(std::string filename, bool compressed):
}
else
{
tlog0<<"Error: file not found: "<<filename<<"\n";
surf = NULL;
return;
}
fullSize.x = surf->w;
fullSize.y = surf->h;
if (surf == NULL)
{
tlog1 << "Error: failed to load image "<<filename<<"\n";
}
else
{
fullSize.x = surf->w;
fullSize.y = surf->h;
}
}
void SDLImage::draw(SDL_Surface *where, int posX, int posY, Rect *src, unsigned char rotation) const
@ -1160,6 +1166,11 @@ CAnimImage::CAnimImage(CAnimation *Anim, size_t Frame, size_t Group, int x, int
init();
}
size_t CAnimImage::size()
{
return anim->size(group);
}
void CAnimImage::init()
{
anim->load(frame, group);