Quote:Original post by Anonymous Poster
yeah i know how to do like walking or somthing similar, i was wondering about a full blown, say, attack animation, where there are up to 20 frames. could i use the SDL_GetTicks() and just have the animations in the array blit in the order of the Tick and also write a simple calculation for xy positioning?
if that is the way to do it, is that the most efficient way to?
thanks again!
Better yet, loading one image as a sprite set instead of many little ones. Then just look up the coordinates of each sprite in your favorite graphics editing program and note them down. You can then 'plug' these numbers in the appropriate (int) values for the blit_img function. You should probably store these numbers as another vector or array.