mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Added startup song definition for custom IWADs
https://forum.zdoom.org/viewtopic.php?t=60314
This commit is contained in:
parent
c8eefd84fa
commit
2ae8b0c093
2 changed files with 8 additions and 0 deletions
|
@ -194,6 +194,12 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
|
|||
iwad->StartupType = FStartupInfo::StrifeStartup;
|
||||
else iwad->StartupType = FStartupInfo::DefaultStartup;
|
||||
}
|
||||
else if (sc.Compare("StartupSong"))
|
||||
{
|
||||
sc.MustGetStringName("=");
|
||||
sc.MustGetString();
|
||||
iwad->Song = sc.String;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.ScriptError("Unknown keyword '%s'", sc.String);
|
||||
|
@ -766,6 +772,7 @@ const FIWADInfo *FIWadManager::FindIWAD(TArray<FString> &wadfiles, const char *i
|
|||
DoomStartupInfo.FgColor = iwad_info->FgColor;
|
||||
}
|
||||
if (DoomStartupInfo.Type == 0) DoomStartupInfo.Type = iwad_info->StartupType;
|
||||
if (DoomStartupInfo.Song.IsEmpty()) DoomStartupInfo.Song = iwad_info->Song;
|
||||
I_SetIWADInfo();
|
||||
return iwad_info;
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ struct FIWADInfo
|
|||
FString Required; // Requires another IWAD
|
||||
uint32_t FgColor = 0; // Foreground color for title banner
|
||||
uint32_t BkColor = 0xc0c0c0; // Background color for title banner
|
||||
FString Song;
|
||||
EGameType gametype = GAME_Doom; // which game are we playing?
|
||||
int StartupType = FStartupInfo::DefaultStartup; // alternate startup type
|
||||
FString MapInfo; // Base mapinfo to load
|
||||
|
|
Loading…
Reference in a new issue