- sound code and most of texture code converted to FileRdr.

This allowed to remove a lot of bad pointer voodoo in the music loader, because the new class does not allow duplication of the reader object
This commit is contained in:
Christoph Oelckers 2018-03-10 18:45:11 +01:00
commit 5fa63c396d
46 changed files with 333 additions and 307 deletions

View file

@ -2500,17 +2500,17 @@ static void P_LoopSidedefs (bool firstloop)
int P_DetermineTranslucency (int lumpnum)
{
FWadLump tranmap = Wads.OpenLumpNum (lumpnum);
auto tranmap = Wads.OpenLumpReader (lumpnum);
uint8_t index;
PalEntry newcolor;
PalEntry newcolor2;
tranmap.Seek (GPalette.BlackIndex * 256 + GPalette.WhiteIndex, SEEK_SET);
tranmap.Seek (GPalette.BlackIndex * 256 + GPalette.WhiteIndex, FileRdr::SeekSet);
tranmap.Read (&index, 1);
newcolor = GPalette.BaseColors[GPalette.Remap[index]];
tranmap.Seek (GPalette.WhiteIndex * 256 + GPalette.BlackIndex, SEEK_SET);
tranmap.Seek (GPalette.WhiteIndex * 256 + GPalette.BlackIndex, FileRdr::SeekSet);
tranmap.Read (&index, 1);
newcolor2 = GPalette.BaseColors[GPalette.Remap[index]];
if (newcolor2.r == 255) // if black on white results in white it's either