- 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:
parent
26e948357e
commit
5fa63c396d
46 changed files with 333 additions and 307 deletions
|
|
@ -74,7 +74,7 @@ protected:
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FTexture *FlatTexture_TryCreate(FileReader & file, int lumpnum)
|
||||
FTexture *FlatTexture_TryCreate(FileRdr & file, int lumpnum)
|
||||
{
|
||||
return new FFlatTexture(lumpnum);
|
||||
}
|
||||
|
|
@ -194,9 +194,9 @@ const uint8_t *FFlatTexture::GetPixels ()
|
|||
|
||||
void FFlatTexture::MakeTexture ()
|
||||
{
|
||||
FWadLump lump = Wads.OpenLumpNum (SourceLump);
|
||||
auto lump = Wads.OpenLumpReader (SourceLump);
|
||||
Pixels = new uint8_t[Width*Height];
|
||||
long numread = lump.Read (Pixels, Width*Height);
|
||||
auto numread = lump.Read (Pixels, Width*Height);
|
||||
if (numread < Width*Height)
|
||||
{
|
||||
memset (Pixels + numread, 0xBB, Width*Height - numread);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue