2019-06-03 03:26:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class CDirectory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct DirectoryInfo {
|
|
|
|
uint32 offset;
|
|
|
|
uint32 size;
|
|
|
|
char name[24];
|
|
|
|
};
|
|
|
|
DirectoryInfo *entries;
|
|
|
|
int32 maxEntries;
|
|
|
|
int32 numEntries;
|
|
|
|
|
|
|
|
CDirectory(int32 maxEntries);
|
|
|
|
~CDirectory(void);
|
|
|
|
|
|
|
|
void ReadDirFile(const char *filename);
|
|
|
|
bool WriteDirFile(const char *filename);
|
|
|
|
void AddItem(const DirectoryInfo &dirinfo);
|
2020-04-21 11:56:33 +00:00
|
|
|
void AddItem(const DirectoryInfo &dirinfo, int32 imgId);
|
2019-06-03 03:26:49 +00:00
|
|
|
bool FindItem(const char *name, uint32 &offset, uint32 &size);
|
|
|
|
};
|