* Display a list of custom maps */
| 4558 | * Display a list of custom maps |
| 4559 | */ |
| 4560 | void cFodder::Custom_ShowMapSelection() { |
| 4561 | // If demo data is loaded, we need to enture a retail release is loaded for the menu draw data |
| 4562 | if (mVersionCurrent->isDemo()) |
| 4563 | VersionSwitch(mVersionDefault); |
| 4564 | |
| 4565 | Image_FadeOut(); |
| 4566 | mGraphics->PaletteSet(); |
| 4567 | |
| 4568 | std::string File = mParams->mSingleMap; |
| 4569 | |
| 4570 | if (!File.size()) { |
| 4571 | auto Maps = g_ResourceMan->GetMaps(); |
| 4572 | File = GUI_Select_File("SELECT MAP", {}, Maps); |
| 4573 | // Exit Pressed? |
| 4574 | if (mGUI_SaveLoadAction == 1 || !File.size()) { |
| 4575 | |
| 4576 | // Return to custom menu |
| 4577 | mDemo_ExitMenu = 1; |
| 4578 | mCustom_Mode = eCustomMode_None; |
| 4579 | |
| 4580 | return; |
| 4581 | } |
| 4582 | } |
| 4583 | |
| 4584 | mGame_Data.mCampaign.LoadCustomMapFromPath(g_ResourceMan->GetMapPath(File)); |
| 4585 | |
| 4586 | mGame_Data.mMission_Phases_Remaining = 1; |
| 4587 | mGame_Data.mMission_Number = 0; |
| 4588 | mGame_Data.mMission_Phase = 0; |
| 4589 | mGame_Data.Phase_Next(); |
| 4590 | |
| 4591 | mDemo_ExitMenu = 1; |
| 4592 | mCustom_ExitMenu = 1; |
| 4593 | mCustom_Mode = eCustomMode_Map; |
| 4594 | } |
| 4595 | |
| 4596 | bool cFodder::Demo_Amiga_ShowMenu() { |
| 4597 | mSound->Music_Stop(); |
nothing calls this directly
no test coverage detected