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 Professional Discussion / How can I make a dll file....from DB pro....for DB pro?

Author
Message
Mark Garrett
Reviewed AGK on Steam
21
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 8th Jan 2011 20:26 Edited at: 8th Jan 2011 22:53
I would like to cut down on the compiler time by making a dll out of this include file.

How would I do it?....


The file looks like this, but it's really long. It has 1,400 very small mp3 files in it.

______________________________________________________________________
include file#

Load_music:

if Mu = 1 then load music "q1.mp3",1:return
if Mu = 2 then load music "q2.mp3",2:return
if Mu = 3 then load music "q3.mp3",3:return

return
_______________________________________________________________
etc. etc. etc. times 1,400 mp3 files
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 8th Jan 2011 20:58
Quote: "How would I do it?"


You can't from Dbpro. You'd have to either try the purebasic or delphi or c/C++ roads.



Anyway, Not use i see the point of your example, why load the same file into a different music slot ?

I suspect you mean to the load a file from list of names, so it's probably better to store that type of data externally, rather than in the source code. Storing all the names in a text file would do.

Mark Garrett
Reviewed AGK on Steam
21
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 8th Jan 2011 22:55 Edited at: 8th Jan 2011 23:18
Well, actually, they're 1400 different mp3 files,

But I posted my question incorrectly, I have corrected my mistake above.

But, do I get you correctly, that I can make a DLL file with the pure-basic and use it with the DB pro?

I'm thinking I could probably make a exec. file with db-pro that I could use with db-pro, and then use a text file to pass parameters between two Db-pro exec files. in other words, I could use an exec file in-leu of a dll. That's all I can see right now.

In other words, I could include a db_pro exec file in my original db_pro project, and then call to it as if it was a dll by using the execute command.

Then, I could include a text file in my project by which to pass parameters (numbers, etc) between the original exec file and the secondary exec file.

any other ideas from anyone?
Andrew_Neale
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 8th Jan 2011 23:32 Edited at: 8th Jan 2011 23:34
This may be a little off topic, but if the code you have posted above is what you are actually using, might I suggest an optimisation?



If you're looking to make a plug-in though, I would head over to 'Program Announcements' where, I believe, you will find a template for DBP plug-ins for Dev C++.

[Edit] Here it is: http://forum.thegamecreators.com/?m=forum_view&t=97069&b=5 [/Edit]

Mark Garrett
Reviewed AGK on Steam
21
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 9th Jan 2011 00:00 Edited at: 9th Jan 2011 00:09
Wow, that's totally awsome, I didn't know you could code it like that.

Thanks, I will try it.



Yup, it's working! thanks.

Two heads are better than none

Login to post a reply

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