Hey guys. I am returning back to DarkGDK development after being gone for quite a while and now I have a problem with the most basic code. This code worked fine on my laptop last night, but up here on my desktop PC it will not work. Here is the code:
void DarkGDK (void)
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ();
dbSyncRate (60);
// check for command line options. Options that can be enabled
// include /no-ai and /no-sound.
// CheckCommandLineOptions ();
// make sure we turn off exit on escape key
dbDisableEscapeKey ();
dbMakeObjectBox (10, 100, 100, 100);
dbPositionObject (10, 0, 0, 0);
dbPositionCamera (100, 50, 400);
// our main game loop. all game functionality is within this loop.
while (LoopGDK ())
{
if (dbEscapeKey ()) {
bool exit = false;
for (;;) {
dbText (100, 100, "Please press up arrow for next frame, down arrow to quit.");
dbSync ();
if (dbUpKey ())
break;
if (dbDownKey ()) {
exit = true;
break;
}
}
if (exit)
break;
}
//dbRotateObject (10, 0, 20, 0);
// check for exit condition to display in-game menu
//if (dbEscapeKey ()) {
// break;
//}
// update the screen
dbSync ();
}
dbDeleteObject (10);
// return back to windows at the end of the game. There will be
// a diagnostic screen if enabled on the command line
return;
}
I am starting to work with pause functionality with in-game menus so I was experimenting with for loops as a pause function. The problem is not the for loop or the keys or anything; that is working fine. My problem is that my box will not show up. Again, no problems with object creation on the laptop, but on my desktop the box REFUSES to show up!!! I have tried repositioning the camera, repositioning the box, showing the box, hiding then showing the box, and just about every other thing I can think of. The only difference I can see is that I started this project from the wizard DarkGDK - Game and the other project from DarkGDK - 3D Game. Is it a different linker or compiler option or has the whole world just gone mad?????