- automatically create autoload section based on IWADINFO.
This has an important implication: Previously the config was loaded before IWADINFO so in order to allow the config to access the data this had to be switched around. This means that zdoom.pk3 will not be looked for in the global IWAD search paths anymore, but since it shouldn't be there to begin with it should be an acceptable compromise.
This commit is contained in:
parent
258822ef3b
commit
dfda74ffe3
7 changed files with 68 additions and 41 deletions
16
src/d_main.h
16
src/d_main.h
|
|
@ -115,15 +115,13 @@ extern FStartupInfo DoomStartupInfo;
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
struct FIWadManager
|
||||
class FIWadManager
|
||||
{
|
||||
private:
|
||||
TArray<FIWADInfo> mIWads;
|
||||
TArray<FString> mIWadNames;
|
||||
TArray<int> mLumpsFound;
|
||||
|
||||
void ParseIWadInfo(const char *fn, const char *data, int datasize);
|
||||
void ParseIWadInfos(const char *fn);
|
||||
void ClearChecks();
|
||||
void CheckLumpName(const char *name);
|
||||
int GetIWadInfo();
|
||||
|
|
@ -131,7 +129,19 @@ private:
|
|||
int CheckIWAD (const char *doomwaddir, WadStuff *wads);
|
||||
int IdentifyVersion (TArray<FString> &wadfiles, const char *iwad, const char *zdoom_wad);
|
||||
public:
|
||||
void ParseIWadInfos(const char *fn);
|
||||
const FIWADInfo *FindIWAD(TArray<FString> &wadfiles, const char *iwad, const char *basewad);
|
||||
const FString *GetAutoname(unsigned int num) const
|
||||
{
|
||||
if (num < mIWads.Size()) return &mIWads[num].Autoname;
|
||||
else return NULL;
|
||||
}
|
||||
int GetIWadFlags(unsigned int num) const
|
||||
{
|
||||
if (num < mIWads.Size()) return mIWads[num].flags;
|
||||
else return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue