Hi,
I'm new on this Forum. But i have some expirience with C++ & DarkGDK. I come from germany and my english is not the best. I hope you guys understand me.
Sorry for it. What else.
I have write for a few month a Console for DarkGDK and release it in the german GDK-Forum. And now i think it is time to release it here and hope you guys can do anything with it.
Her you can download (include/lib/example Prog and Dokumentation sorry is in German but the Commands are self-explanantory).
GDK-Console (Megaupload)
Her is the Example Code:
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
#include "mbconsole.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
bool bPress = false;
char *pEntry;
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetWindowOff();
dbDisableEscapeKey();
dbMakeObjectCube(1, 10);
mbConsoleInit(0, 0, "Courier New", 14, 12);
mbConsoleThrowLine("Console ist Initialisiert.");
mbConsoleThrowLine("");
mbPositionConsole((dbScreenWidth() - mbConsoleWidth()) / 2, dbScreenHeight() - mbConsoleHeight());
mbConsoleThrowLine("Console erhaelt neue Position, mittig am unteren Bildschirmrand.");
mbConsoleThrowLine("");
mbShowConsole();
mbConsoleThrowLine("Console wird dargestellt.");
mbSetConsoleFocusOn();
mbConsoleThrowLine("Console erhaelt Fokus.");
mbConsoleThrowLine("");
mbConsoleThrowLine("Erwarte Eingabe:");
mbConsoleThrowLine("F1 - schaltet Console an und aus.");
mbConsoleThrowLine("\"EXIT\" - beendet das Programm.");
mbConsoleThrowLine("");
// our main loop
while(LoopGDK())
{
dbTurnObjectLeft(1, 0.1f);
dbPitchObjectUp(1, 0.1f);
dbRollObjectLeft(1, 0.1f);
if(dbKeyState(0x3b) && !bPress) { // Taste F1
if(mbConsoleShown()){
mbHideConsole();
mbSetConsoleFocusOff();
mbConsoleThrowLine("Console AUS geschaltet.");
} else {
mbShowConsole();
mbSetConsoleFocusOn();
mbConsoleThrowLine("Console EIN geschaltet.");
};
bPress = true;
};
if(mbConsoleHasNewEntry()) {
pEntry = mbConsoleQueryEntry();
if(strcmp(pEntry, "EXIT") == 0)
break;
};
if(!dbScanCode())
bPress = false;
mbUpdateConsole();
// update the screen
dbSync ( );
}
mbTerminateConsole();
// return back to windows
return;
}
And at last but not least a screenshot.
With Computers you can solve Problems that you have never befor.
My English is so BAD ;(