123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // Created by Иван_Архипов on 24.11.2017.
- //
- #ifndef LOTRO_DAT_LIBRARY_TEXTSUBFILE_H
- #define LOTRO_DAT_LIBRARY_TEXTSUBFILE_H
- #include "../Subfile.h"
- #include <vector>
- namespace LOTRO_DAT {
- class TextSubfile : public Subfile {
- public:
- TextSubfile();
- TextSubfile(DatFile *dat, long long dictionary_offset, long long fragments_count, 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);
- ~TextSubfile() override {};
- FILE_TYPE FileType() const override;
- std::string Extension() const override;
- bool PrepareForExport(const BinaryData &file_data, long long &export_size, std::vector<BinaryData> &binary_data,
- std::vector<std::u16string> &text_data, std::vector<YAML::Node> &options) override;
- BinaryData MakeForImport(const BinaryData &old_data, const BinaryData &binary_data,
- const std::u16string &text_data, const YAML::Node &options) override;
- private:
- std::vector<std::u16string> MakePieces(const BinaryData &data, long long &offset);
- std::vector<long long> MakeArgumentReferences(const BinaryData &data, long long &offset);
- std::vector<std::vector<BinaryData>> MakeArgumentStrings(const BinaryData &data, long long &offset);
- };
- };
- #endif //LOTRO_DAT_LIBRARY_TEXTSUBFILE_H
|