mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-15 09:01:24 +00:00
- moved iwadinfo.txt to zd_extra.pk3.
This was done for two reasons: 1. It forces loading of zd_extra.pk3 for the stock IWADs, eliminating a certain kind of user error. 2. It removes the stock IWAD definitions for custom games that distribute the engine along with their data, so that it doesn't pick up on Steam and GOG installations and shows an inappropriate IWAD picker.
This commit is contained in:
parent
2114641cef
commit
7757798d22
4 changed files with 10 additions and 10 deletions
|
@ -247,10 +247,10 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FIWadManager::FIWadManager(const char *fn)
|
||||
FIWadManager::FIWadManager(const char *fn, const char *optfn)
|
||||
{
|
||||
FResourceFile *resfile = FResourceFile::OpenResourceFile(fn, true);
|
||||
if (resfile != NULL)
|
||||
FResourceFile *resfile = FResourceFile::OpenResourceFile(optfn, true);
|
||||
if (resfile != NULL && 0)
|
||||
{
|
||||
uint32_t cnt = resfile->LumpCount();
|
||||
for(int i=cnt-1; i>=0; i--)
|
||||
|
@ -265,10 +265,10 @@ FIWadManager::FIWadManager(const char *fn)
|
|||
}
|
||||
}
|
||||
delete resfile;
|
||||
}
|
||||
if (mIWadNames.Size() == 0 || mIWadInfos.Size() == 0)
|
||||
{
|
||||
I_FatalError("No IWAD definitions found");
|
||||
if (mIWadNames.Size() == 0 || mIWadInfos.Size() == 0)
|
||||
{
|
||||
I_FatalError("No IWAD definitions found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2399,7 +2399,7 @@ void D_DoomMain (void)
|
|||
|
||||
FString optionalwad = BaseFileSearch(OPTIONALWAD, NULL, true);
|
||||
|
||||
iwad_man = new FIWadManager(basewad);
|
||||
iwad_man = new FIWadManager(basewad, optionalwad);
|
||||
|
||||
// Now that we have the IWADINFO, initialize the autoload ini sections.
|
||||
GameConfig->DoAutoloadSetup(iwad_man);
|
||||
|
@ -2429,7 +2429,7 @@ void D_DoomMain (void)
|
|||
|
||||
if (iwad_man == NULL)
|
||||
{
|
||||
iwad_man = new FIWadManager(basewad);
|
||||
iwad_man = new FIWadManager(basewad, optionalwad);
|
||||
}
|
||||
const FIWADInfo *iwad_info = iwad_man->FindIWAD(allwads, iwad, basewad, optionalwad);
|
||||
gameinfo.gametype = iwad_info->gametype;
|
||||
|
|
|
@ -150,7 +150,7 @@ class FIWadManager
|
|||
void AddIWADCandidates(const char *dir);
|
||||
void ValidateIWADs();
|
||||
public:
|
||||
FIWadManager(const char *fn);
|
||||
FIWadManager(const char *fn, const char *fnopt);
|
||||
const FIWADInfo *FindIWAD(TArray<FString> &wadfiles, const char *iwad, const char *basewad, const char *optionalwad);
|
||||
const FString *GetAutoname(unsigned int num) const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue