- fixed: The WAD manager's hash chains could not handle more than 65535 lumps.
- Reinitializing the WAD manager will now delete all data. - Preparation for GAMEINFO: zdoom.pk3 will be opened separately before checking the IWAD so that the internal GAMEINFOs can be externalized, too. SVN r1494 (trunk)
This commit is contained in:
parent
273e4a946d
commit
81f834e3f4
3 changed files with 23 additions and 11 deletions
|
|
@ -164,6 +164,11 @@ FWadCollection::FWadCollection ()
|
|||
}
|
||||
|
||||
FWadCollection::~FWadCollection ()
|
||||
{
|
||||
DeleteAll();
|
||||
}
|
||||
|
||||
void FWadCollection::DeleteAll ()
|
||||
{
|
||||
if (FirstLumpIndex != NULL)
|
||||
{
|
||||
|
|
@ -193,6 +198,7 @@ FWadCollection::~FWadCollection ()
|
|||
}
|
||||
}
|
||||
LumpInfo.Clear();
|
||||
NumLumps = 0;
|
||||
|
||||
for (DWORD i = 0; i < Wads.Size(); ++i)
|
||||
{
|
||||
|
|
@ -217,10 +223,8 @@ void FWadCollection::InitMultipleFiles (wadlist_t **filenames)
|
|||
int numfiles;
|
||||
|
||||
// open all the files, load headers, and count lumps
|
||||
DeleteAll();
|
||||
numfiles = 0;
|
||||
Wads.Clear();
|
||||
LumpInfo.Clear();
|
||||
NumLumps = 0;
|
||||
|
||||
while (*filenames)
|
||||
{
|
||||
|
|
@ -260,10 +264,10 @@ void FWadCollection::InitMultipleFiles (wadlist_t **filenames)
|
|||
MergeLumps ("HI_START", "HI_END", ns_hires);
|
||||
|
||||
// [RH] Set up hash table
|
||||
FirstLumpIndex = new WORD[NumLumps];
|
||||
NextLumpIndex = new WORD[NumLumps];
|
||||
FirstLumpIndex_FullName = new WORD[NumLumps];
|
||||
NextLumpIndex_FullName = new WORD[NumLumps];
|
||||
FirstLumpIndex = new DWORD[NumLumps];
|
||||
NextLumpIndex = new DWORD[NumLumps];
|
||||
FirstLumpIndex_FullName = new DWORD[NumLumps];
|
||||
NextLumpIndex_FullName = new DWORD[NumLumps];
|
||||
InitHashChains ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue