From: Laurence Withers Newsgroups: comp.os.msdos.djgpp Subject: Re: Some functions in Allegro I'm not sure of. Date: Sat, 29 Aug 1998 16:10:04 +0100 Organization: IP Message-ID: References: <6s87mb$9hq$1 AT toto DOT tig DOT com DOT au> NNTP-Posting-Host: lwithers.demon.co.uk MIME-Version: 1.0 Lines: 32 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk --- Original Message --- From: Deathifier Time: Sat, 29 Aug 199816:38:36 [snip] >void do_line(BITMAP *bmp, int x1, y1, x2, y2, int d, void (*proc)()); [snip] >I understand most of it, except for: >int d >void (*proc) () [snip] OK, what you want to do is have a function that will be called for each discrete point along the line. For example: void my_putpixel(BITMAP *bmp, int x, int y, int d) { // draw a pixel on bmp and x, y using color d } Then, call the do_line function: do_line(screen, 0, 0, 639, 479, 1, my_putpixel); or void(*proc)(); proc = my_putpixel; do_line(screen, 0, 0, 639, 479, 1, my_putpixel); HTH. Mail me if you need more help. Bye for now, -- Laurence Withers, mailto:lwithers AT lwithers DOT demon DOT co DOT uk OPES Homepage: http://www.lwithers.demon.co.uk/opes/