Reply-To: From: "Arthur" To: "DJGPP Mailing List" , "Deathifier" Subject: RE: Some functions in Allegro I'm not sure of. Date: Sat, 29 Aug 1998 18:19:11 +0100 Message-ID: <000201bdd371$2370c480$384e08c3@arthur> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Importance: Normal In-Reply-To: <6s87mb$9hq$1@toto.tig.com.au> Precedence: bulk > Hello, > I'm trying to use the do_line() function in allegro, and I have a little > problem with the arguments to pass to it, here's what it has in the manual > (allegro.txt): > > 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(). > > I understand most of it, except for: > int d > void (*proc) () > > I have no idea what the d parameter is supposed to be, or what the *proc > function want's passed to it, I have tried using 0 and it doesn't work. I'm > sure someone knows what values to pass or what these mean so if you do, > please help me out. do_line() is the same as line() except that instead of using its own pixel plotting command, it allows you to pass your own. You can pass the putpixel function as the procedure to call and this will work in a similar way to line(). Why bother? So that you can write your own texture mapping/interpolation routines, I imagine. I would just stick with line(). If you don't know what do_line() does you don't need it. BTW, I would try and ask the Allegro Mailing List this question. You may have more luck there. James Arthur jaa AT arfa DOT clara DOT net ICQ#15054819