News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Physic engine

Started by Farabi, November 18, 2008, 12:02:58 PM

Previous topic - Next topic

Farabi

What is good physic engine for MASM (not COM dll)?
I saw some of free physic engine, but the lib file did not work, also, the function name on their dll is weird. I dont want to make the include file from scratch.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Tedd

I think you'll have trouble if you're unwilling to write your own include file or deal with mangled function names.
They're most likely to be in C or C++, so unless someone has already gone to the trouble of making the include files for masm and is willing to share it with you, you'll have to make the effort and do it yourself.
No snowflake in an avalanche feels responsible.

Farabi

I tried to build the .lib but I fail. I dont know what is wrong, the tool said unresolved external symbol. I think I did do it right. Anyone can help? I attach the include file and the dll.

[attachment deleted by admin]
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Tedd

http://www.ode.org/

Download the source package (there's a zip version) and the user-guide.


Look through the source for .h files - they will contain the function prototypes in C form; so you can see the function names and their parameters. You will need to create appropriate proto statements for you inc file.

The exports of the DLL are in the form "_ODE_dWorldCreate@4", so that would appear in your inc file as "_ODE_dWorldCreate PROTO C :DWORD" -- the name stays the same, they're all C-style functions, and this one takes 4 bytes of paramters (i.e. one DWORD; @8 would mean 2 dwords.)
You could then also add an alias line for each function so the names are nicer to use, e.g. "dWorldCreate equ <_ODE_dWorldCreate>" - then you can use the simple name when calling the function.

So, for each function you'd have something like:
_ODE_dWorldCreate PROTO C :DWORD        ;_ODE_dWorldCreate@4
dWorldCreate equ <_ODE_dWorldCreate>

No snowflake in an avalanche feels responsible.

Farabi

Hi Tedd,
I wrote <func name> proto C but it failed. But if I write it <func name> proto SYSCALL the error message is not appear but when I compiled it MASM report an error unresolved external symbol. Im confused.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"