[fpc-pascal]Allegro

Ray & Debbie Smith smithr at ix.net.au
Tue Feb 13 08:15:53 CET 2001


Hi Matt,

I asked a question a week or so back about Allegro.
Is this the thread you are referring to?

I modified allegro.pas (the delphi version) a little and have a couple of
small
demos working.
As far as I'm aware everything should be "doable".
My modifications allowed programs to compile with standard Free Pascal ...
ie. without Delphi compatability or any other switches.

The Delphi wrapper doesn't handle external variables correctly becuase of a
limition with Delphi.  The modifcations I made overcame this limitation.

I have only wrapped a dozen or so functions and converted the exmem.c
and exmidi.c demos that come with Allegro and they both seem to work fine.

I know very little about Object Pascal, Delphi and Free Pascal so I have no
idea
what is the best way to get it working ... I'm just happy that it works the
way I have
done it.

I contacted the author of allegro.pas and he created it by writing a parser
to convert
the Allegro header file to output an Object Pascal Unit.  He is busy for a
few months
but sounded interested in supporting Free Pascal in the future.

I estimate it would take about 1 full day to convert the Delphi wrapper to
work with
Free Pascal (by manually modification).  I was hoping to do a similar thing
as the
allegro.pas author and write a "htopas" type program to do it automatically.

If anyone wants a copy of my test programs let me know.

Ray Smith




----- Original Message -----
From: Matt Emson <memsom at interalpha.co.uk>
To: <fpc-pascal at deadlock.et.tudelft.nl>
Sent: Tuesday, February 13, 2001 1:17 AM
Subject: [fpc-pascal]Allegro


> Did the Allegro thread progress anywhere a while back??
>
> I lost all my email recently (my pop3 mailbox apparently became corrupted
and
> got deleted.. bah!!)
>
> The original post prompted me to look at the Delphi version (got it
running
> nicely..) I'd be interested to see it running in FPC however because
Allegro
> is now fairly 'cross platform'.
>
> My next task will probably be getting it to run with Kylix (when it's
available
> - of course 8), so I'll let you all know how that goes.. (or not as the
case
> may be ;)
>
> If I do get the time, I'll give a port a go.. the main thing I could see
that
> was causing a problem with an initial compilation was the following style
of
> declaration:
>
> type
>   XXX = procedure cdecl;
>   YYY = function (whatever: integer): boolean cdecl;
>
> As far as I can see, you could declare theis as:
>
>   XXX = procedure; cdecl;
>
> Is that valid syntax in FPC?? Is there any difference?? Seems to work in
Delphi
> 5.0+ anyway.
>
> Matt
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal





More information about the fpc-pascal mailing list