From: umbagnal AT cc DOT umanitoba DOT ca (Kevin Bagnall) Newsgroups: comp.os.msdos.djgpp Subject: Allegro.h to GNU Pascal unit conversion? Date: 3 Mar 1997 03:12:56 GMT Organization: The University of Manitoba Lines: 43 Message-ID: <5fdfjo$bkb$1@canopus.cc.umanitoba.ca> NNTP-Posting-Host: dyn3-063.cc.umanitoba.ca Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I know this is more of a Pascal question, but I figured "GNU Pascal for DOS" programmers would also be DJGPP programmers. Anyways here is my problem. I am forced to use pascal for a final project in a course I am taking and would like to use the Allegro library. I am going to use GNU Pascal for DJGPP so I can access lots of memory(which I need for lookahead-moves in a game of Connect-4) and it's an optimized 32-bit compiler. I've benchmarked Turbo Pascal 7.0 and GNU Pascal and found the GNU version is 6 times faster! First of all, has anyone already converted the allegro.h header file to a GNU Pascal unit? If not, then I'll have to convert parts of it myself, specificaly some of the screen,bitmap,graphics, and sprite declarations. I know how to convert simple C declarations to pascal such as this: -C version- struct POINT { int x; int y; } -Pascal version- POINT = record x:integer; y:integer; end; But in allegro.h there is the GFX_VTABLE declaration which has the following: int (*getpixel)(struct BITMAP *bmp, int x, int y); void (*putpixel)(struct BITMAP *bmp, int x, int y, int color); . . etc. Is the second a pointer to a function? How would I change these to GNU pascal? Later I might convert the entire allegro.h file. I'm probably not the right person to do this since I've only written two small C programs in my life and I'm new to both DJGPP and GNU Pascal(but not pascal). -Kevin Bagnall