PDA

View Full Version : Box2d wrapper for Pascal?



paul_nicholls
19-02-2008, 04:14 AM
Hi all,
I have been looking at the free open source 2d physics library http://www.box2d.org/, and was wondering if anyone has ported it to Pascal, or made a usable wrapper so one can use it under Pascal?

I am thinking of trying to make a wrapper for it.

I managed to compile it as a dynamic "libbox2d.a" file, and static "libbox2d.o" file, but I don't think I will be able to use any "objects" from it directly without translating it first...

I am going to try though :-)

cheers,
Paul

Pyrogine
19-02-2008, 05:06 AM
Clicky (http://relishgames.com/forum/viewtopic.php?t=2805)

paul_nicholls
19-02-2008, 08:16 AM
Thanks for the link Jarrod, I will take a look at the download :)
cheers,
Paul

chronozphere
19-02-2008, 09:35 AM
I took a brief look at the source during my biology lessons :roll: 8)

I think the Box2D header looks very clean and can be used without any difficulties. :)

arthurprs
19-02-2008, 08:01 PM
=X Delphi 2005 or superior needed

but looking at the source code, the new features delphi 2005 or superior are very insteresting for that kind of code


ps: works with FPC ?

chronozphere
19-02-2008, 08:23 PM
Delphi 2005 or superior needed


aaagh... maybe we have to modify the source a bit, so it's usable in Delphi 5 and up (Still lot of us use D5, D6, D7 etc) :(

Why is it D2005 and up?

paul_nicholls
19-02-2008, 08:57 PM
Delphi 2005 or superior needed


aaagh... maybe we have to modify the source a bit, so it's usable in Delphi 5 and up (Still lot of us use D5, D6, D7 etc) :(

Why is it D2005 and up?

From the readme file in the download:

"Delphi 2006 or later only
=========================

This Delphi port only compiles on Delphi 2006 or later. One of the reasons not
to support older Delphi versions, is that the HGE C++ code uses operator
overloading and methods within records, which are not supported in earlier
Delphi verions."

It could be converted to D5, but I imagine it will be a bit of work to restructure things.

cheers,
Paul

arthurprs
19-02-2008, 10:11 PM
Delphi 2005 or superior needed


aaagh... maybe we have to modify the source a bit, so it's usable in Delphi 5 and up (Still lot of us use D5, D6, D7 etc) :(

Why is it D2005 and up?

Operator overloading, Static methods, Constructor on Records (this one is veryyyy usefull)

and some more

i will need a good work on the code (60%) to convert then to older delphi versions

arthurprs
24-02-2008, 08:26 PM
if someone make it compatible with older delphi versions, please let me know