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.

DarkBASIC Discussion / using DLLs with DB enhancement pack

Author
Message
Edward Stroud
17
Years of Service
User Offline
Joined: 25th Jul 2008
Location:
Posted: 25th Jul 2008 23:24
I am fairly new to DB, but I have no problems understand it's general use. I got the enhancement pack so that I can use the Sparky's famous collision DLL.

But the readme with the DLL assumes I'm using DBPro, so I'm not sure where to put the file?

Sorry if this is blindingly obvious!
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 26th Jul 2008 10:20
Hello,

Well first off, here's a link to the DBC version:

http://forum.thegamecreators.com/?m=forum_view&t=31051&b=5

Generally, you will want the dll in whatever folder your project (your .dba source code) is located. You'll have to use the provided function library and INCLUDE# it in your source code.


Next, if you want to use the DBPro version, which has many more features, I imagine it's possible (I haven't tried it yet - I think I might after I'm done writing this) but there are a few things to consider.

I believe it's written to behave like a plugin for DBPro. That means there is a specific directory for DBPro it has to be placed. Then the dll functions can be referenced without having to make dll calls but just by using the functions as if they were part of the built in commands from DBPro. DBC does not behave this way.

In DBC, you can basically have the DLL anywhere but you'll have to load it into your program using LOAD DLL and you will always call the dll functions using the command
CALL DLL <num>,<function>,<parameters...>
This can of course be placed inside a DBC function or a subroutine. Anyway, since the DBPro version is also written in C++, I believe you'll have to call the functions using the decorated function names in DBC. SO if the function name is
void SC_SetupObject(int,int,int)

it's decorated calling name is:
?SC_SetupObject@@YAXHHH@Z

Last thing, many of the commands are for DBPro specifically and won't work for DBC even if you manage to call the function properly. DBC has no terrain, so that's one right off the bat that won't work.

Enjoy your day.

Login to post a reply

Server time is: 2026-07-05 09:06:41
Your offset time is: 2026-07-05 09:06:41