Mercurial > mm7
comparison mm7_2.cpp @ 978:9334a8c59c8d
uGameState
author | Ritor1 |
---|---|
date | Thu, 09 May 2013 02:26:04 +0600 |
parents | c8a0f6d89c70 |
children | 08fd1436ef35 |
comparison
equal
deleted
inserted
replaced
977:ac85898f5903 | 978:9334a8c59c8d |
---|---|
9462 | 9462 |
9463 Log::Warning(L"MM: entering main loop"); | 9463 Log::Warning(L"MM: entering main loop"); |
9464 while ( 1 ) | 9464 while ( 1 ) |
9465 { | 9465 { |
9466 MainMenu_Loop(); | 9466 MainMenu_Loop(); |
9467 uGameState = 0; | 9467 uGameState = GAME_STATE_0; |
9468 //LABEL_21: | 9468 //LABEL_21: |
9469 while ( 1 ) | 9469 while ( 1 ) |
9470 { | 9470 { |
9471 switch (uGameState) | 9471 switch (uGameState) |
9472 { | 9472 { |
9500 SaveNewGame(); | 9500 SaveNewGame(); |
9501 pGame->Loop(); | 9501 pGame->Loop(); |
9502 if ( uGameState == GAME_STATE_NEWGAME_OUT_GAMEMENU ) | 9502 if ( uGameState == GAME_STATE_NEWGAME_OUT_GAMEMENU ) |
9503 { | 9503 { |
9504 SetCurrentMenuID(MENU_NEWGAME); | 9504 SetCurrentMenuID(MENU_NEWGAME); |
9505 uGameState = 0; | 9505 uGameState = GAME_STATE_0; |
9506 continue; | 9506 continue; |
9507 } | 9507 } |
9508 break; | 9508 break; |
9509 } | 9509 } |
9510 if (GetCurrentMenuID() == MENU_CREDITS) | 9510 if (GetCurrentMenuID() == MENU_CREDITS) |
9515 CreditsMenu__Loop(); | 9515 CreditsMenu__Loop(); |
9516 break; | 9516 break; |
9517 } | 9517 } |
9518 if (GetCurrentMenuID() == MENU_5 || GetCurrentMenuID() == MENU_LoadingProcInMainMenu) | 9518 if (GetCurrentMenuID() == MENU_5 || GetCurrentMenuID() == MENU_LoadingProcInMainMenu) |
9519 { | 9519 { |
9520 uGameState = 0; | 9520 uGameState = GAME_STATE_0; |
9521 } | 9521 } |
9522 else | 9522 else |
9523 { | 9523 { |
9524 if (GetCurrentMenuID() != MENU_10) | 9524 if (GetCurrentMenuID() != MENU_10) |
9525 goto LABEL_49; | 9525 goto LABEL_49; |
9550 pAsyncKeyboard->Resume(); | 9550 pAsyncKeyboard->Resume(); |
9551 } | 9551 } |
9552 //LABEL_48: | 9552 //LABEL_48: |
9553 pGame->Loop(); | 9553 pGame->Loop(); |
9554 LABEL_49: | 9554 LABEL_49: |
9555 if ( uGameState == 3 ) | 9555 if ( uGameState == GAME_STATE_3 ) |
9556 { | 9556 { |
9557 v12 = 5; | 9557 v12 = 5; |
9558 SetCurrentMenuID((MENU_STATE)v12); | 9558 SetCurrentMenuID((MENU_STATE)v12); |
9559 //goto LABEL_21; | 9559 //goto LABEL_21; |
9560 uGameState = 0; | 9560 uGameState = GAME_STATE_0; |
9561 continue; | 9561 continue; |
9562 } | 9562 } |
9563 if ( uGameState == GAME_STATE_NEWGAME_OUT_GAMEMENU ) | 9563 if ( uGameState == GAME_STATE_NEWGAME_OUT_GAMEMENU ) |
9564 { | 9564 { |
9565 SetCurrentMenuID(MENU_NEWGAME); | 9565 SetCurrentMenuID(MENU_NEWGAME); |
9566 uGameState = 0; | 9566 uGameState = GAME_STATE_0; |
9567 continue; | 9567 continue; |
9568 } | 9568 } |
9569 if ( uGameState == GAME_STATE_GAME_QUITTING_TO_MAIN_MENU)// from the loaded game | 9569 if ( uGameState == GAME_STATE_GAME_QUITTING_TO_MAIN_MENU)// from the loaded game |
9570 { | 9570 { |
9571 pAudioPlayer->StopChannels(-1, -1); | 9571 pAudioPlayer->StopChannels(-1, -1); |
9572 uGameState = 0; | 9572 uGameState = GAME_STATE_0; |
9573 break; | 9573 break; |
9574 } | 9574 } |
9575 } | 9575 } |
9576 if (!bNoSound && pAudioPlayer->hAILRedbook) | 9576 if (!bNoSound && pAudioPlayer->hAILRedbook) |
9577 { | 9577 { |