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 / Include files and DLL's

Author
Message
Roquqkie
23
Years of Service
User Offline
Joined: 23rd Mar 2003
Location:
Posted: 26th Mar 2003 12:58
Hi

I'm actually a C++ programmer, so I'm used to be able to add multiple files to my project, i.e InitFile, GameLoopFile, MenuFile etc.

My question is: how can I do this in DBPro?

Another question: Is it possible to use DBPro objects (not "the" object-class, but more general, i.e. sound, object, image, sprite etc.) in your own DLL's?
This would be REALLY cool, since C++ programmers as myself would be able to write entire games as several DLL's using OOP design!

Best regards
Roquqkie

PS. Please notice that I've posted this in the Newcomers forum also, but since its half-and-half advanced and maybe not a question, but a request for better DLL-support I've decided to post it in this forum also
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 13:25
You can add mulitple files by going into the 'Add Files' button and then either adding a blank file or inserting a current one.

There are currently attempts to get the DX handle (and possibly some to get hold of the graphics handles), but really the answer is (currently) no, you cant.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Roquqkie
23
Years of Service
User Offline
Joined: 23rd Mar 2003
Location:
Posted: 26th Mar 2003 13:32
Hmmmm.... Comming from a C++ enviroment I can't understand why the DBPro Team haven't implemented support for this. It's really simple to code and I'm sure many advanced programmers would use DBPro then.

If anyone from the DBPro Team is reading this, please tell me why this isen't possible

Best regards
Roquqkie

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 14:00
I think Lee has said that if enough people wanted it then he might add an interface...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Roquqkie
23
Years of Service
User Offline
Joined: 23rd Mar 2003
Location:
Posted: 26th Mar 2003 14:02
Okay great! But... Most people who use DBPro are n00bs, so I don't think there is enough to make Lee code an interface

Best regards
Roquqkie

Xoid
23
Years of Service
User Offline
Joined: 8th Mar 2003
Location:
Posted: 26th Mar 2003 14:14
I think DBS should concentrate on fixing the existing bugs instead of adding more to the 'fix list' LOL
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Mar 2003 14:25
I'm working on it at the moment, but there are difficulties and rules you will need to stick to in your code.

I'm writing a code generator instead of doing it by hand, so that (hopefully) it will be usable on future patches of DBPro.
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 26th Mar 2003 17:15
mmmm code generator /drool

This and API access soon... right? right?

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 18:24
I doubt it...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Mar 2003 21:14
Galiem, I'm a little confused by what you mean by API access. You can access all of the standard windows API now. The only things you can't do are use callbacks or access COM objects - at least directly.


BTW, the code generator is for my use only - I will not be releasing it in it's current state but will be releasing the interfaces I generate with it. It's made up in parts using C, C++, Bash script, and AWK script. I may rewrite in C++ later if the mood takes me.

Initially, I will be producing a static library for linking to that will only (!) give you access to the existing DBPro commands from C++. Later versions might wrap classes around the commands, or give access to a few other bits 'n' bobs from within DBPro.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Mar 2003 22:01
Roquqkie ... it is 'possible' to create objects using the Make Memory commands to create your data objects which you can then pass using the data pointer into the DLL and then you can use them as objects within the DLL itself, if you setup the object as part of the DLL and take each part of the data (enumming it all basically)

i'd love to code some for you to show you, but i'm pathetic at coding this stuff, there was a Matrix example of objects within DBpro recently - but you'd extend on this idea. Only problem is unlike Microsoft Visual C++ objects you have to do everything yourself to set them up - i mean it is harder (but much easier in the longrun) to setup a scriptcode which will code pro in memory as you go along which can be used whilst the program runs to setup all the aspects for you so you just dump the data...

you then setup the data type for the object, set the data for each part of it as a pointer to actual data



then from that you could grab the object data with like 'fill memory *myObject.Vertex,position,data'

you can then grab it in the DLL with the pointer
i know that a stupid and very basic example but you get the idea - i mean you could ontop of that make extra types which could contain the data on a temp bases using a function...

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 26th Mar 2003 23:45
What I mean by API access is the ability to use basic Windows GUI resources.

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Mar 2003 00:28
MFC isn't an APi ... it is simply a library

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 27th Mar 2003 01:09
I agree with Xoid - MORE BUGFIXES... LESS NEW CODE WITH NEW BUGS!

CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 28th Mar 2003 08:02
I'm was working on a windows api for dbp, I currently have it to the point where you can open multiple window and create a windows menubar, it's alot more work then I thought it would have been working with all the dlls file to get this far, I hope to start doing some controls soon. GuyS. on real game tools also has posted an example of doing this on his site.

CTP.

HAL
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 31st Mar 2003 23:56
CloseToPerfect, are you using an 3rd party dll's to do that, and is it possible to give me a point in the right direction on how to do it?
CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 1st Apr 2003 06:05
the dlls, are window dll specifficly kernel32.dll and user32.dll
the function you want to create a window is CreateWindowExA in the user32.dll
also in user32 is showwindow,updatewindow,destroywindow and createmenu.

If you don't have a good windows programming book you'll have a hard time with these dlls.

I was able to get alot of info mainly the dll calls from this api lib for euphoria, If you can do dll programming you ought to be able to get some good infomation out of this code even though it's not dark basic code.

I'll post it on one of my sites for you to look at

http://www.angelfire.com/alt/closetoperfect/api.zip

I hope this helps you out,
CTP

HAL
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 1st Apr 2003 21:11
thanks CloseToPerfect, last night i managed to convert a basic C program and create the menu i wanted using the CreateMenu and AppendMenu functions. it looks good but have no idea how to get a value from them i can use. i have a good second-hand book but because its ment for C programming its hard to work around things like message handles so that it will work with DB.

Login to post a reply

Server time is: 2026-07-23 02:36:21
Your offset time is: 2026-07-23 02:36:21