Mail Archives: djgpp/1997/03/04/01:05:43
On 3 Mar 1997 03:12:56 GMT umbagnal AT cc DOT UManitoba DOT CA (Kevin Bagnall)
writes:
It's been a while since my Pascal days, but I'll give it a try:
(BTW excuse the poor Pascal syntax, I'm doing the best job I can):
>int (*getpixel)(struct BITMAP *bmp, int x, int y);
>void (*putpixel)(struct BITMAP *bmp, int x, int y, int color);
var putpixel : procedure;
var getpixel : function;
Procedure _putpixel(bmp : ^BITMAP; x, y : dword);
Function _getpixel(bmp : ^BITMAP; x, y, color : dword);
putpixel=_putpixel;
getpixel=_getpixel;
I used dword because I don't know what Pascal uses for 32bit ints (BP7
used byte and word).
>Is the second a pointer to a function? How would I change these to GNU
>pascal?
No, it returns a void (meaning it's a procedure, rather than a function).
>
>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).
Once you get down what it's doing, porting it should be easy.
...Chambers
- Raw text -