mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- add Group feature to handle Autoload-groups
This commit is contained in:
parent
b47cb9027a
commit
5973568bd2
3 changed files with 19 additions and 4 deletions
|
@ -137,6 +137,12 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize)
|
|||
sc.MustGetString();
|
||||
iwad->Autoname = sc.String;
|
||||
}
|
||||
else if (sc.Compare("Group"))
|
||||
{
|
||||
sc.MustGetStringName("=");
|
||||
sc.MustGetString();
|
||||
iwad->Group = sc.String;
|
||||
}
|
||||
else if (sc.Compare("Config"))
|
||||
{
|
||||
sc.MustGetStringName("=");
|
||||
|
|
|
@ -1989,7 +1989,7 @@ static void D_DoomInit()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
static void AddAutoloadFiles(const char *gamesection)
|
||||
static void AddAutoloadFiles(const char *group, const char *autoname)
|
||||
{
|
||||
if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload"))
|
||||
{
|
||||
|
@ -2026,10 +2026,18 @@ static void AddAutoloadFiles(const char *gamesection)
|
|||
file += ".Autoload";
|
||||
D_AddConfigWads (allwads, file);
|
||||
|
||||
// Add group-specific wads
|
||||
if (group != NULL)
|
||||
{
|
||||
file = group;
|
||||
file += ".Autoload";
|
||||
D_AddConfigWads(allwads, file);
|
||||
}
|
||||
|
||||
// Add IWAD-specific wads
|
||||
if (gamesection != NULL)
|
||||
if (autoname != NULL)
|
||||
{
|
||||
file = gamesection;
|
||||
file = autoname;
|
||||
file += ".Autoload";
|
||||
D_AddConfigWads(allwads, file);
|
||||
}
|
||||
|
@ -2262,7 +2270,7 @@ void D_DoomMain (void)
|
|||
FBaseCVar::DisableCallbacks();
|
||||
GameConfig->DoGameSetup (gameinfo.ConfigName);
|
||||
|
||||
AddAutoloadFiles(iwad_info->Autoname);
|
||||
AddAutoloadFiles(iwad_info->Group, iwad_info->Autoname);
|
||||
|
||||
// Run automatically executed files
|
||||
execFiles = new DArgs;
|
||||
|
|
|
@ -75,6 +75,7 @@ struct FIWADInfo
|
|||
{
|
||||
FString Name; // Title banner text for this IWAD
|
||||
FString Autoname; // Name of autoload ini section for this IWAD
|
||||
FString Group; // Groupname for this IWAD
|
||||
FString Configname; // Name of config section for this IWAD
|
||||
FString Required; // Requires another IWAD
|
||||
DWORD FgColor; // Foreground color for title banner
|
||||
|
|
Loading…
Reference in a new issue