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.

Dark GDK / DarkBASIC Pro to DarkGDK Converter

Author
Message
Frame
18
Years of Service
User Offline
Joined: 4th Aug 2006
Location: Löhne
Posted: 3rd Jan 2008 20:27
I have made a Converter to translate DarkBASICPro source code to DarkGDK source code ( only C++ ).

If somebody is interested, it can be loaded from :
http://www.frank-meinert.de/darkbasic/dba-to-cpp-converter.zip

This is a pre-release. Some features are not implemented yet.

The ZIP file contains a single EXE file without the need of any installation.
The source file can be selected via drag and drop. If no source file is submitted, an open file dialog appears.

The converter creates a header file ( <src_name>_dba.h ) and a C++ source file ( <src_name>_dba.cpp ) into the folder of the DBP source file.

The main reason to write this converter was to translate the DBP functions of the 'GUI Studio' from 'Andromedus' for using with DarkGDK. This works without any problems.

Perhaps it is useful for somebody,
Frank
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Jan 2008 00:00
TGC was asking people to make this type of converter a while back, you should get in touch with them.

My DBP plugins page is now hosted [href]here[/href]
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 4th Jan 2008 00:19
Very impressive Frame!

I tried it on one of my simpler game engines and apart from a couple of problems it pretty much handled the conversion completely except for the ODE calls which it knows nothing about (which is fair enough). Code conversion in less than 2 seconds, now that's efficient!!!

On any larger projects I ran into a buffer overflow error as follows:

Internal error (Lex ):
input buffer overflow, can't enlarge buffer because scanner uses Reject

No matter how good your code is, someone will improve on it
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 4th Jan 2008 00:46
Seems to have some problems recognising some of DBP's array commands, but apart from that, this is certainly very impressive! Well done mate

Your signature has been erased by a mod
Frame
18
Years of Service
User Offline
Joined: 4th Aug 2006
Location: Löhne
Posted: 4th Jan 2008 20:54
Thank you for the response.

Pixel Perfect :
Very interesting. I tried very large source files and got never a buffer overflow.
Do you have any file with this problem you could send me for testing ?
Thank you in advance. ( My e-mail address : Frank_Meinert<at>t-online.de )

Zotoaster :
Yes, that's true. The DBP's array commands are one of the missing features.
( Coming soon. )
John Goewert
16
Years of Service
User Offline
Joined: 1st Jan 2008
Location: Cornfield, MO
Posted: 10th Jan 2008 23:40
Thanks. I used this tool this afternoon to convert over some DBPro code. Worked like a charm with one little problem. I found it to be out of the ordinary odd on the Basic code side, so you just probably didn't account for it.

The developer was using <= for "less than/equal to" and that converted right. But then he used "=>" for greater than/equal to" instead of what I expected ">=". I guess that is valid in Basic, but looks goofy to me. Your converted didn't seem to like it either.

Thanks.

Blah - http://www.john.goewert.org
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 11th Jan 2008 00:41
@Frame

I can't remember which files caused the overflow errors at the moment but I'll test it again this weekend and email you an example.

No matter how good your code is, someone will improve on it
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 11th Jan 2008 05:31
Thank you for this excellent converter. Saves me alot of time. Really thanks alot.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 11th Jan 2008 20:40
@John Goewert - I could totally see that not being accounted for because ...even for DarkBasic its bad form >= or <= never =<



TVB
16
Years of Service
User Offline
Joined: 7th Dec 2007
Location: China
Posted: 15th Jan 2008 09:48
That seems a useful tool.I will play around later.Thanks.

Login to post a reply

Server time is: 2024-10-08 15:46:08
Your offset time is: 2024-10-08 15:46:08