// // Created by Иван_Архипов on 01.11.2017. // #ifndef LOTRO_DAT_PATCHER_SUBFILE_H #define LOTRO_DAT_PATCHER_SUBFILE_H extern "C++" { namespace LOTRO_DAT { class DatFile; enum EXTENSION { TXT, JPG, DDS, WAV, OGG, FONT, UNKNOWN }; class Subfile { public: Subfile(); Subfile(DatFile *dat, long long unknown0, long long unknown1, long long file_id, long long file_offset, long long size1, long long timestamp, long long version, long long size2); bool ExportFile(const char* filename) const; bool PatchFile(); long long unknown0() const; long long unknown1() const; long long file_id() const; long long file_offset() const; long long size1() const; long long timestamp() const; long long version() const; long long size2() const; EXTENSION ext() const; private: long long unknown0_; long long unknown1_; long long file_id_; long long file_offset_; long long size1_; long long timestamp_; long long version_; long long size2_; DatFile *dat_; EXTENSION ext_; EXTENSION GetExtension() const; bool ExportAsTXT(const char* filename) const; bool ExportAsJPG(const char* filename) const; bool ExportAsDDS(const char* filename) const; bool ExportAsOGG(const char* filename) const; bool ExportAsFont(const char* filename) const; bool ExportAsWAV(const char* filename) const; bool ExportAsUnk(const char* filename) const; }; } }; #endif //LOTRO_DAT_PATCHER_SUBFILE_H