Ok then here is the complete code listing.
#include "DarkGDK.h"
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetDisplayMode(1920,1080,32);
dbMaximizeWindow();
dbMakeCamera(1);
dbPointCamera(0,0,0);
dbPositionCamera(1,0,80,0);
//dbLoadObject("TempBace.x",1);
//dbLoadObject("DefaltGrassBace.x",2);
//dbLoadImage("TopBar.png",1);
//dbSprite(1,0,0,1);
float CameraX =0.0; //dbCameraPositionX(1);
float CameraY =0.0; //dbCameraPositionY(1);
float CameraZ =0.0; //dbCameraPositionZ(1);
// our main loop
while ( LoopGDK ( ) )
{
//dbPositionObject(1,0,0,0);
//dbControlCameraUsingArrowKeys(1,1,1);
//dbPositionObject(2,0,0,0);
dbXRotateCamera(1,50);
dbMakeMatrix(1,1000,1000,100,100);
dbPositionMatrix(1,-500,-500,20);
dbGhostMatrixOn(1);
if ( dbUpKey())
{
dbPositionCamera(1,CameraX,CameraY,CameraZ);
//CameraZ = dbCameraPositionZ(1);
// CameraY = dbCameraPositionY(1);
CameraX = dbCameraPositionX(1);
CameraZ++;
}
if ( dbDownKey() )
{
dbPositionCamera(1,CameraX,CameraY,CameraZ);
//CameraZ = dbCameraPositionZ(1);
//CameraY = dbCameraPositionY(1);
//CameraX = dbCameraPositionX(1);
CameraZ--;
}
if ( dbLeftKey() )
{
dbMoveCameraLeft(1,1);
//dbPositionCamera(1,CameraX,CameraY,CameraZ);
//CameraX += dbCameraPositionX(1);
//CameraX--;
}
if ( dbRightKey() )
{
dbMoveCameraRight(1,1);
//dbPositionCamera(1,CameraX,CameraY,CameraZ);
CameraX += dbCameraPositionX(1);
//CameraX ++;
}
// update the screen
dbSync();
}
// return back to windows
return;
}
All is revealed with time.