well, i got code from a darkbsic pro forum for moving objects and converted it to GDK but i dont understand what i do with the ".h" file and the "c++" file, so in my project i added these files to the project and did this;
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
#include "objectmove_dba.h"
int __main__ ();
//***** '__main__' ************************************************************
//+**** ========== ************************************************************
int __main__ ()
{
while ( 1 ) {
if ( dbUpKey() == 1 ) {
dbMoveObject( 1, 1 );
}
if ( dbDownKey() == 1 ) {
dbMoveObject( 1, -1 );
}
if ( dbLeftKey() == 1 ) {
dbMoveObjectLeft( 1, 1 );
}
if ( dbRightKey() == 1 ) {
dbMoveObjectRight( 1, 1 );
}
if ( dbKeyState( 16 ) == 1 ) {
dbMoveObjectUp( 1, 1 );
}
if ( dbKeyState( 44 ) == 1 ) {
dbMoveObjectDown( 1, 1 );
}
}
}
void DarkGDK ( void )
{
// go fullscreen
dbSetWindowLayout(0, 0, 0);
dbMaximizeWindow();
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbPrint ( "loading..." );
dbSync ( );
dbSync ( );
dbSetCameraRange ( 1.0f, 30000.0f );
// load a model for our sky
dbLoadObject ( "cty.x", 2 );
dbSetObjectLight ( 2, 0 );
dbSetObjectTexture ( 2, 3, 2 );
dbScaleObject ( 2, 30000, 30000, 30000 );
dbPositionObject (2, 3000,3000,3000);
// Load AK_47
dbLoadObject ("ak.x", 1 );
dbPositionObject (1, 3000,3000,2000 );
// position the camera
dbPositionCamera (3000,3000,1980);
// camera variables
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
}
// return back to windows
return;
}
but it comes up as i have one error, what is it??? please help