Hi,

Was wondering how to randomly play different sprite rows from a single sprite sheet.

Click image for larger version. 

Name:	example.jpg 
Views:	196 
Size:	43.4 KB 
ID:	74145


as of now, I have the the whole sprite sheet (image , image2) randomly selected (both are just a single sprite animation).....

Code:
switch (random)                  
        		{

	           case 1: 

        	      if(A_health > 0)
                      SDL_BlitSurface(image,&rects[frame],screen,&rect);
		         
                    
               break;


        	   case 2:

                     if(B_health > 0)
                      SDL_BlitSurface(image2,&rects[frame],screen,&rect);
				 
                     
                break;

..... would I have to create a separate SDL_rect structure, say "SDL_Rect image2"
and a new frame variable as well ?



Cheers