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 / community functions dll

Author
Message
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 27th Dec 2008 21:34
hi i was a bit bored so i had an idea to compile a dll of community functions , mainly for ease of use but there might be a small speed increase .

anyway if anyone would like to donate some usefull functions from dbpro it would save me trawling the code snips and i would also have permission to use them .

thanks chunks.

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Xsnip3rX
12
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 30th Dec 2008 06:26


chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 31st Dec 2008 03:23
will make into a function and add it in.

thanks chunks.

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Xsnip3rX
12
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 31st Dec 2008 08:50
The authors get credit for their functions, correct?

chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 31st Dec 2008 18:01 Edited at: 16th Mar 2009 18:42
This dll only supports DBPRO .......

below are a few i`ve added already + the authors names ,just let me know if anyone doesn`t want their function using and i will remove it .

updated: 10/2/09 , 11:14

below is the final dll i`ve added enough now , thankyou to all who provided functions.

many thanks chunk

nvidia geforce 8600gt + amd athlon 64
windows xp pro.

Attachments

Login to view attachments
Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 2nd Jan 2009 01:19
You have my thumbs up, I downloaded your current DLL and it works well.

Just out of curiosity, how do you program DLLs for DBP? I've never tried. (Any resource I can look at?)

Diggsey
13
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Jan 2009 01:46 Edited at: 2nd Jan 2009 01:46
The 'technical documents' help page in the help is a good place to start (Although make sure you read VERY CAREFULLY the parts about returning strings as nobody seems to take any notice of them, and then they come back wondering why their dll doesn't work!)

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 2nd Jan 2009 01:58 Edited at: 1st Mar 2009 01:21
i can still never get returning strings to work , after spending many hours trying



@Seppuku Arts just find some info a delve right in it`s quite easy once you get used to it .

also look for Aaron Millers sdk it makes calling the dbpro commands very easy they just work like gdk.

any more functions guys ?

chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Mr Kohlenstoff
13
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 2nd Jan 2009 02:05
I'm not sure if this function is able to help anyone.. however, you might put it into the DLL, at least I often need such small GUI-gadgets and mostly am to lazy to search an old one so I rewrite them everytime.



The function has to be called this way: v# = gui_slider(x,y,w, v# )
You might think about giving the function a better name, I think "slider" is not the correct term here, is it?
If anybody is interested (well, most certainly right..)here's an example "demonstrating" the function.



All in all such a plugin is surely a good idea and there already seem to be some quite useful functions.

chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 2nd Jan 2009 02:31
thanks it`s going in now nice function.

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Xsnip3rX
12
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 2nd Jan 2009 06:35


chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 2nd Jan 2009 08:47
sorry man but thats still not a function , in order to export commands it needs to be a full function. eg.

not tested .

fix it up and i will add it in.

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Diggsey
13
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Jan 2009 13:03
@chunks chunks
To return a string you need to add an extra parameter to your function (at the start). You then need to call CreateDeleteString on the pointer with a length of 0. When you get the string you want to return call CreateDeleteString with the address of a new char pointer, with a length of the string you want to return plus 1 (for the NULL). Copy your string into the char pointer and return it.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Mr Kohlenstoff
13
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 2nd Jan 2009 21:48 Edited at: 2nd Jan 2009 21:49
Not that I want to flood this thread with bad GUI-functions, but I've got another which I use quite often because it's quite simple and looks .. well, I mean it could look worse.



However, this is probably my last GUI-function to post..

chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 3rd Jan 2009 02:01 Edited at: 3rd Jan 2009 03:43
lol the more the merrier will add it in ,hope it`s easier than the last one i had some trouble with it, c++ is a lot more keen with datatypes than dbpro ,got it working though .

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 6th Jan 2009 15:19
Here's a small one that I use frequently; it returns the file type extension of the file name given as the parameter (if there is no extension (.*), the function will return an empty string ("")).

I've got more functions lying around, so maybe I'll post up a few more later on.



-> Oh, come on...
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 6th Jan 2009 22:26 Edited at: 8th Jan 2009 21:12
cool thanks i will add it in , was starting to run low .

It comes at the right time just managed to be able to return strings correctly , with thanks to IanM & Diggsey .



chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
OnQue Int
12
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 7th Jan 2009 01:50
Hi Coders, I need a Dll that I would be willing to pay for If

needed. It is to my understanding that dll's are coded in c++.

What I want is a dll that will alow me to access the internet

within darkbasic. What I am trying to say is if I had a object

lets say a plain. I want to paste the image of the internet on the

plain as well as access it. While its in darkbasic.

If anyone can do this in any way or know how it is done let me

know .
Jetherit
10
Years of Service
User Offline
Joined: 18th Dec 2008
Location:
Posted: 8th Jan 2009 02:37
OnQue Int, that would be somewhat difficult. The internet is not a "picture" as you appear to see it as. It is a .html file that is rendered using the compiler (is that the right word for this situation?) of the specific Internet browser (IE, Firefox, Chrome, etc). That's why some webpages look different on different browsers, because their compilers are different. Now, having said that, in order to access the "image of the internet", as you say, you would have to have a compiler that knew what to do with the .html file, as well as render any media along with it. I am fairly sure some browsers have the .dlls in their Program Files folder, so you could possibly take a look at that, but risk getting more confused than you started.

Additionally, you want to "access" it, which would require using darkbasic interaction functions with a .html file, which would make things even more complicated.

Sorry to bash your hopes against the curb, but if you do end up getting it to work, I would be the first one to try it out =).

Good luck!

From JASS to Q-BASIC to Java to C++
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 8th Jan 2009 21:09
Updated today 8/1/09, get it from my post near the top.

Thanks to everyone who has provided functions , i still want more so keep them coming .


chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Sven B
14
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 15th Jan 2009 22:39 Edited at: 15th Jan 2009 22:40
I've got some functions for you:

Trails:

The loop is just to show how it works.
[EDIT] It should be able to keep a list of trails using vectors...

Bezier curves:


I don't know if it'll come in handy, but anyways...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 15th Jan 2009 23:01 Edited at: 16th Jan 2009 02:53
cool thanks will add them in as soon as ..




edit: added svens bezier , need to work on the trails a bit more.

download and changes 5 posts from top.

thanks all keep them coming.

chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 23rd Jan 2009 02:20
hi all , is there anymore functions that anyone would like to add before i wrap this up , post them and i will add them into the final version .


thanks chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
G T R
14
Years of Service
User Offline
Joined: 26th Apr 2005
Location: Dubai, UAE
Posted: 30th Jan 2009 21:53 Edited at: 30th Jan 2009 22:44
if you didn't do the final yet...
Here's a a useful set of functions to deal with animated image sequence



if you put it Credit me as Snake_x86
and example with media is attached

[Edited]
ooops there was a little mistake ... fixed
in both functions AnimSys_SetFrame and AnimSys_SetSpeed(ID,speed#)
[Edited]

Snake_x86

Attachments

Login to view attachments
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 1st Feb 2009 00:48
I have one that will save sounds (any sound, not just the ones recorded from a microphone) if that might perhaps fit in?

By the way, Chunks, you did a DirectSound using plugin before, right?
I was trying to make use of this myself today (needed a sound buffer that I can continously change what is sent to; trying to make some sort of an oscillator emulation), but I end up with this very chagrinning compiler error; undefined reference to DirectSoundCreate@12.
A google search yielded no useful results; maybe you happen to know what's up with that?
Thanks in advance

"We know some things about poodles, for example that they are alive, they can bark, they eat meat..."
- Extract from Objects first with Java.
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 1st Feb 2009 16:13
@rudolpho Yes send in more functions running low now , gonna do a few more and wrap this up .

This is the code from the plugin i was making , very simple though ,anyways it might give you an idea .






@gtr I tried doing your functions but c++ doesn`t like stuff like this


that said i will prolly mess about with it and get it working when i get time .

thanks chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 1st Feb 2009 18:29
Thanks, I still get those linker errors though... is there anything more than the DX libraries you need to include? (Seems odd as it is the dsound header that generates the error).

I'll try to dig out the function for you.

"We know some things about poodles, for example that they are alive, they can bark, they eat meat..."
- Extract from Objects first with Java.
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 1st Feb 2009 21:35
you`ve got include the static lib dsound.lib as well as winmm.lib ,thats with vis c++ is that what you are using?


#pragma comment ( lib, "dsound.lib" )

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Feb 2009 13:01
Ah , thanks. I thought it would do to add the DX Lib folder to the linker, but apparently you had to specify each individual file...

I'm using Dev C++ currently, by the way... VC++ has a nasty habbit of somehow throwing more (irrelevant?) exceptions than Dev

Oh well, it's coming along... well, nicely is such a strong word... decently now, at least

Here's my sound saving code, by the way (you can easily write the "get free ID" functions yourself by iterating through each element until db<Instance>Exist returns false. Or some faster method if you're up for it).


"We know some things about poodles, for example that they are alive, they can bark, they eat meat..."
- Extract from Objects first with Java.
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 14th Feb 2009 18:04
The final version is in a post near the top , Let us know how it goes thanks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Destrugter 1
12
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 23rd Feb 2009 00:39
Oh man, Chunks Chunks, is the offer still around?

I made a progress bar I would like made into a dll...it would be real nice. If the offer isn't around still, then thanks anyway.

Outscape
11
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 23rd Feb 2009 00:39
hey can we still post up functions

Quote: "Function ifKarlasks(Recipient as String, Post as String, Link as String)
Recipient Goto Link : Insert Post : Endfunction"
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 23rd Feb 2009 01:43
i did really want to wrap this up , but if you want i can add a few more in .

Just give me a day or so a bit busy with something else ,but i will add them in so post away


chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Outscape
11
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 23rd Feb 2009 18:21 Edited at: 23rd Feb 2009 18:52
thankyou

these are maninly small functions that i use often

swap = like abs but does both ways


endsound
because theres the bug that a sound cant play again with the play command u gota stop it
so this function checks if its playing and if not it stops it






AT positioning:


sprite checking:



finding distance



Quote: ""Iblow for TGC", that'd look real good on a CV"

Quote: ""You make a game for the iPhone if you think it sucks"
Sucking is not the point Blowing is"
Diggsey
13
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Feb 2009 21:02
@Outscape
I really don't get the point of your swap function

Why not just use the unary '-' operator???

result = -value

Which does the exact same thing...

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Outscape
11
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 25th Feb 2009 23:49
@digsey somtimes u want to find out the opposite of a number that changes between negative and positive and u dont know if its positive or negative and to find out ud need to do something like
if number>0
but with this function it just swaps it

Quote: ""Iblow for TGC", that'd look real good on a CV"

Quote: ""You make a game for the iPhone if you think it sucks"
Sucking is not the point Blowing is"
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 26th Feb 2009 14:06
@outscape ive added the first 3 of your functions , the others need a little more work , im gonna wait a week or two before i release just incase there are more functions to add , also i didn`t bother with the distance funcs because there are already functions in for that.

@Destrugter 1 your function has also been added , just need to write some examples now when i get time .


chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
Diggsey
13
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Feb 2009 18:29
@Outscape
No, you don't. I just showed you.

Your function:
myvalue = swap(myvalue)

My way:
myvalue = -myvalue

Both do the exact same thing, look:
Your code:
nmbr# = numbers-numbers-numbers
->
nmbr# = (numbers-numbers)-numbers
(numbers-numbers will always be 0) ->
nmbr# = 0-numbers
(the 0 can be removed) ->
nmbr# = -numbers
-> Function is useless...

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Destrugter 1
12
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 1st Mar 2009 18:48
Thank you! You are awesome =)
qwe
16
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 5th Mar 2009 18:03 Edited at: 5th Mar 2009 18:03
i believe outscape's function might have been intended to take a value and make it positive or negative regardless of its sign? or some other such feature related to the fact that the function ABS() is a one way operation, sorta like entropy or angle-functions
Diggsey
13
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 5th Mar 2009 18:28
No, we talked about it on MSN, and it was because he had thought that the unary '-' only made things negative, when it actually switches the sign. Maybe you could do a negative ABS function though, that always made the operand negative

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 16th Mar 2009 18:41
an update i have now added make normal map command thanks to green gandalf and dark coder for there snippets which helped .

update in this post also near top.

chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.

Attachments

Login to view attachments
Steele
15
Years of Service
User Offline
Joined: 25th Oct 2003
Location: Somewhere over the rainbow
Posted: 2nd Jul 2009 02:34
It's an old post but I thought I'd refresh it to ask a question. Will there be a help file or instructions on any of the commands?

Steele

http://www.lanningsoftware.com
Your source for Games and Entertainment
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 2nd Jul 2009 11:53
sorry man this is done and dusted there are examples which cover all the commands in the third post down at the beginning that should help .

if you get stuck on any in-particular give us a shout on here or my email .

nvidia geforce 9500gt + amd athlon 64
windows vista ultimate.
Steele
15
Years of Service
User Offline
Joined: 25th Oct 2003
Location: Somewhere over the rainbow
Posted: 2nd Jul 2009 16:08
Thanks chunks,

I was hoping because some of these look like they would save me some work as well as be faster. The only thing I could find is the cfunctions.ini which has things like:

however didn't include the html's and the parameters don't say what they are for. I was hoping the html was just forgotten during the packing.

I'll figure it all out.

Cheers,

Steele

http://www.lanningsoftware.com
Your source for Games and Entertainment
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 2nd Jul 2009 19:40
here is a quick command list for you ,its a bit messy but should help you along with the examples in the top post.

nvidia geforce 9500gt + amd athlon 64
windows vista ultimate.

Attachments

Login to view attachments
Steele
15
Years of Service
User Offline
Joined: 25th Oct 2003
Location: Somewhere over the rainbow
Posted: 2nd Jul 2009 21:59
Thanks Chunks, it does help some. There aren't any examples for some but I'm working on figuring those out.

What is single keycheck(keycode) for?

http://www.lanningsoftware.com
Your source for Games and Entertainment
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 2nd Jul 2009 23:35 Edited at: 2nd Jul 2009 23:43
Im currently doing proper help files , they will be done tommorow .

Single keycheck works like keystate but you dont get the continuous repeats when you hold the key down it just returns true once until the key is lifted and pressed again.


EDIT : I have just been looking at your site , looks like some cool software you got there , good luck on all your endevours .

If you need any dlls for dbpro making that could add any functionality to your games/utils send us an email , if it is within my reach as a programmer.

I do all my work for free , got lots of time on my hands .
chunks

nvidia geforce 9500gt + amd athlon 64
windows vista ultimate.
Steele
15
Years of Service
User Offline
Joined: 25th Oct 2003
Location: Somewhere over the rainbow
Posted: 3rd Jul 2009 00:02
Wow, thanks Chunks!

You sound like me. I've been unemployed for seven weeks. Everything on my website so far (with the exception of the FPI viewer) was done in DBPro. I'm working on a game now that might do well based on a little research I did before my lay-off. It's been keeping me busy and somewhat sane. I've never been unemployed for longer than a week before.

If I make a small fortune, I'll be sure to keep you in mind.

Cheers,

Steele

http://www.lanningsoftware.com
Your source for Games and Entertainment
chunks chunks
12
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 3rd Jul 2009 16:52
lol , here are the help files , i left out the commands what are experimental , but they still can be used they are in the messy list .

I would like to thank ianm if he reads this , his help generator is the best , makes life a lot easier .

Thanks chunks.

nvidia geforce 9500gt + amd athlon 64
windows vista ultimate.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-10-19 07:39:51
Your offset time is: 2019-10-19 07:39:51