1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // Created by Иван_Архипов on 07.11.2017.
- //
- #ifndef LOTRO_DAT_PATCHER_SUBDIRECTORY_H
- #define LOTRO_DAT_PATCHER_SUBDIRECTORY_H
- #include <vector>
- #include <map>
- #include <unordered_map>
- #include <unordered_set>
- extern "C++"
- {
- namespace LOTRO_DAT
- {
- enum FILE_TYPE : int;
- class DatFile;
- class DatException;
- class BinaryData;
- class Subfile;
- class SubDirectory
- {
- public:
- SubDirectory();
- SubDirectory(long long offset, DatFile *dat, long long max_subdirs = 63);
- ~SubDirectory();
- void MakeDictionary(std::unordered_map<long long, Subfile*> &dict);
- private:
- bool MakeSubDirectories();
- bool MakeSubFiles();
- Subfile* MakeSubfile(long long dictionary_offset, long long unknown1, long long file_id, long long file_offset,
- long long file_size, long long timestamp, long long version, long long block_size, long long unknown2);
- FILE_TYPE GetSubfileType(long long file_id, long long file_offset) const;
- DatFile *dat_;
- long long offset_;
- long long max_subdirs_;
- std::vector<SubDirectory *> subdirs_;
- std::vector<Subfile *> subfiles_;
- };
- }
- };
- #endif //LOTRO_DAT_PATCHER_SUBDIRECTORY_H
|