I wish to use the older (v1.4.1) Box2D wrapper for Dark Basic Professional under Dark Basic Classic. This code runs for me, but the DLL returns 0 for both the X and Y position of the box. The example is largely based on the examples in the examples thread.
Don't forget to put physicsplugin.dll into the project directory!
sync rate 30 : sync on
load dll "physicsplugin.dll",2
call dll 2,"SetUnits",0.1,0.017453292519943295769236907684886
MyWorld = call dll(2,"CreateWorld",-2000,-2000,2000,2000,0,50,1)
bo = call dll(2,"CreateBoxBody",MyWorld,20,20,1,0.1,1)
call dll 2,"PositionBody",bo,320,240
do
cls
call dll 2,"Step",MyWorld
set cursor 1,1
print call dll(2,"GetBodyX",bo)
print call dll(2,"GetBodyY",bo)
sync
loop
Is there something I need to set up in DBC, or is it just incompatible and that's the end?
ASUSTek Eee PC 701 4G Black - Celeron M @630mHz - 512Mb RAM - 32Mb Shared Intel GMA 900 - Windows XP Home SP1 - No antivirus/firewall.
And it still boots quicker than any other laptop I've seen.