   Allegro and sprite sheets
  Hi. My name is Shane and I am using Allegro to load a sprite sheet of 288 X 608. I am having trouble looping through the loading process. Here is my code: for( n = 0; n < 172; n++ ){if( n == 9 || n == 18 || n == 27 || n == 36 || n == 45 || n == 54 || n == 63 || n == 72 || n == 81 || n == 90 || n == 99 || n == 108 || n == 117 || n == 126 || n == 135 || n == 144 || n == 153 || n == 162 || n == 171)y += 32;while(n < 172){ground[n] = create_sub_bitmap( grnd, x, y, 32,32 );}}Please help me. I don't know how to loop through this.   
  Thanks anyway. I figured this out.   ;  That's some nasty brute force code.  I'd do it more like this:for( int n = 0; n < 172; n++ )  ground[n] = create_sub_bitmap(grnd, (n % 9) * 32, (n / 9) * 32, 32, 32);Also, when you solve your own problem it would be good if you explained your solution.  Someone else might be having a similar problem or might just be curious to see your solution.   