Hey people
in this moment i still working on Dark GDK 2.0 by myself.
I have completes the Core and Textmodule (to all of Dark Basic Pro),
in my Version it is posible to switch to Fullscreen Mode. I will
include the File Modul an the FTP Module.
dbControlDeviceName fixed (there was no Backvalue).
Here the Code for Fullscreen Mode
void dbSetWindowOff(void );
typedef void ( __cdecl *ProtodbSetWindowOff_0 )( void );
void dbSetWindowOff( void ) {
static ProtodbSetWindowOff_0 Ptr;
if ( !Ptr && !GDKLoadPtr( &Ptr,"DBProSetupDebug.dll","SetWindowModeOff@@YAXXZ" ) )
return;
if ( GDKWaitFunction( ) ) {
Ptr( );
GDKCleanupFunctionCall( );
}
return;
}
Here the necessary changes to the main.cpp
int __stdcall WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
{
HWND hWnd;
// Initialize DarkGDK by telling it where the engine dll is
if ( !initDarkGDK( "gdkengine.dll" ) ) return 1;
// Create a window
if( FULLSCREEN )
{
hWnd = openWindow( 0, 0, GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN ),
"DarkGDK - Game Developer's Toolkit", WS_POPUP, true );
dbSetWindowOff();
}
else
{
hWnd = openWindow( 0, 0, SCR_WIDTH, SCR_HEIGHT, "DarkGDK - Game Developer's Toolkit",
WS_OVERLAPPED | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU |
WS_CLIPCHILDREN, true );
}
// Attach the DarkGDK screen to the window
dbOpenScreen( hWnd, 0, 0, SCR_WIDTH, SCR_HEIGHT );
dbChangeMouse( 1 );
// Show the window
ShowWindow( hWnd, SW_SHOW );
// Limit the fps to 60 so that the example doesn't run too fast
dbSyncRate ( 0 );
// Create a cube
int ObjectCube = dbCreateObjectCube( 3 );
// Variables definitions
float x = 0;
float y = 0;
float z = 0;
double dFrameTime = dbFrameTime( );
do
{
dFrameTime = dbFrameTime( );
// Increment the x, y, and z variables during each loop
x += 29.2f * ( float )( dFrameTime );
y += 29.4f * ( float )( dFrameTime );
z += 29.8f * ( float )( dFrameTime );
dbRotateObject( ObjectCube, dbWrapValue( x ), dbWrapValue( y ), dbWrapValue( z ) );
dbText( 10, 25, dbStr( dbScreenFPS( ) ) );
dbText( 10, 45, dbControlDeviceName( ) );
if ( dbEscapeKey( ) )break;
// Update the screen
dbSync( 0, 0 );
}
while ( windowEvent( ) != WM_CLOSE );
dbDeleteObject( ObjectCube );
dbCloseScreen( );
return 0;
}
dbFrameTime is a Funktion written by myself.