the 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"
int fCameraAngleX;
int fCameraAngleY;
// the main entry point for the application is this function
void mouse( void )
void DarkGDK ( void )
{
dbAutoCamOff();
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbLoadObject ("H-AK47-Static.x",1);
dbLoadObject ("Assault Trooper.x",2);
dbPositionObject(2,10,0,10);
dbRotateObject (2,-90,0,0);
dbRotateObject (1,0,0,0);
dbPositionObject (1,2,-2,6);
dbLockObjectOn (1);
dbScaleObject ( 1, 1500, 1500, 1500 );
dbScaleObject ( 2, 15, 15, 15 );
dbAutomaticCameraCollision (0,2,2);
dbSetObjectCollisionToPolygons (2);
// our main loop
while ( LoopGDK ( ) )
mouse( );
dbMakeMatrix (4,100,100,10,10);
// update the screen
dbSync ( );
}
}void mouse(void)
{
if (dbUpKey())
{
dbMoveCamera(2);
}
if (dbDownKey())
{
dbMoveCamera(-2);
}
if (dbLeftKey())
{
dbYRotateCamera ( 0 , dbCameraAngleY( 0 ) - 90 );
dbMoveCamera(2);
}
if (dbRightKey())
{
dbYRotateCamera ( 0 , dbCameraAngleY( 0 ) + 90 );
dbMoveCamera(2);
}
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.2f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.2f );
// rotate camera
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
}
// return back to windows
}return;
the errors
1>------ Build started: Project: Dark GDK - Game12, Configuration: Debug Win32 ------
1>Compiling...
1>Main.cpp
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(13) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(40) : error C2059: syntax error : '}'
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(40) : error C2143: syntax error : missing ';' before '}'
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(40) : error C2059: syntax error : '}'
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(41) : error C2143: syntax error : missing ';' before '{'
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(41) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(70) : error C2059: syntax error : '}'
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(70) : error C2143: syntax error : missing ';' before '}'
1>c:\users\dubeau family\documents\visual studio 2008\projects\dark gdk - game12\dark gdk - game12\main.cpp(70) : error C2059: syntax error : '}'
1>Build log was saved at "file://c:\Users\Dubeau Family\Documents\Visual Studio 2008\Projects\Dark GDK - Game12\Dark GDK - Game12\Debug\BuildLog.htm"
1>Dark GDK - Game12 - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========