i am using the WGPFD book.
for the part about
int Load_Frame_BOB(BOB_PTR bob, // bob to load with data
BITMAP_FILE_PTR bitmap, // bitmap to scan image data from
int frame, // frame to load
int cx,int cy, // cell or absolute pos. to scan image from
int mode) // if 0 then cx,cy is cell position, else
// cx,cy are absolute coords
i was wondering why was % and / being used for cx & cy respectively>
// load animation frames
for (int frame=0; frame < 20; frame++)
Load_Frame_BOB(&rocks[0],&bitmap8bit,frame,frame%6,frame/6,BITMAP_EXTRACT_MODE_CELL);
the bitmap provided was about of 3 rows of 6 columns, with the 4th row having 3 cells only.
thus, total no.of available frames is 21.
and using frame%6 only gives a remainder of either 0 or less than 1.
so how does frame%6 and frame/6 make sense?