- fixed: The newly altered WAD code could not load embedded WADs anymore.

SVN r1785 (trunk)
This commit is contained in:
Christoph Oelckers 2009-09-02 20:29:52 +00:00
parent c24c31cc9f
commit 1d582a7550
2 changed files with 27 additions and 21 deletions

View file

@ -1,4 +1,7 @@
September 1, 2009 September 2, 2009 (Changes by Graf Zahl)
- fixed: The newly altered WAD code could not load embedded WADs anymore.
September 1, 2009
- Added directory detection to the -file parameter. This obsoletes -dir, so - Added directory detection to the -file parameter. This obsoletes -dir, so
that parameter is now gone. that parameter is now gone.
- Removed automatic ".wad" appending from FWadCollection::InitMultipleFiles() - Removed automatic ".wad" appending from FWadCollection::InitMultipleFiles()

View file

@ -225,8 +225,10 @@ int FWadCollection::AddExternalFile(const char *filename)
void FWadCollection::AddFile (const char *filename, FileReader *wadinfo) void FWadCollection::AddFile (const char *filename, FileReader *wadinfo)
{ {
int startlump; int startlump;
bool isdir; bool isdir = false;
if (wadinfo == NULL)
{
// Does this exist? If so, is it a directory? // Does this exist? If so, is it a directory?
struct stat info; struct stat info;
if (stat(filename, &info) != 0) if (stat(filename, &info) != 0)
@ -237,7 +239,7 @@ void FWadCollection::AddFile (const char *filename, FileReader *wadinfo)
} }
isdir = (info.st_mode & S_IFDIR) != 0; isdir = (info.st_mode & S_IFDIR) != 0;
if (wadinfo == NULL && !isdir) if (!isdir)
{ {
try try
{ {
@ -250,6 +252,7 @@ void FWadCollection::AddFile (const char *filename, FileReader *wadinfo)
return; return;
} }
} }
}
Printf (" adding %s", filename); Printf (" adding %s", filename);
startlump = NumLumps; startlump = NumLumps;
@ -294,7 +297,7 @@ void FWadCollection::AddFile (const char *filename, FileReader *wadinfo)
FileReader *embedded = lump->NewReader(); FileReader *embedded = lump->NewReader();
strcpy(wadstr, lump->FullName); strcpy(wadstr, lump->FullName);
AddFile(wadstr, embedded); AddFile(path, embedded);
} }
} }
return; return;