示例#1
0
void CAnimImage::showAll(SDL_Surface * to)
{
	IImage *img;

	if ( flags & CShowableAnim::BASE && frame != 0)
		if ((img = anim->getImage(0, group)))
			img->draw(to, pos.x, pos.y);

	if ((img = anim->getImage(frame, group)))
		img->draw(to, pos.x, pos.y);
}
示例#2
0
void CShowableAnim::blitImage(size_t frame, size_t group, SDL_Surface *to)
{
	assert(to);
	Rect src( xOffset, yOffset, pos.w, pos.h);
	IImage * img = anim->getImage(frame, group);
	if (img)
		img->draw(to, pos.x-xOffset, pos.y-yOffset, &src, alpha);
}