Fixed start menu bug for unreachable entries. Fixed string problems with CLogFile under hq_sound.cpp
git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@122 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
15
src/menu.cpp
15
src/menu.cpp
@@ -144,10 +144,11 @@ short loadResourcesforStartMenu(stCloneKeenPlus *pCKP, CGame *Game)
|
||||
#define MAINMENU_GOTO_DEMO_TIME 4000
|
||||
|
||||
extern char fade_black;
|
||||
short loadStartMenu(stCloneKeenPlus *pCKP)
|
||||
bool loadStartMenu(stCloneKeenPlus *pCKP)
|
||||
{
|
||||
CDialog *GamesMenu;
|
||||
int i;
|
||||
bool ret;
|
||||
|
||||
fade.mode = FADE_GO;
|
||||
fade.rate = FADE_NORM;
|
||||
@@ -194,8 +195,14 @@ short loadStartMenu(stCloneKeenPlus *pCKP)
|
||||
fade.fadetimer = 0;
|
||||
fade.rate = FADE_NORM;
|
||||
fade.mode = FADE_GO;
|
||||
pCKP->Resources.GameSelected = GamesMenu->getSelection()+1;
|
||||
pCKP->Control.levelcontrol.episode = pCKP->GameData[pCKP->Resources.GameSelected-1].Episode;
|
||||
|
||||
if( GamesMenu->getSelection()+1 < pCKP->numGames )
|
||||
{
|
||||
ret = true;
|
||||
pCKP->Resources.GameSelected = GamesMenu->getSelection()+1;
|
||||
pCKP->Control.levelcontrol.episode = pCKP->GameData[pCKP->Resources.GameSelected-1].Episode;
|
||||
}
|
||||
else ret = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -208,7 +215,7 @@ short loadStartMenu(stCloneKeenPlus *pCKP)
|
||||
|
||||
delete GamesMenu;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mainmenu(stCloneKeenPlus *pCKP,int defaultopt)
|
||||
|
||||
Reference in New Issue
Block a user