| 18850 | } |
| 18851 | |
| 18852 | void cFodder::Start() { |
| 18853 | |
| 18854 | if (mParams->mShowAbout) { |
| 18855 | About(); |
| 18856 | return; |
| 18857 | } |
| 18858 | |
| 18859 | if (mParams->mDemoPlayback) { |
| 18860 | Demo_Load(); |
| 18861 | mGame_Data.mDemoRecorded.playback(); |
| 18862 | mParams = mGame_Data.mDemoRecorded.mParams; |
| 18863 | mParams->mDefaultPlatform = mStartParams->mDefaultPlatform; |
| 18864 | |
| 18865 | mOpenFodder_Intro_Done = false; |
| 18866 | } |
| 18867 | |
| 18868 | if (mParams->mDemoRecord) |
| 18869 | mGame_Data.mDemoRecorded.clear(); |
| 18870 | |
| 18871 | Start:; |
| 18872 | mGame_Data.mCampaign.Clear(); |
| 18873 | mSound = 0; |
| 18874 | mVersionDefault = 0; |
| 18875 | mVersionCurrent = 0; |
| 18876 | |
| 18877 | VersionSwitch(mVersions->GetRetail( mParams->mDefaultPlatform, mParams->mDefaultGame )); |
| 18878 | |
| 18879 | if (!mVersionCurrent) { |
| 18880 | VersionSwitch(mVersions->GetDemo()); |
| 18881 | |
| 18882 | // This should never happen ,as a check in Prepare ensures atleast 1 ver is available |
| 18883 | if (!mVersionCurrent) |
| 18884 | return; |
| 18885 | } |
| 18886 | |
| 18887 | if (mParams->mDemoRecord && mGame_Data.mDemoRecorded.mRecordedPlatform == ePlatform::Any) |
| 18888 | mGame_Data.mDemoRecorded.mRecordedPlatform = mVersionCurrent->mPlatform; |
| 18889 | |
| 18890 | mGame_Data.mDemoRecorded.save(); |
| 18891 | |
| 18892 | // Play the intro |
| 18893 | Intro_OpenFodder(); |
| 18894 | |
| 18895 | if (mParams->mPlayground) { |
| 18896 | Playground(); |
| 18897 | return; |
| 18898 | } |
| 18899 | |
| 18900 | // Start a random map? |
| 18901 | if (mParams->mRandom || mParams->mSingleMap.size()) { |
| 18902 | |
| 18903 | mGame_Data.mCampaign.SetSingleMapCampaign(); |
| 18904 | mCustom_Mode = eCustomMode_Map; |
| 18905 | |
| 18906 | if(mParams->mRandom) |
| 18907 | VersionSwitch(mVersions->GetForCampaign("Random Map", mParams->mDefaultPlatform)); |
| 18908 | else |
| 18909 | VersionSwitch(mVersions->GetForCampaign("Single Map", mParams->mDefaultPlatform)); |
no test coverage detected