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 / DarkBasic Pro MFC (DBpro Edition)

Author
Message
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Jan 2003 16:32
Hi all... i'll be developing this within a DLL as well so the functions are better equipped and made faster later.

However for now i'm going to develop this today within Pro and test on my Laptop which finally has a working demo of Pro on it

what i'm doing is creating a dpmfc.lib (renamed dba) that you include within projects, and then use the functions to develop your utility programs without much hassle

so windows, buttons, menus are all developed and setup for you and all you have to do is type say



and et voila you have a working button, or a table menu setup in a way that you just input the data you wish to use for it.

unlike IronHoofs Visual DarkBasic - you don't plot out what your making in it (atleast not yet) you have to actually hard code it all. Hopefully the functions should be so simple to operate that it doesn't matter though

now i'd like everyones input on what they would prefer these functions to be named, because it'll really be a global thing and when the DLL is made they'll be named the same.

right now everything is called mfc[FunctionName]()
this is because basically Microsoft Foundation Classes are what give C++ users the windows native GUI functions.

as the complexity of this is going to go into being able to dock and undock windows (something which is a pain in the ass to code) ... different window styles for different options.

now i'll probably release something vaguely familiar tommorrow, and i'll compile 2 colour sets Windows.Clr and RavenTau.Clr - which will be Windows Classic and my own graphics stlye which was recently shown for a possible gui layout of gameMatrix.

also ... if anyone has any particular request for certain functions to be premade then i'll look into it later.

Currently what will be developed is ->
Text Buttons
Icon Buttons
Windows (using Icon Buttons)
Frame Dialogues
Drop-Down Menu's
Mouse Menu's (right-click)
Mouse Quick Names (eg, MB_OK makes a button with okay on it)
Keyboard Accelerator (shortcut array functions)
Combo Menu's
Status Bar
Tab Menu's
Roll-Out Menu's
Rich Text Dialouge Type
Standard Text Dialouge Type
Render Window Type
Containment Menu
Radio Buttons
Check Buttons

Now believe it or not the hard part isn't getting each of these working ... the hard part is to make functions that can be seemlessly intertwined with each other

i will be adopting a C++ style of coding for this, for example



this will cause a windows style popup that won't allow the user to carryon unless they OK or CANCEL it...
It displays "Function Failed" where the error is and "Error" in the titlebar.
It's using a toolbar menu with no X quit feature.
If the user presses cancel it runs the QUIT() function which closes DBpro application

you'll be able to line up several functions in certain functions with the | "pipeline" symbol

the toolbar.noesc type actually simply points to a value which you could use yourself - but it is easier to use the descriptive function types

really would like to know what everyone else would like within this.
Anata aru kowagaru no watashi! http://members.lycos.co.uk/timesaga/darkbasic/gir.gif[/img]
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Jan 2003 16:37
Its actually || for OR'ing data...

...Sounds good - if you can get it to work...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Hubdule
22
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 27th Jan 2003 16:55
"what i'm doing is creating a dpmfc.lib (renamed dba) that you include within projects, and then use the functions to develop your utility programs without much hassle"

As soon as Patch 4 arrives I'll release a nice package to the DB community which makes it possible for you to crypt your DBA sources and include them in your projects. That way you can write code, add some export definitions and simply include them in other proj. You can also give these libs out to others, without giving the source of them More info soon

Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Jan 2003 17:24
Ohh... that would be amazing Hubdule - i look forward to it

Anata aru kowagaru no watashi!
stormtrooper
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: United States
Posted: 27th Jan 2003 20:47
This sounds great I'm not any good with any language yet but I have played around with C++ and VB and know a little about what you want to do, hope you can work it out!!! Looking foreward to trying it!!!!!!!!!

Scott Wolfe
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Jan 2003 21:42
hey quick q because someone might've already tried this and would save me time ...

if i make an array with a type ... say type colour
with RGBA in it right?

when i save the array and load it i later, does it still retain the type?
or do i have to declare it again?

i'm really unsure to what i should do, because if it doesn't save the type then how could i retrieve array type data because if i do
dim pArray(255) as Colour then surely that wipes it no?

sorry just this has been worring me for a little while cause right now i'm developing aspects and will need to compile soon ... so i wanna know if i can save the array
as
pRGBA(255) as RavenClr `//this is the actual setup

or should i just do a standard array with 2 dimensions
pRGBS(255,4)

the first would make my life much easier, but then again if it isn't possible i'm not gonna worry about it lol

gonna watch Enterprise in a lil while so someone lemme know soon if you know

Anata aru kowagaru no watashi!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2003 22:08
Runtime error 54 - Array type is invalid at line 10



I'd use an array of integers or a memblock and use RGB/RGBR/RGBG/RGBB to make and break up colours. With a memblock you could make use of a pointer to pass the information into your plugin.

BTW, the byte sequence is reversed if you poke the RGB() colour into a memblock using dwords (BGRA).
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 27th Jan 2003 22:41
Hey that sounds v useful Awkward to get working tho I imagine, but coool

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2003 22:48
Nah, easy

Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Jan 2003 23:07
interesting... but wouldn't really save any space
4-byte array for RGBA and a 4-byte memblock position for RGB

i suppose it'd make more sense actually just to use a dword like
value as dword = red ( green >> 8 ( blue >> 16 ( alpha >> 24 ) ) )

ya know i've been looking through the help and noticed the data operators
0x for hex and % for binary ... dang i wish certain things were in clearer places
cause this can help me ALOT with coding this

Anata aru kowagaru no watashi!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Jan 2003 23:10
oki well the code above wouldn't quite work but you know if i'm gonna use a 32bit value might as well make full use of it (unfortunately in DB Std|Ehd you could only interger 16-bit values whenever i bitshift the higher values it simply hit max value or rather max negative value and stop )

but thanks you're being alot of help for me recently Ian

Anata aru kowagaru no watashi!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2003 23:35
You're welcome.

The code to set up the colours and break them back down is already built into DBPro.

RGB(r, g, b) already returns a DWORD value.
RGBR(colour) gives you the red component of a colour.
RGBG(colour) + RGBB(colour) for the other two parts.

There is no function to get the alpha value, but you can divide the DWORD value by 16777216 or (0x1000000) to get it.

It just seems to me to be easier to handle colours using a single value rather than 4, and just split out the parts when you need to.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Jan 2003 23:44
the MFC is going to be using the 2D drawing, and althought i don't plan to use the alpha at this point - i want to leave room in for later pixel determination. So that i can add it in if i want it

i mean if you think about it thier functions would be no different than the bitshifting way, just remember ^Bits/255 for the colour if i remember - and ^Bits/128 for 16-bit ... i think thats what i recently saw.

but no one i talk to seems to be able to varify cause they all use the bloody builtin DirectX or OpenGL functions for finding colours.
How the heck are we suppose to become real coders if no one ever knows this kinda info

i mean i know that most of this is built into Pro, but i prefer to use code i've done myself - just a personal preferance really isn't it

Anata aru kowagaru no watashi!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jan 2003 00:01
Yep. I tried doing colours that way a while back in DX7.

Took me days to get a system together for handling any variation of 16->24 bits of colour w/o alpha. Pain in the arse is what it was Probably still got the code on one of my other comps somewhere.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 28th Jan 2003 01:19
oki ya know as i'm coding this i'm thinking of more an more things to put in as addition functions within different libraries

sorry but anyone who thinks they'll be able to pickup and know ALL the functions by heart within a day you can forget it - cause right now there are 89 functions, over 5,000 lines of code over 6 libraries

DBPMFC.h - Raven.h - Stdio.h - Array.h - nVidia.h - Network.h

you can guess what is in most ... just wanna let everyone know now so they don't bitch when i release some about "why won't they work"

firstly ALL of the libraries will require Raven.h + Raven.DLL to run!
secondly ALL of them will have library specific stuff which you will have to _ENUM_[library name]() prior to use, else you'll get errors all over the shop

there are ALOT of clever new things i've included, suchas Self Allocating Arrays

the functions if any problems arrise will use a popup to acknowlage the problem and quit - later on i'll hope to make a full Error database or something, but still to early to do this right now.

if you use DBPMFC, then all of the functions will autodetect this and use DBpro MFC rather than the DLL MFC functions for certain things, suchas popups.
However you can over-ride this within the main program after _ENUM_DBPMFC() you put bMFC = NULL

i've added the use of TRUE, FALSE, void, NULL and other such C|C++ constants to aid in easier development.

i've tried my best to keep everything as simple as possible for the end users ... so you can create and destroy dialouges easily as the ENUM for MFC does more than just setup variables but sets up an entire library for the functions that go on within it.

This means if you need to destory them you can check if they exist before you do something that could crash the program

i've also added a function called ALLOCATION() which you can use "sprite","memblock","file","image","bitmap","object","music" & "sound" within and it'll allocate thier spots automatically.

well back to work

Anata aru kowagaru no watashi!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jan 2003 02:46
It's sounding like you're coding a replacement engine. What's your aim?
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 28th Jan 2003 02:54
aim here really is to get in a larger language base ...
Professional is great as it stands, but there are alot of things that bug me about the command structures.

So ontop of the MFC i'm developing a tonne of useful functions that allow the users extensions.

Kinda like what guy did with DarkEdit by adding Types
it just makes everyones life easier if they don't have to sit down and worry about the math and memblock allocation for say Blending 2 images.
Or worry about getting thier head around stacking Arrays.

obviously if you need something specilised then you'll still be doing it yourself, but this basically takes alot of hassle out of certain aspects which really arn't documented well for the beginners

but mostly its so that i don't have to spend 2-3hours coding in something just to have an error cause i spend all this time now so later on i don't have to worry about it hehee

Anata aru kowagaru no watashi!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jan 2003 03:03
Hmm. I may be able to help you out with a few more things then. For instance, creating a DBPro image from your DLL, getting the texture of an existing image, that kind of stuff. It's not too hard.

Just drop me an email if I can help in any way. I'll check in the morning.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 28th Jan 2003 14:54
sure ... if i get stuck i'm sure i'll get ahold of ya hehee

Anata aru kowagaru no watashi!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 30th Jan 2003 18:05
So your back, eh?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 30th Jan 2003 19:11
who is Sauron_?
and who the hell are you calling Robert Lettan? - you best not be cause only my mom calls me that ... and i MEAN THE ONLY person.

somehow i don't think your in the same catagory as my mom

Anata aru kowagaru no watashi!
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Jan 2003 20:46
@Raven

Sauron is an annoying little git who pops up in the forum now and again, spams everybody, flames DB then leaves.

NOBODY has a forum name as stupid as Darth Shader. I do.
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 31st Jan 2003 01:01
Sasuron's the annoyin lil hacker guy who pops up everynow and again and chucks chunks of Spam around

Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 31st Jan 2003 01:08
must be the visitor from my last vacation ... whoever he is, best he doesn't call me by that name unless he wants to see a real hacker do some damage on a grand scale.

:: shudders :: he certainly isn't a friend so doesn't get the right to use my name

Anata aru kowagaru no watashi!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 31st Jan 2003 01:49
Changing the subject to a slightly more relevant subject... Did you finish your program version DLL ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Feb 2003 06:08
program version? i made a windows version DLL ... and yup it worked a treat
the Anti-Aliasing one works now, but not in a state that people will want to use as of yet (too much hassle)

the MFC libraries are close to done now, hope to see Hubdules creation come to light to protecting the .dba and alike code
but i'll show off the results with gameMatrix soon, cause you don't get how well they work from a screenshot.

Anata aru kowagaru no watashi!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 1st Feb 2003 13:09
Indeed - looking forward to it.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st Feb 2003 18:42
"hacker"???

Script-Kiddie I think you mean.

NOBODY has a forum name as stupid as Darth Shader. I do.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Feb 2003 18:57
Darth: Sh, don't let him hear you. Last time he didn't even try to disguise his IP. Thats how rich stopped him. I guess he changes ISP to get around that - totally clueless.

Raven: Why is the AA dll too much hassle to use?
Arrow
22
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 1st Feb 2003 19:39
In any case, He's a cracker. Hackers are desent folk who just like computers and how they work. Crackers are guys who take that info and use to aynoy and destroy. Big difference.

Am I a butterfly dreaming I'm a man?
Or a bowling ball dreaming I'm a plate of samishi?
Never assume that what you see or feel is real.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Feb 2003 20:20
Well firstly i solved the crash problem by actually reinitlising the Direct3D primary screen ...
So it now creates a new instance, which i had to pointer to where the screen should be so that Pro didn't get bitchy and not like it

However after that it didn't work in Pro - so i was like "Grr this is getting on my nerves"
Then had to find out i had to Destroy the current camera as well then reinitilise that,

Wayhey it works! So i created a Second Camera, doesn't bloody work
So i went back into the DLL and setup the input for the function to allow for upto 10 camera/render veiws

now it worked, but if you want any more than one veiw using AA you must use the function, then restart the camera, and you must make sure each one is using the same AA format 2x,4x,8x else it complains at you
Oh and you can't turn it off without crashing DirectX

so as i said, a lil too much hassle right now - i need better Dx Knowlage i think

Anata aru kowagaru no watashi!
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st Feb 2003 20:23
"else it complains at you"

Self-destructing is a very extreme form of complaint Raven

NOBODY has a forum name as stupid as Darth Shader. I do.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Feb 2003 20:32
Don't know too much about DX myself, but would being able to get hold of DBPro's existing D3D interface or D3D Device interface be of any help?
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Feb 2003 21:28
I think its more because Pro uses multiple interfaces, and it doesn't like anything outside of the pipeline comming in.

Really the best way to achieve AA would be to have Pro set it up before it initilised ANY render window - but i'm pretty sure thats not an option

Anata aru kowagaru no watashi!

Login to post a reply

Server time is: 2025-05-17 13:35:52
Your offset time is: 2025-05-17 13:35:52