This might get you started
// 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 Sphere1 = 1;
int Sphere2 = 2;
int Box1 = 3;
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbMakeObjectSphere (Sphere1,10,10,10);
dbMakeObjectSphere (Sphere2,10,3,3);
dbMakeObjectBox (Box1, 2,2,2);
dbPositionObject (Sphere1, 0,0,0);
dbPositionObject (Sphere2, 0,0,0);
dbPositionObject (Box1, 0,16,0);
dbGlueObjectToLimb( Box1,Sphere2,0);
dbPositionCamera (0, 25,50,-50);
dbPointCamera (0,0,0,0);
// our main loop
while ( LoopGDK ( ) )
{
if (dbUpKey()) {
dbYRotateObject( Sphere2, dbObjectAngleY(Sphere2)+1);
}
if (dbDownKey()) {
dbYRotateObject( Sphere2, dbObjectAngleY(Sphere2)-1);
}
if (dbLeftKey()) {
dbXRotateObject( Sphere2, dbObjectAngleX(Sphere2)+1);
}
if (dbRightKey()) {
dbXRotateObject( Sphere2, dbObjectAngleX(Sphere2)-1);
}
// update the screen
dbSync ( );
}
// return back to windows
return;
}
Use the arrow keys to rotate
Codger
System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem