I made a menu in the game I'm making that sets the variable gameInitiated to 1. When it is set to 1 I have the main loop call the function that loads my objects. My problem is that during this time the objects are loading it's like the game is frozen, I'm basically stuck at the menu screen and once it is done loading the game starts, so I wanted to put an image in for the background during the time it is loading. It seems to ignore it though and goes straight to the object loading function and the menu remains and goes straight to the game play. It only seems to work properly when I take the modelCall() out. Can anyone help me out or guide me in a better direction for doing something like this?
while ( LoopGDK ( ) )
{
if(gameInitiated == 0)
{
menu(); //clicking play game in the main menu sets gameInitiated to 1
mainMenuSound();
if (gameInitiated == 1)
{
dbSprite(57,0,0,57); //Loading screen
modelCall(); //Loads my objects
dbHideSprite(57); //Removes my loading screen
}
}
//main gameplay function calls
gameSound();
controls();
dbSync();
}
return;
}