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 / One little error after installing DARKGDK

Author
Message
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 2nd Jun 2012 13:12 Edited at: 2nd Jun 2012 13:20
Hello ,

Today I upgraded my pureGDK to DARKGDK.

When I am compiling I have one error in the file "h.Lib-PureGDK.pb"
on the line 469 Structure , Interface or Prototype already declared.

I have put the 2 include files at the top of the source.



Any suggestion?

Thank you
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 2nd Jun 2012 13:38
Quote: "When I am compiling I have one error in the file "h.Lib-PureGDK.pb"
on the line 469 Structure , Interface or Prototype already declared.
"


There's no such file in the DGDK RC. You probably have some old PureGDK includes still referenced somewhere. Double check that.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.60 + DarkGDK 2.0
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 2nd Jun 2012 17:53
After I delete everything and install everything again , it compiled.

But I have other issue.

I think my Enhancements.dll and D3DFunc.dll wasn't loaded , because I cant see any of my graphics and my fonts. (I deleted everything and I re-install them)

I put the header files at the top , but I am missing something.



Also I put the Enhancements dll files

Enhancements.dll
Enhancements.loc
EnhancementsOV.dll

in the folder

C:\Program Files\DarkGDK\engine\plugins-licensed

And the D3DFunc dll file "D3DFunc.dll"

in the folder

C:\Program Files\DarkGDK\engine\plugins-user

Or am I wrong?
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 2nd Jun 2012 18:55
I think , I fixed and this , after copying these files in their directories and recompile the gdkengine.dll the graphics appeared , but another one issue appeared

In the PureGDK version the

ExamineKeyboard()
KeyboardPushed() commands worked , now with the new version of DarkGDK these commands not supported.
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 2nd Jun 2012 19:48
Quote: "In the PureGDK version the
ExamineKeyboard()
KeyboardPushed() commands worked , now with the new version of DarkGDK these commands not supported. "


It has nothing to do with DarkGDK as those are PureBasic keyboard commands (which run on top DX7).

I suggest you use dbKeyState(VirtualKey) to check your key states.

Quote: "after copying these files in their directories and recompile the gdkengine.dll the graphics appeared"


Remember you always need to recompile the GDK engine dll when adding or removing support for any of the plugins.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.60 + DarkGDK 2.0
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 2nd Jun 2012 21:52
Yes this is a problem , in the RC2 version the ExamineKeyboard() function was worked because the dbOpenScreen() not simulates the openscreen() of Purebasic correctly.



The pureGDK didn't have this problem.
The darkGDK generate this problem.

In worst case I will return in my last version of PureGDK.

dbKeyState(VirtualKey) not traps my keys.

For example



None of the above code trapping the keyboard SPACE.

Any example of keyboard trapping to change my code!!!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 2nd Jun 2012 23:58 Edited at: 2nd Jun 2012 23:58
This was an oversight in the documentation which has been corrected.

All of the "VK_" values are constants and must be prefixed with "#" in PureBasic.

Try this:



Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 3rd Jun 2012 00:21
Strange things happen.

Might there is an incompatibility with windows xp and windows 7.
The newer versions are more compatible with windows 7 and less compatible with windows xp.

ExamineKeyboard() is working in windows 7

dbKeyState(#VK_SPACE) working in xp.
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 3rd Jun 2012 00:29 Edited at: 3rd Jun 2012 00:30
ExamineKeyboard() is a PureBasic function. If it is not working in Windows XP then this is a bug to report on the PureBasic forum.

dbKeyState() should work just fine on Windows 7.

Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 3rd Jun 2012 02:47 Edited at: 3rd Jun 2012 02:54
When the program tried to change a resolution or open screen , which darkbasic uses dbopenscreen , and ExamineKeyboard() function was worked only if the openscreen function was called first. But the DarkGDK and PureGDK uses dbopenscreen to simulate the purebasic openscreen and then the ExamineKeyboard() functions worked.

SO...
I changed everything with dbKeyState() to not have incompatibilities with DarkGDK , the old version of PureGDK , there wasn't any problem the ExamineKeyboard() even opening screen and changing resolutions with the last version of PureGDK , before rebranded to DarkGDK.

-----------------

I would like to ask.
The number 5 in keypad , but without numlock activated how is the name of the key.

Because I need to press the 5 key on keypad but is able to be trapped if you have numlock on or off too.

For example in keypad the up arrow is #VK_UP and as number is #VK_NUMPAD8

The #VK_NUMPAD5 as number which key is with numlock off?

If the player have numlock on or off , there will not be a difference.

I am moving my player with arrow keys and with keypad.
But I move the player down with down arrow , #VK_DOWN , #VK_NUMPAD2 , #VK_NUMPAD5 and the middle button in the keypad.

Darkbasic had keyascii to capture all keys.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 3rd Jun 2012 03:18
Quote: "The #VK_NUMPAD5 as number which key is with numlock off?"


#VK_5?

Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 3rd Jun 2012 17:22
Is not the #VK_5 , #VK_5 is the number 5.

In darkbasic there was one function SCANCODE() which used the scancode number of the key and not the name of the key.

For example the middle key from keypad on keyboard

789
456
123

is 76


So if you have numlock on or off the scancode is the same.

I suggest in the next version RC4 to put this function in your keyboard commands of DarkGDK.

I have to say I am very apprecialted for your effort and your hard work you have put in these libraries.

I would like to ask is it possible to add one small dll in your supported libraries?

There is a small dll , which allows you to add one splash image , before the game loads and the game window appears or the game change in fullscreen.

Is it possible to port or add this dll in your supported libraries of your DarkGDK?

The original post was from here:

http://forum.thegamecreators.com/?m=forum_view&t=30420&b=1

The link to download the dll from there was broken so I uploaded here again.

1. init graphics
2. load bitmap "file_name.png", 0
3. sync, if needed
4. load resources, display loading bar, etc.

The few commands of the dll , which needs to be ported in DarkGDK version.

This allows you to load some image before the game window appears
As I remember if you change 0 with 5000 , you will see the splash image for 5 seconds before the game starts.

If you have access to the dll and you can add loading bars on the splash screen it will be great.

Thank you very much and have a nice day.

Attachments

Login to view attachments
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 3rd Jun 2012 18:28
Quote: "There is a small dll , which allows you to add one splash image , before the game loads and the game window appears or the game change in fullscreen."


You're using PureBasic right? Why don't you create a custom code for your splash screen?




Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.60 + DarkGDK 2.0
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 3rd Jun 2012 20:46 Edited at: 3rd Jun 2012 22:27
Yes I am making the game in PureBasic and I am using and DarkGDK libraries.

Your code worked my splash image appeared for 4 seconds , but is not transparent.

I tried to create one png with transparent background but again the image appeared with white background.

I use 255,0,255 as transparent color.

The splashscreen.dll allows you to have transparent image.

How do I port this dll for DarkGDK?

The function of the dll is splash

splash "image.bmp",rgb(255,0,255),2000
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 3rd Jun 2012 22:24
Have you tried searching PureBasic forum for answers? It's all there:

http://www.purebasic.fr/english/viewtopic.php?f=12&t=45555


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.60 + DarkGDK 2.0
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 4th Jun 2012 13:19 Edited at: 4th Jun 2012 13:20
After a lots of trial and error , I made it.

The example above , does the work but needs a lots of tweek to fit in my code , but worked.

If I make more changes , I will able to add and loading bar.
Also support and transparent fonts and texts.

Very nice and thank you very very much.

Login to post a reply

Server time is: 2024-11-19 01:32:46
Your offset time is: 2024-11-19 01:32:46