Hi all,
I am coming to the end of my project at university making a flying game using dark GDK and I am having some problems.
I have developed a menu system which includes a main menu, level selection menu and options menu.
This is all controlled using two enumerators. The first of these contains 4 levels, they are:
mainMenu,
optionsMenu,
levelSelectionMenu,
inGame;
The second is an enumerator with only 2 points, which is used to say which level the game is in, they are:
noLevel,
level1;
I should probably now explain that the second enumerator is called several times for each set of objects, (due to the nature of my classes). So that looks like this:
enum gameMode { titleMenu,
gameMenu,
levelSelectionMenu,
inGame };
enum levelSelection { noLevel,
level1 };
gameMode g_gameMode = titleMenu;
levelSelection g_levelSelection = noLevel;
levelSelection g_levelUpdater = noLevel;
levelSelection g_friendlyObjects = noLevel;
levelSelection g_enemyObjects = noLevel;
levelSelection g_neutralObjects = noLevel;
If I manually change each of these:
gameMode g_gameMode = titleMenu;
levelSelection g_levelSelection = noLevel;
levelSelection g_levelUpdater = noLevel;
levelSelection g_friendlyObjects = noLevel;
levelSelection g_enemyObjects = noLevel;
levelSelection g_neutralObjects = noLevel;
to this:
gameMode g_gameMode = inGame;
levelSelection g_levelSelection = level1;
levelSelection g_levelUpdater = level1;
levelSelection g_friendlyObjects = level1;
levelSelection g_enemyObjects = level1;
levelSelection g_neutralObjects = level1;
all of the objects load perfectly and the game works, however when it runs through the menu system to the same point, no objects load, I just get a blue screen but my timer and fuel usage work perfectly.
I have tested that the enumerators are hitting the right point by putting floats in that change value depending on the points and they hit the right point when they are supposed to.
I cant understand why my objects wont load, if anyone has any ideas of things I can check, please dont hesitate to reply.
I would post more code but I have nearly twenty classes and everything is all intertwined.
Regards