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 / Who needs a modern basic as dbpro? Using FreeBasic ;)

Author
Message
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 13th Apr 2015 15:54 Edited at: 16th Jun 2015 14:05
Ok, the idea is not really new. But perhaps it interests anyone. I have written a plugin for FreeBASIC, that uses the functions of dbpro.
The first tests ran so far error-free. Now I have rewritten in FreeBASIC the L-Type demo. Have split it into several files and use some of the advantages of FreeBasic.

The L-Type Project with source and executable can be download here.

DBPro-Utilities
[2015-06-16] - most recent


FreeBasic Plugin-Files
[2015-06-16] -> most recent


[2015-05-26] -> [OBSOLETE]


[2015-05-12] -> [OBSOLETE]

[2015-05-04] -> [OBSOLETE]


[2015-04-23] -> [OBSOLETE]


To use this plugin show here.

And here some code from the Project.

If there any interest for this plugin, I will develop it further.

LType2.bas


LT_InitFunc.bas


LT_Landscape.bas


Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Apr 2015 00:28
Looks interesting.

Quote: "use some of the advantages of FreeBasic."


What are these?



Powered by Free Banners
Kingius Returns
10
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 14th Apr 2015 00:42
I was wondering that myself. Recursion perhaps? While programming my game today I had to restructre some code as dbPro doesn't support this, but it was not really a big deal to do.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Apr 2015 01:39 Edited at: 14th Apr 2015 01:56
Quote: "While programming my game today I had to restructre some code as dbPro doesn't support this, but it was not really a big deal to do."


I thought DBPro did support recursion.

Edit It does. Simple example:





Powered by Free Banners
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 14th Apr 2015 02:49 Edited at: 14th Apr 2015 03:41
Hey, MadBit. I am very interested, I have been using FreeBasic longer than DarkBasic Professional. The advantage is being able to program in a Basic dialect more like C++. Nice work!

True OOP.
Public and Private access rights.
Cdecl, Pascal and StdCall calling conventions.
Passing function arguments ByRef and ByVal.
Function overloading.
Static local variable preservation.
Pointers to procedures.

Edit: I can see spending money on something like this.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 14th Apr 2015 04:40 Edited at: 14th Apr 2015 04:45
Ok, if that don't make your mouth water, how about just a few more advantages.

Operator Overloading.
Multi-Threading.
InLine Assemby.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 14th Apr 2015 09:44 Edited at: 14th Apr 2015 09:46
Quote: "Quote: "use some of the advantages of FreeBasic."

What are these?
"


See what WickedX write. Thats right what he has written. If you interestet of the Features of FreeBasic look here.

Quote: "Quote: "While programming my game today I had to restructre some code as dbPro doesn't support this, but it was not really a big deal to do."

I thought DBPro did support recursion. "



Yes, FreeBASIC and DBPro support Recursion. That was one of my tests to find out whether FreeBasic is faster or not. The Result really surprised me.

Here is the code for DBPro and FreeBasic, you can test it both. This is Fibonacci calculation (the recursive version).

Fibonacci.bas - FreeBasic


Fibonacci.dba - DBPro


The result on my Laptop (i7 3660) to get the 40th Fibonaccinumber is

FreeBasic: 1.101 sec.
DBPro: 11.219 sec. (11219 ms)

I think the GameLogic in FreeBasic, run in any case faster.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Kingius Returns
10
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 14th Apr 2015 12:39
Not sure why it didn't work for me when I was programming yesterday; must have been something to do with the method in question. I had an inventory routine which would let the player toggle between characters and run itself again, so must have been something to do with the logic I used.
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 14th Apr 2015 19:46 Edited at: 14th Apr 2015 19:46
First off, really nice job!

Why does FreeBasic use DIM for declaring a variable? DIM means "Dimension" and has always been used for Arrays. Confusing ...

MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Apr 2015 16:11
First I like to thank for your comments.

Now I want you to give the ability to try out the plugin itself.
Download at the bottom of this post.

First you need to install dbpro. For this, the latest upgrade (U77 RC7).
Then you install FreeBASIC and an IDE of your choice. I use FBEdit for this a have a template-file and a file for syntax-highlight.

Now you copy the content of the 'FreeBasic'-folder in the installation folder of FreeBasic and the content of the 'FBEdit'-folder in the installation folder of FBEdit (if you use FBEdit).

Note, you can run the compiled programs only on computers where DBPro is installed.

Quote: "Why does FreeBasic use DIM for declaring a variable? DIM means "Dimension" and has always been used for Arrays. Confusing ..."


In FreeBASIC standard language, the variable must be declared before the first use. And so all variables at freebasic are declared.
Show here for more information.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 17th Apr 2015 03:31
Thank again, MadBit. Compiles and runs with FreeBasic version 0.23 great with just warnings. Percentage wise, how complete is this?
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 17th Apr 2015 06:08
I use FreeBASIC 32 in the version of 1.00. Compiling of l-type is completely without warning. Can not say where are the differences between the versions.
What kind of warnings are there.

Functions of dbpro almost all implemented, except for the file handling and some system commands. Because I assume that you would take the version of FreeBASIC than that of dbpro.
So I need for the plugin, just a little fine tuning. I guess around 90%.

If you missing some functions pleas tell me. I can implement it easily.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 18th Apr 2015 14:06
You had me at function overloading!

Subscribed.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 19th Apr 2015 04:03
I just updated to FreeBASIC-1.02.0-win32, no more warnings. I needed to update anyway. Seems like it wasn’t long ago I last updated. That’s the best thing about FreeBASIC it’s still actively developed. I agree the system and file functions or more suited to FreeBASIC. Looks like it’s pretty complete. I will test some more and report any issues I may find. Thanks again.
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 19th Apr 2015 05:08
Quote: "Who needs a modern basic as dbpro? Using FreeBasic "


And there's also an irrlicht wrapper for Freebasic written by Frank Dodd.

I must admit that irrlicht has evolved quite a lot in last couple of years and i highly recommend for everyone.It comes with an extremely powerful engine , handles lots of stuff that DBP does not and it is actively developed , it is crossplatform , has iOS and android support , has some built in materials (normal parallax , refflection etc)
And the developers finalizing their new version which will have DX11 support , and lots of modern stuff.

[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 19th Apr 2015 06:43
I'm curious in that I use a lot of the Matrix1 Utilites with my DBPro projects.

Would Matrix1 Utilities commands be available to use? In thinking about this, there are some commands that would be made redundant, but others would still be useful.

Also, any clear defined steps on how to set this up will probably get more users involved.

I'm also curious as to the final deliverables to get an executable running when using DBPro via FreeBASIC. For example, will this result in needing to ship even more .DLL files with compiled projects?

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Balid
20
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 20th Apr 2015 03:05
MadBit,

Yes there is interest in your great plugin.

All the best,

Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 20th Apr 2015 06:36 Edited at: 20th Apr 2015 08:27
Gotta say, I'm all up and running now, now that I found the DBPro Template that you created. This is pretty sweet!

But, now I'm thinking about application deliverables. How do we send users/gamers just a simple .EXE & Media folders to run our application?

And further to this, how do we support plugins, such as IanM's matrix1 utilites, and the EAP plugin etc?

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 20th Apr 2015 09:41
First, thanks for your words!

Quote: "But, now I'm thinking about application deliverables. How do we send users/gamers just a simple .EXE & Media folders to run our application?"

For now, you can only run programs with installed DBPro or you copy all the dll's from DBPro in the program directory.
My plan is that I develop a ReleasePacker which packs all in one file. As it also makes DBPro.

Quote: "And further to this, how do we support plugins, such as IanM's matrix1 utilites, and the EAP plugin etc?"

Yes, I need a little help from you. I've never used the Matrix1 utilities. So I do not know which of them are really useful. Therefore, it would be good if you tell me which are really important. Then I will develop this as a separate plugin. Just as with all other plugins.

Quote: "I will test some more and report any issues I may find. Thanks again. "

Thats very welcome.

@Balid
Thanks. BTW, I like your IDE-Indigo.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 21st Apr 2015 03:53
Madbit, would it also be worth your while garnering interest for this project from the FreeBASIC community via their forums too?

In running a general search, it looks like similar DBPro/FreeBASIC projects have been approached in the past, but as to what end I haven't spent that much time researching so not too sure where each project ended up.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 21st Apr 2015 09:54
Quote: "Madbit, would it also be worth your while garnering interest for this project from the FreeBASIC community via their forums too?"

If you want, feel free to advertise this project. I myself would prefer to develop this project further, than to write in several forums about it. For a given time, I would also officially present it in the FreeBasic forum.

Quote: "In running a general search, it looks like similar DBPro/FreeBASIC projects have been approached in the past, but as to what end I haven't spent that much time researching so not too sure where each project ended up."

Before I started the project, I have also previously searched for similar projects. What I have found was not really finished.

@All:
I need some suggestions, what plugins of PBpro are important. To develop these.
What should I focused. The plugins or the previously mentioned ReleasePacker.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
GreenDixy
15
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 21st Apr 2015 10:37
I tried what you said and cannot get it running

i get



not sure what plugin would be conflicting with it

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 21st Apr 2015 12:03
Have you updated dbpro to U77 RC7?

What code you compile?

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Apr 2015 23:39
Quote: "I need some suggestions, what plugins of PBpro are important."


IanM's Matrix1 utilities.



Powered by Free Banners
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 22nd Apr 2015 04:12
Below is a list of DBPro Addins/DLL files that I use;

- Matrix1 Utilities
- Advanced 2D
- D3DFunc v3.7.1 with U7 Patch
- Advanced Sprites
- Xbox 360 Controller
- EAP156 (Audio & Midi)
- Spark Wrapper
- ImageKitV2
- EZRotate

Now something that we'll need to figure out, is which plugins & commands are more or less made redundant via the use of FreeBASIC? For example, perhaps FreeBASIC already has an XBOX360 controller plugin (although I doubt that this is the case). Then I suspect we'd go with native FreeBASIC plugins rather than interfacing 3rd party DBPro pluggins.

Cheers,
BFM

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 22nd Apr 2015 14:50 Edited at: 22nd Apr 2015 14:54
I have changed the initialization routine. Now you have the option to set the resolution and window properties before the DBPro initialization.
Furthermore, it is now possible to let DBPro run in a client window. This is very useful for application-development.
It would be important to know that if you override the windows handle, the DBPro-input functions no longer work. This is so because you have to intercept windows messages yourself.

Attached a little demo-app with fb-source. A Particle View Application


Have fun

BTW, the gui-design is maked with the buildin gui-editor from FBEdit

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Attachments

Login to view attachments
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 23rd Apr 2015 01:52
FBEdit is driving me nuts. Please, save us Balid!

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 23rd Apr 2015 14:50 Edited at: 23rd Apr 2015 15:43
Ok, i\'ve edit the first post. there you can get the most recent version of this plugin.

Check it out, there are some new thinks in it.
( some Matrix1Util\'s )

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Attachments

Login to view attachments
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 23rd Apr 2015 22:13 Edited at: 23rd Apr 2015 22:16
Wouldn't it just be better to use Dark GDK or AppGameKit?

Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 25th Apr 2015 04:17
Quote: "Wouldn't it just be better to use Dark GDK or AppGameKit?
"


It's a very similar exercise, but my knowledge is quite limited on Dark GDK. In what way do you suspect Dark GDK would be better or worse?

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 27th Apr 2015 11:26 Edited at: 27th Apr 2015 11:28
Quote: "Wouldn't it just be better to use Dark GDK or AppGameKit?"

Quote: "In what way do you suspect Dark GDK would be better or worse?"


I must say that I am an inveterate C/C++ programmer. But the possibilities of FreeBASIC range very close to C or C++. Everyone wants to stay with Basic, I would recommend FreeBASIC.

Why am I doing this project? I've often read the question, for a new version of DBPro. As I see at the moment, will be nothing new in the near future. Herewith I would only give you an alternative.

P.S.
Nothing is impossible. For every problem there is a solution.


At the bottom of this post you can download the Particle-View Application as Standalone-Version (I make it with the first version of my release-packer. For now a comandline-tool).

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Attachments

Login to view attachments
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 1st May 2015 02:24
Quote: "It's a very similar exercise, but my knowledge is quite limited on Dark GDK. In what way do you suspect Dark GDK would be better or worse?"


I thought Dark GDK let you use C# or some .net language to program with.

MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 4th May 2015 12:17
Quote: "I thought Dark GDK let you use C# or some .net language to program with."

No, what you mean is 'DarkGDK .NET'

See first post new package released. Now with the ReleasePacker as commandline tool. Later i will develop a GUI for it .
And a new plugin 'ImageKitV2' with an example.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Attachments

Login to view attachments
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 12th May 2015 13:28
Here is a new download. With some bugfixes and new plugins.

Now included
- SparkWrapper (NEW)
- AdvancedSprites (NEW)
- Advanced2D (NEW)
- D3DFunc (NEW)
- ImageKitV2
- Matrix1Util (2,5,8,9,12,18,19,30,32,33)

with some examples .

Can anyone tell me what the difference between BlitzTerrain-free and BlitzTerrain Commercial is? Are in the free version few features as in the commercial version?

Another question:
What physics engine do you use most? I do not know which one to integrate in the fb-project. DarkPhysix (there I have a license) or FulcrumPhysix (is there a license needed?) Or the new BulletPhsicsWrapper.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Attachments

Login to view attachments
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 16th May 2015 10:20
Thanks Madbit, having a look at this now.

Any further thought to how the actual deliverable game will be, as in, what will have to ship with the final .EXE & media?

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 17th May 2015 23:57
Quick test
DBPro vs FreeBasic
1000 cubes
DBPro 602 fps
FreeBasic - 635 fps

Still FreeBasic is much more easier to learn then C++ when you decide to use DarkGDK
Some questions
1) How to use Multi-Threadin? Is it turne on for default?
2) does FreeBasic support HLSL shader model 3.0? Will it be possible to rewrite Advanced Lighting by Evolved for FreeBasic ?

MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 18th May 2015 09:25
@Kuper
Thank you for testing. Now to your questions...
1) FreeBasic has some commands for multithreading. But I have made no change to the engine. As far as I know, the DBPro engine is not thread save programmed. In principle freebasic subject the same limitations as C / C ++ with DarkGDK.

2) HLSL is dependent on DBPro-Graphic-Engine not from FreeBASIC. So all shader should ran previously on DBPro also run on FB. The graphics engine of DBPro is programmed in DirectX 9.0c. So it should be possible to develop shader to Shader Model 3.0.


@Burning Feet Man
The final content of the exe is approximately the same as in DBPro. All necessary .dll's to start the program. For now, no media files.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Kingius Returns
10
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 18th May 2015 09:33
What are the compile times like? Say for 20,000+ lines of code?
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 18th May 2015 13:13
@Kingius Returns
Sorry, but I do not have such a big project. But after looking at Sourceforge I found a project with approximately 17,800 lines in 12 files.
The build time was just under 3 seconds.

I hope this helps.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Kingius Returns
10
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 18th May 2015 16:39
Very impressive. I've just been checking out Freebasic with your plugin. I really like the lightning quick compile times.

As another poster said, are there any plans to convert Evolved's Advanced Lighting engine? I'm using it in my current project.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 19th May 2015 09:59
I'll see what I can do. At first glance, it should be no problem. But it will take some time, because it is a very large project and I need to translate it line by line.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 19th May 2015 21:49
Sorry, I haven’t been able to test lately. Great job. I have compiled all examples with FreeBasic version 1.02.1-win32 and DBPro version 7.4. I have only a few minor issues. The file LT_InitFunc.bas in the LType2 Demo contains a typo.



The ParticleView Demo issues a duplicated definition error on line 13. Remarking the line out solved this issue. Lastly, the Advanced2D Demo displays a message box on initialization.

Just curious, when you built the libraries did you include the internal functions in the definition files?

Thanks for all your hard work.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 20th May 2015 10:02 Edited at: 20th May 2015 10:04
Quote: "The file LT_InitFunc.bas in the LType2 Demo contains a typo."

I've change the line into ...


Now it is as well as the original. Thank you!


Quote: "The ParticleView Demo issues a duplicated definition error on line 13. Remarking the line out solved this issue."

I had been using FB 1.01. There, this variable was not declared. Now I have updated my compiler and commented this line out. Thank you also for this


Quote: "Lastly, the Advanced2D Demo displays a message box on initialization."

Sorry. That was the debug-version of advanced2d-plugin. fixed in the next release.


Quote: "Just curious, when you built the libraries did you include the internal functions in the definition files?"

Unfortunately not. FB and GCC do not accept the ms function-decorations. So I had all functions wrapped with gcc (codelite) via LoadLibrary and GetProcAddress.
Later I found out, that should be a another way. . what ever.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 21st May 2015 03:47 Edited at: 21st May 2015 03:50
Quote: "I've change the line into ..."




Look closer. That's not the typo I was referring to.

Quote: "Unfortunately not. FB and GCC do not accept the ms function-decorations. So I had all functions wrapped with gcc (codelite) via LoadLibrary and GetProcAddress."


The reason I ask is that it would be great if we could write Freebasic libraries to replace the DBPro Plug-In process. Anyway, there's more then one way to skin a cat. I hope you don't mind, I disassembled the library so I could have a closer look.
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 21st May 2015 05:32
I've used the below method a lot in many of my DBPro projects;



The above changes an object to green.

In translating to FreeBASIC, I can't seem to get a simple solution working. Although the below works OK;



But I'd much prefer to call a simple undeclared hex value/constant than using that command.

How do we work hex values talking in FreeBASIC? I haven't had too much luck in digging through the FB forums/help file (although I've only been looking the past 10 minutes).

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 21st May 2015 06:04
In FreeBasic hex values or written differently, Try this.

Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 21st May 2015 07:07 Edited at: 21st May 2015 07:12
Yup! Just figured it out then >_<... I should always post AFTER my lunch time walk.

The below works for me;



And your slightly shorter method also works too.

EDIT: Posted for reference; ("&B" / "&O" / "&H")



Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st May 2015 19:22
Quote: "Look closer. That's not the typo I was referring to."


I didn't spot that one either.



Powered by Free Banners
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 25th May 2015 00:29
Quote: "Look closer. That's not the typo I was referring to.
"

I do not know what you mean. The line do nothing more than: check if the resolution 1024 x 768 x 32 is available, if yes then set it.


Quote: "The reason I ask is that it would be great if we could write Freebasic libraries to replace the DBPro Plug-In process. Anyway, there's more then one way to skin a cat. I hope you don't mind, I disassembled the library so I could have a closer look. "

Feel free to do it. If you want then i would share a little code.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th May 2015 02:32
Quote: "I do not know what you mean. The line do nothing more than: check if the resolution 1024 x 768 x 32 is available, if yes then set it."


Except that is not what it does.

Read it again and again till you see it. Hint: try looking for an odd number.



Powered by Free Banners

Login to post a reply

Server time is: 2024-04-19 09:06:43
Your offset time is: 2024-04-19 09:06:43