- read snapshots from zip.
This commit is contained in:
parent
f93e4813d1
commit
5dfc396bb9
12 changed files with 90 additions and 76 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "doomerrors.h"
|
||||
#include "gi.h"
|
||||
#include "doomstat.h"
|
||||
#include "w_zip.h"
|
||||
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -191,6 +192,23 @@ void FResourceLump::CheckEmbedded()
|
|||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// this is just for completeness. For non-Zips only an uncompressed lump can
|
||||
// be returned.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FCompressedBuffer FResourceLump::GetRawData()
|
||||
{
|
||||
FCompressedBuffer cbuf = { (unsigned)LumpSize, (unsigned)LumpSize, METHOD_STORED, 0, 0, new char[LumpSize] };
|
||||
memcpy(cbuf.mBuffer, CacheLump(), LumpSize);
|
||||
cbuf.mCRC32 = crc32(0, (BYTE*)cbuf.mBuffer, LumpSize);
|
||||
ReleaseCache();
|
||||
return cbuf;
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Returns the owner's FileReader if it can be used to access this lump
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue