From 08196ff5439830719e9aaf7ada238549a8adf36d Mon Sep 17 00:00:00 2001 From: albertzeyer Date: Thu, 23 Jul 2009 21:34:29 +0000 Subject: [PATCH] further fixes in menu logic git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@124 4df4b0f3-56ce-47cb-b001-ed939b7d65a6 --- src/main.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2b3cc405c..a1620b749 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -195,19 +195,18 @@ int main(int argc, char *argv[]) if(CKP.shutdown == SHUTDOWN_NEW_GAME) { - if(!loadStartMenu(&CKP)) - { - CKP.shutdown = SHUTDOWN_EXIT; - break; - } - else - { - //loadResourcesforGame(pCKP); - if(Game->loadResources(CKP.Control.levelcontrol.episode, CKP.GameData[CKP.Resources.GameSelected-1].DataDirectory)) - CKP.shutdown = SHUTDOWN_RESTART; - else - CKP.shutdown = SHUTDOWN_NEW_GAME; - } + while(!loadStartMenu(&CKP)) + { + g_pLogFile->textOut(PURPLE,"Error! You have chosen a Game that doesn't exist. Please correct the \"games.cfg\" File under \"data\" and choose another game.
"); + //cleanupResources(&CKP); + //return 0; + } + + //loadResourcesforGame(pCKP); + if(Game->loadResources(CKP.Control.levelcontrol.episode, CKP.GameData[CKP.Resources.GameSelected-1].DataDirectory)) + CKP.shutdown = SHUTDOWN_RESTART; + else + CKP.shutdown = SHUTDOWN_NEW_GAME; } } }