mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Switch to zip archive format for resource data, prep work for moving from PICT/snd to BMP/WAV
This commit is contained in:
30
PortabilityLayer/ZipFileProxy.h
Normal file
30
PortabilityLayer/ZipFileProxy.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
class IOStream;
|
||||
struct ZipCentralDirectoryFileHeader;
|
||||
|
||||
class ZipFileProxy
|
||||
{
|
||||
public:
|
||||
void Destroy();
|
||||
|
||||
bool IndexFile(const char *path, size_t &outIndex) const;
|
||||
bool LoadFile(size_t index, void *outBuffer);
|
||||
|
||||
size_t NumFiles() const;
|
||||
size_t GetFileSize(size_t index) const;
|
||||
|
||||
static ZipFileProxy *Create(IOStream *stream);
|
||||
|
||||
private:
|
||||
ZipFileProxy(IOStream *stream, void *centralDirImage, ZipCentralDirectoryFileHeader **sortedFiles, size_t numFiles);
|
||||
~ZipFileProxy();
|
||||
|
||||
IOStream *m_stream;
|
||||
void *m_centralDirImage;
|
||||
ZipCentralDirectoryFileHeader **m_sortedFiles;
|
||||
size_t m_numFiles;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user