Ejemplo n.º 1
0
void CAnimImage::setFrame(size_t Frame, size_t Group)
{
	if (frame == Frame && group==Group)
		return;
	if (anim->size(Group) > Frame)
	{
		anim->load(Frame, Group);
		anim->unload(frame, group);
		frame = Frame;
		group = Group;
		IImage *img = anim->getImage(frame, group);
		if (img)
		{
			if (flags & CShowableAnim::PLAYER_COLORED)
				img->playerColored(player);
			pos.w = img->width();
			pos.h = img->height();
		}
	}
	else
		logGlobal->errorStream() << "Error: accessing unavailable frame " << Group << ":" << Frame << " in CAnimation!";
}