fabian
Warming Up
Posts: 28
Registered: 12-12 |
fabian said:
Do you have a clue how/where to fix this in prboom-plus' code?
To answer my own question, I have supplied the following patch to the corresponding bug [1] in prboom-plus' bug tracker on sourceforge:
code:
--- a/src/w_wad.c
+++ b/src/w_wad.c
@@ -253,6 +253,12 @@ static void W_AddFile(wadfile_info_t *wa
}
strncpy (lump_p->name, fileinfo->name, 8);
lump_p->source = wadfile->src; // Ty 08/29/98
+
+ // IWAD file used as recource PWAD must not override TEXTURE1 or PNAMES
+ if (wadfile->src != source_iwad && !strncmp(header.identification,"IWAD",4) &&
+ (!strnicmp(fileinfo->name,"TEXTURE1",8) ||
+ !strnicmp(fileinfo->name,"PNAMES",6)))
+ strncpy (lump_p->name, "-IGNORE-", 8);
}
free(fileinfo2free); // killough
It prevents IWADs that are not used as *the* current IWAD from overriding the current IWAD's TEXTURE1/2 and PNAMES lumps. I admit it is a bit hackish, but it works for the decribed use case: "prboom-plus -iwad freedoom.wad -file doom1.wad" works as expected. Furthermore, PWADs that supply their own TEXTURE1/2 lumps for a reason are still allowed to do so (but for additional IWADs this is usually wrong). It fails, however, for IWADs that declare themselves as PWADs like CHEX.WAD or DOOM.WAD and DOOM2.WAD from the Doom 3 BFG Edition.
A more clean solution would be to introduce the aforementioned cummulative TEXTURE and PNAMES lumps, but that is bexond the scope of my approach.
[1] http://sourceforge.net/tracker/?fun...658&atid=772946
Last edited by fabian on 05-06-13 at 09:19
|