MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / GameOverCheck

Method GameOverCheck

Source/Fodder.cpp:18956–18986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18954}
18955
18956bool cFodder::GameOverCheck() {
18957
18958 if (!mParams->mUnitTesting) {
18959 // Mission completed?
18960 if (!mPhase_Aborted && !mPhase_TryAgain) {
18961
18962 // Demo / Custom Mission restart
18963 if (mVersionCurrent->isDemo() && mCustom_Mode != eCustomMode_Set && !mVersionCurrent->isAmigaTheOne())
18964 return false;
18965
18966 // Reached last map in this mission set?
18967 if (!mGame_Data.Phase_Next() && !mVersionDefault->isRandom() && mCustom_Mode != eCustomMode_Map) {
18968
18969 mGame_Data.mGameWon = true;
18970 WonGame();
18971 return true;
18972 }
18973
18974 if (mVersionDefault->isRandom()) {
18975 mGame_Data.mMission_Recruitment = -1;
18976 }
18977 }
18978 }
18979
18980 // Double escape aborts out to OF selection, on Amiga the one
18981 if (mPhase_Aborted2 && mVersionCurrent->isAmigaTheOne()) {
18982 return true;
18983 }
18984
18985 return false;
18986}
18987
18988int16 cFodder::Briefing_Show() {
18989

Callers

nothing calls this directly

Calls 4

isDemoMethod · 0.80
isAmigaTheOneMethod · 0.80
Phase_NextMethod · 0.80
isRandomMethod · 0.45

Tested by

no test coverage detected