Hmm, I don't have any classes that use engine functions in their destructors. Here is the code called on exit.
The game loop:
int LaunchGame(void)
{
InitializeGraphics();
while ( LoopGDK ( ) )
{
dbSync ( );
SwitchBoard();
}
Single_Game_Destroy();
return 0;
}
The game "destructor"
void Single_Game_Destroy()
{
if(!loaded)return;
delete map;
for(int n = 0; n < playerNum; n++)
delete player[n];
for(int n = 0; n < entNum; n++)
delete ent[n];
}
I confess, I only have one week of C++ under my belt, and I am by no means certain that this is the correct way to delete classes in arrays. I made them individually with "new," so I figured that deleting them individually was the right approach.