We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dc1e32 commit 2eccdb2Copy full SHA for 2eccdb2
5 files changed
Source/Fodder.cpp
@@ -3832,7 +3832,12 @@ void cFodder::Campaign_Selection() {
3832
3833
// Single Map Mode?
3834
if (CampaignFile == "Single Map" || CampaignFile == "Random Map") {
3835
-
+
3836
+ if (CampaignFile == "Random Map") {
3837
+ mStartParams->mSkipRecruit = false;
3838
+ mParams->mSkipRecruit = false;
3839
+ }
3840
3841
mGame_Data.mCampaign.SetSingleMapCampaign();
3842
mCustom_Mode = eCustomMode_Map;
3843
return;
@@ -18243,6 +18248,8 @@ void cFodder::About() {
18243
18248
}
18244
18249
18245
18250
void cFodder::CreateRandom(sMapParams pParams) {
18251
+ mSurface->clearBuffer();
18252
18246
18253
mGame_Data.mCampaign.CreateCustomCampaign();
18247
18254
mGame_Data.mCampaign.setRandom(true);
18255
mGame_Data.mCampaign.setName("Random");
@@ -18400,14 +18407,18 @@ bool cFodder::GameOverCheck() {
18400
18407
// Demo / Custom Mission restart
18401
18408
if (mVersionCurrent->isDemo() && mCustom_Mode != eCustomMode_Set && !mVersionCurrent->isAmigaTheOne())
18402
18409
return false;
18403
18410
18404
18411
// Reached last map in this mission set?
18405
- if (!mGame_Data.Phase_Next()) {
18412
+ if (!mGame_Data.Phase_Next() && !mVersionDefault->isRandom() && mCustom_Mode != eCustomMode_Map) {
18406
18413
18414
mGame_Data.mGameWon = true;
18415
WonGame();
18416
return true;
18417
18418
18419
+ if (mVersionDefault->isRandom()) {
18420
+ mGame_Data.mMission_Recruitment = -1;
18421
18422
18423
18424
Source/Parameters.cpp
@@ -265,10 +265,10 @@ bool sFodderParameters::ProcessCLI(int argc, char *argv[]) {
265
266
mDisableSound = result["nosound"].as<bool>();
267
mPlayground = result["playground"].as<bool>();
268
269
mSleepDelta = result["sleep-delta"].as<uint32_t>();
270
271
- mCheatsEnabled = result["cheats"].as<bool>();
+ if (result.count("cheats"))
+ mCheatsEnabled = result["cheats"].as<bool>();
272
273
if(result.count("rows"))
274
mWindowRows = result["rows"].as<std::uint32_t>();
Source/Recruits.cpp
@@ -1163,7 +1163,7 @@ int16 cFodder::Recruit_Show() {
1163
1164
1165
else {
1166
- if (mVersionCurrent->mName == "Random Map") {
+ if (mVersionDefault->mName == "Random Map") {
1167
sMapParams Params(mRandom.get());
1168
CreateRandom(Params);
1169
mGame_Data.mMission_Recruitment = 0;
@@ -1185,7 +1185,7 @@ int16 cFodder::Recruit_Show() {
1185
mSound->Music_Play(0);
1186
1187
// Retail / Custom set show the Recruitment Hill
1188
- if (mVersionCurrent->isRetail() || mVersionCurrent->isPCFormat() || mCustom_Mode == eCustomMode_Set) {
+ if (mVersionCurrent->isRetail() || mVersionCurrent->isPCFormat() || mVersionCurrent->isRandom() || mCustom_Mode == eCustomMode_Set) {
1189
1190
// Recruit Screen
1191
if (Recruit_Loop())
Source/Version.hpp
@@ -36,7 +36,8 @@ enum eRelease {
36
AmigaNotVeryFestive,
37
AmigaAlienLevels,
38
39
- Custom
+ Custom,
40
+ eRandom
41
};
42
43
enum eGame {
@@ -117,7 +118,11 @@ struct sVersion {
117
118
119
120
bool isCustom() const {
- return mRelease == eRelease::Custom;
121
+ return mRelease == eRelease::Custom || isRandom();
122
123
124
+ bool isRandom() const {
125
+ return mRelease == eRelease::eRandom;
126
127
128
bool isRetail() const {
Source/Versions.cpp
@@ -112,10 +112,10 @@ const sGameVersion KnownGameVersions[] = {
112
{ "Single Map", eGame::CF2, ePlatform::Amiga, eRelease::Custom, "Custom", { } },
113
{ "Single Map", eGame::CF2, ePlatform::PC, eRelease::Custom, "Custom", { } },
114
115
- { "Random Map", eGame::CF1, ePlatform::Amiga, eRelease::Custom, "Custom", { } },
116
- { "Random Map", eGame::CF1, ePlatform::PC, eRelease::Custom, "Custom", { } },
- { "Random Map", eGame::CF2, ePlatform::Amiga, eRelease::Custom, "Custom", { } },
- { "Random Map", eGame::CF2, ePlatform::PC, eRelease::Custom, "Custom", { } },
+ { "Random Map", eGame::CF1, ePlatform::Amiga, eRelease::eRandom, "Custom", { } },
+ { "Random Map", eGame::CF1, ePlatform::PC, eRelease::eRandom, "Custom", { } },
+ { "Random Map", eGame::CF2, ePlatform::Amiga, eRelease::eRandom, "Custom", { } },
+ { "Random Map", eGame::CF2, ePlatform::PC, eRelease::eRandom, "Custom", { } },
0 commit comments