Mail Archives: djgpp/1997/01/01/02:54:54
fdschnap AT acs DOT ucalgary DOT ca (Paul Szuch) wrote:
>On Sun, 29 Dec 1996 20:07:31 -0800, Kevin Ivarsen
><ivarneli AT avalon DOT net> wrote:
>SNIP!
>>I hope this helps. Feel free to mail me with any more Allegro questions. It's hard to
>>get used to, but it's a WONDERFUL library - incredibly fast, VERY usefull functions,
>>etc. BTW - have you checked out the demo game yet? :)
>>
>>-Kevin Ivarsen
>As you volunteered...
> what does the heck does d do in do_line?
>void do_line(BITMAP *bmp, int x1, y1, x2, y2, int d, void (*proc)());
> Calculates all the points along a line from point (x1, y1) to
>(x2,y2), calling the supplied function for each one. This will be
>passed a copy of the bmp parameter, the x and y position, and a copy
>of the d parameter, so it is suitable for use with putpixel().
Granted, *I* didn't volunteer, but...
Since putpixel() takes four parameters (BITMAP *bmp, int x, int y, int
color), I'd guess that int d is just a sort of "scratch pad" where you
can put the color value for putpixel() if you want. I'm not sure how
this works when calling functions that only take 3 params, or
parameters that aren't ints...
- Raw text -