Mail Archives: djgpp/1999/08/26/04:26:27
I made an 1 dimensional array of a struct and made line pointers to the
start of each row to make it like a 2 dimensional array. If I want to
reference the line pointer as ->line[4][5], it will start on the row index
4, but will the 5 jump 5 tiles structs ahead as I allocated or just bytes.
This is simalar to Allegro's bitmap line pointers which jump ahead bytes,
but I am using structures not bytes.
If it does jump ahead structs for me, is there any speed concern when
multiplying the address location 5 times by the size of the struct? [4th
row] + [5 * sizeof TILE]
One more thing. Does a struct pointer equal one 32bit address or an
address for each member of the struct?
((--Thanks From Dan Gold--))
- Raw text -