mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 08:51:08 +00:00
- use the volumes to find the starting maps for the menu and the clusters for the cutscenes.
This commit is contained in:
parent
825963661b
commit
93bfc35ad6
14 changed files with 51 additions and 78 deletions
|
@ -83,8 +83,31 @@ bool help_disabled;
|
|||
FNewGameStartup NewGameStartupInfo;
|
||||
|
||||
|
||||
|
||||
//FNewGameStartup NewGameStartupInfo;
|
||||
|
||||
static bool DoStartGame(FNewGameStartup& gs)
|
||||
{
|
||||
auto vol = FindVolume(gs.Episode);
|
||||
if (!vol) return false;
|
||||
|
||||
if (isShareware() && (vol->flags & VF_SHAREWARELOCK))
|
||||
{
|
||||
M_StartMessage(GStrings("SHAREWARELOCK"), 1, NAME_None);
|
||||
return false;
|
||||
}
|
||||
|
||||
auto map = FindMapByName(vol->startmap);
|
||||
if (!map) return false;
|
||||
soundEngine->StopAllChannels();
|
||||
|
||||
gi->StartGame(gs); // play game specific effects (like Duke/RR/SW's voice lines when starting a game.)
|
||||
|
||||
DeferedStartGame(map, gs.Skill);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool M_SetSpecialMenu(FName& menu, int param)
|
||||
{
|
||||
|
@ -115,14 +138,14 @@ bool M_SetSpecialMenu(FName& menu, int param)
|
|||
|
||||
case NAME_Startgame:
|
||||
case NAME_StartgameNoSkill:
|
||||
menu = NAME_Startgame;
|
||||
NewGameStartupInfo.Skill = param;
|
||||
if (menu == NAME_StartgameNoSkill)
|
||||
{
|
||||
menu = NAME_Startgame;
|
||||
NewGameStartupInfo.Episode = param;
|
||||
NewGameStartupInfo.Skill = 1;
|
||||
}
|
||||
if (gi->StartGame(NewGameStartupInfo))
|
||||
if (DoStartGame(NewGameStartupInfo))
|
||||
{
|
||||
M_ClearMenus();
|
||||
int ep = NewGameStartupInfo.Episode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue