- fixed some remaining issues:
* initial positioning in a subsection of a file failed. This mainly affected music playback. * made the FileRdr constructor which takes a FileReaderInterface private so that everything that needs it must be explicitly declared as friend. * removed a few redundant construction initializers for FileRdrs. * loading compressed nodes needs to check the validity of its reader. * use GetLength to detemine the size of a Zip file instead of doing another seek to the end. * removed duplicate Length variables.
This commit is contained in:
parent
b14ee50d0d
commit
8bbfd39f42
7 changed files with 42 additions and 39 deletions
|
|
@ -42,26 +42,21 @@
|
|||
#include "m_misc.h"
|
||||
|
||||
|
||||
class DecompressorBase : public FileReaderInterface
|
||||
long DecompressorBase::Tell () const
|
||||
{
|
||||
public:
|
||||
// These do not work but need to be defined to satisfy the FileReader interface
|
||||
long Tell () const override
|
||||
{
|
||||
I_Error("Cannot get position of decompressor stream");
|
||||
return 0;
|
||||
}
|
||||
virtual long Seek (long offset, int origin) override
|
||||
{
|
||||
I_Error("Cannot seek in decompressor stream");
|
||||
return 0;
|
||||
}
|
||||
virtual char *Gets(char *strbuf, int len) override
|
||||
{
|
||||
I_Error("Cannot use Gets on decompressor stream");
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
I_Error("Cannot get position of decompressor stream");
|
||||
return 0;
|
||||
}
|
||||
long DecompressorBase::Seek (long offset, int origin)
|
||||
{
|
||||
I_Error("Cannot seek in decompressor stream");
|
||||
return 0;
|
||||
}
|
||||
char *DecompressorBase::Gets(char *strbuf, int len)
|
||||
{
|
||||
I_Error("Cannot use Gets on decompressor stream");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue