Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Running Box2D under Dark Basic Classic

Author
Message
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 5th Aug 2008 19:48 Edited at: 5th Aug 2008 19:57
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!



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.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 6th Aug 2008 15:15
What about the other values returned, are they non-zero?
If they are non-zero, it might be because GetBodyX/Y returns floats, which in DBP are passed by casting to DWORDs because floats are returned through a different method, and so wouldn't work otherwise. In DBC, this may be different.

Yuor signutare was aresed by a deslyxic mud...
Curious? CLICK HERE!
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 6th Aug 2008 20:23
I get nonsense numbers returned by the object and world constructor functions. I did wonder if the datatypes were incompatible. I expected the debug function not to work, as it probably does some framebuffer access or something. Angle, velocity and position all return zero. I should probably give up trying to run this DLL under Classic.

Thanks for your input.

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.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 7th Aug 2008 02:15 Edited at: 7th Aug 2008 13:22
What do you mean 'nonsense' numbers? They return pointers, so they will not be 1 or 2 or anything. If they are non-zero it means that the functions are working!

Also, what happens if you try version 2 under DBC? I recently created all the help files too (well maybe I did cheat a bit, but who cares!)

edit:
btw, I DO want your MSN

If V2 doesn't work, and I can find an example for returning floats to DBC, I would consider making a DBC compatible version.

Yuor signutare was aresed by a deslyxic mud...
Curious? CLICK HERE!

Login to post a reply

Server time is: 2024-04-27 17:38:47
Your offset time is: 2024-04-27 17:38:47