I have been following this tutorial:
http://www.codemii.com/2008/08/31/tutorial-4-cursors/
And I can't quite understand one section of the code:
Code: Select all
void DrawHLine (int x1, int x2, int y, int color) {
int i;
y = 320 * y;
x1 >>= 1;
x2 >>= 1;
for (i = x1; i <= x2; i++) {
u32 *tmpfb = xfb;
tmpfb[y+i] = color;
}
}
u32 *tmpfb = xfb;
tmpfb[y=i] = color;
Am I right in assuming that a new variable named tmpfb is created?
What is the purpose of the asterisk?
What does xfb mean?
What is the purpose of the [y+1]?
What does the >>= symbol mean? I've never seen it in C/C++ Programs before...
Thanks in advance.
I appreciate any help given!