i can't seem to use any of the following:
if dbRightKey ()=1 then dbYRotateObject ( 10,1);
if dbLeftKey ()=1 then dbYRotateObject ( 10,-1);
if dbUpKey ()=1 then dbMoveObject ( 10,-1);
if dbDownKey ()=1 then dbMoveObject up ( 10,+1);
the compiler complains that the syntax is wrong:
1>e:\all projects\project shelter\8 game code\shelter\shelter\main.cpp(12) : error C2061: syntax error : identifier 'dbRightKey'
1>e:\all projects\project shelter\8 game code\shelter\shelter\main.cpp(13) : error C2061: syntax error : identifier 'dbLeftKey'
1>e:\all projects\project shelter\8 game code\shelter\shelter\main.cpp(14) : error C2061: syntax error : identifier 'dbUpKey'
1>e:\all projects\project shelter\8 game code\shelter\shelter\main.cpp(15) : error C2061: syntax error : identifier 'dbDownKey'
here is my complete code:
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbMakeCamera (0);
dbAutoCamOff ();
// controls
if dbRightKey ()=1 then dbYRotateObject ( 10,1);
if dbLeftKey ()=1 then dbYRotateObject ( 10,-1);
if dbUpKey ()=1 then dbMoveObject ( 10,-1);
if dbDownKey ()=1 then dbMoveObject up ( 10,+1);
//camera position
dbPositionCamera (25,25,25);
dbSetCameraRange (1,1000);
dbPitchCameraDown (75);
dbSetCameraFOV (70);
// load terrain
dbLoadObject ("terrain.x",10);
dbScaleObject (10,200,200,200);
dbSetObjectCull (10,0);
dbScaleObjectTexture (10,100,100);
dbSetObjectSpecular ( 10, 0 );
//load sky
dbMakeObjectSphere (11,200);
dbSetObjectCull (11,0);
dbColorObject (11,dbRGB(186,169,103));
dbSetObjectEmissive (11,dbRGB(186,169,103));
//load watchtower object
dbLoadObject ("watchtower.x",12);
dbScaleObject (12,400,400,400);
dbSetObjectCull (12,0);
dbPositionObject (12,0,0,0);
dbSetObjectCull (12,0);
dbSetObjectSpecular ( 12, 0 );
while ( LoopGDK ( ) )
{
//main loop
// create lights and shadows
dbMakeLight(30);
dbSetPointLight (30,50,50,50);
dbColorLight (30,dbRGB(186,169,103));
dbPointLight (30,0,0,0);
dbSetNormalizationOn ();
//dbSetGlobalShadowsOn();
dbSetShadowShadingOn ( 12 );
//disable the backdrop
dbBackdropOff ();
dbSync ( );
}
}