Ok im working on a world builder, and when I run this code, it appears that the file is loading ok since no message box comes up, but no model is showing up on the screen, and when not running in debug mode it freezes and it takes about 5 minutes for task launcher to close it.
Here is my code so far
#include "DarkSDK.h"
#include <string.h>
bool bAppLoop = true;
bool bBuilderLoop = true;
int iCurTerrain = 1;
LPSTR strTerrainAry[12];
void MainMenu();
void WorldBuilder();
void CleanUp();
void DarkSDK (void)
{
strTerrainAry[1] = "3D/Terrain/TerrainA.3ds";
strTerrainAry[2] = "3D/Terrain/TerrainB.3ds";
dbSyncOn();
dbSyncRate(64);
dbSetWindowTitle("World Builder");
dbMaximiseWindow();
dbSetDisplayMode(800,600,32);
dbFlushVideoMemory();
while(bAppLoop == true){
MainMenu();
WorldBuilder();
CleanUp();
}
}
void MainMenu()
{
}
void WorldBuilder()
{
while(bBuilderLoop == true)
{
dbSetCursor(20,20);
dbPrint("Select Terrain");
if(dbObjectExist(iCurTerrain) == 0)
{
dbLoadObject(strTerrainAry[iCurTerrain],iCurTerrain);
if(dbObjectExist(iCurTerrain) == 0)
{
MessageBox(NULL,"Error Loading Object","Error",MB_OK);
}
else
{
dbShowObject(iCurTerrain);
}
}
dbSync();
}
}
void CleanUp()
{
}