intcurFrame,internalFrame;//number of currently displayed frame
unsignedintframes;//number of frames
public:
std::map<int,std::vector<int>>frameGroups;//groups of frames; [groupID] -> vector of frame IDs in group
inttype;//type of animation being displayed (-1 - whole animation, >0 - specified part [default: -1])
intfullWidth,fullHeight;//read-only, please!
CCreatureAnimation(std::stringname);//c-tor
~CCreatureAnimation();//d-tor
voidsetType(inttype);//sets type of animation and cleares framecount
intgetType()const;//returns type of animation
intnextFrame(SDL_Surface*dest,intx,inty,boolattacker,unsignedcharanimCount,boolincrementFrame=true,boolyellowBorder=false,boolblueBorder=false,SDL_Rect*destRect=NULL);//0 - success, any other - error //print next
intnextFrameMiddle(SDL_Surface*dest,intx,inty,boolattacker,unsignedcharanimCount,boolIncrementFrame=true,boolyellowBorder=false,boolblueBorder=false,SDL_Rect*destRect=NULL);//0 - success, any other - error //print next