I created a level in FPSC and successfully loaded it into DBPro. I load the universe.dbo file as such:
load static objects "levelbank\testlevel\universe.dbo", 0
Now then, I try to do the same thing in DarkGDK but the program launches then crashes. Here is the code:
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 120 fps
int checkFile = 0;
dbSyncOn ( );
dbSyncRate ( 120 );
checkFile = dbFileExist(".\\Files\\level1\\universe.dbo");
dbPrint(static_cast<double>(checkFile));
dbLoadStaticObjects(".\\Files\\level1\\universe.dbo", 0);
dbPositionCamera(1750, 250, -3950);
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbControlCameraUsingArrowKeys(0,1,2);
dbSync();
}
// return back to windows
return;
}
This is just a test program to see if I can actually load a level. The Print statement just outputs a 1 in the upper right corner so I know the file is found.
I changed the dbLoadStaticObjects() to dbLoadObject() and it worked, although it didn't load anything other than the bare segments used to create the room (plain grey walls). I looked and looked for more information on dbLoadStaticObjects() but no luck so far.
Can anyone shed some light here?
MFC Coder