mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00
Refactoring
This commit is contained in:
parent
fce3ca3b5f
commit
5a2842f89d
14 changed files with 307 additions and 368 deletions
|
@ -402,16 +402,9 @@ bool GameFlow::DoGameflow()
|
|||
SelectedSaveGame = 0;
|
||||
SaveGameHeader header;
|
||||
|
||||
// DEBUG: test
|
||||
/*CurrentLevel = 1;
|
||||
SelectedLevelForNewGame = 0;
|
||||
gfInitialiseGame = true;
|
||||
DoLevel(CurrentLevel, 126, false);
|
||||
|
||||
return true;*/
|
||||
|
||||
// We loop indefinitely, looking for return values of DoTitle or DoLevel
|
||||
bool loadFromSavegame = false;
|
||||
|
||||
while (true)
|
||||
{
|
||||
// First we need to fill some legacy variables in PCTomb5.exe
|
||||
|
@ -457,17 +450,17 @@ bool GameFlow::DoGameflow()
|
|||
|
||||
switch (status)
|
||||
{
|
||||
case GAME_STATUS::GAME_STATUS_EXIT_GAME:
|
||||
case GAME_STATUS_EXIT_GAME:
|
||||
return true;
|
||||
case GAME_STATUS::GAME_STATUS_EXIT_TO_TITLE:
|
||||
case GAME_STATUS_EXIT_TO_TITLE:
|
||||
CurrentLevel = 0;
|
||||
break;
|
||||
case GAME_STATUS::GAME_STATUS_NEW_GAME:
|
||||
case GAME_STATUS_NEW_GAME:
|
||||
CurrentLevel = (SelectedLevelForNewGame != 0 ? SelectedLevelForNewGame : 1);
|
||||
SelectedLevelForNewGame = 0;
|
||||
gfInitialiseGame = true;
|
||||
break;
|
||||
case GAME_STATUS::GAME_STATUS_LOAD_GAME:
|
||||
case GAME_STATUS_LOAD_GAME:
|
||||
// Load the header of the savegame for getting the level to load
|
||||
char fileName[255];
|
||||
ZeroMemory(fileName, 255);
|
||||
|
@ -479,7 +472,7 @@ bool GameFlow::DoGameflow()
|
|||
loadFromSavegame = true;
|
||||
|
||||
break;
|
||||
case GAME_STATUS::GAME_STATUS_LEVEL_COMPLETED:
|
||||
case GAME_STATUS_LEVEL_COMPLETED:
|
||||
if (LevelComplete == Levels.size())
|
||||
{
|
||||
// TODO: final credits
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue