Subfile.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // Created by Иван_Архипов on 01.11.2017.
  3. //
  4. #ifndef LOTRO_DAT_PATCHER_SUBFILE_H
  5. #define LOTRO_DAT_PATCHER_SUBFILE_H
  6. extern "C++"
  7. {
  8. namespace LOTRO_DAT
  9. {
  10. class DatFile;
  11. enum EXTENSION
  12. {
  13. TXT, JPG, DDS, WAV, OGG, FONT, UNKNOWN
  14. };
  15. class Subfile
  16. {
  17. public:
  18. Subfile();
  19. Subfile(DatFile *dat, long long unknown0, long long unknown1, long long file_id, long long file_offset, long long size1,
  20. long long timestamp, long long version, long long size2);
  21. bool ExportFile(const char* filename) const;
  22. bool PatchFile();
  23. long long unknown0() const;
  24. long long unknown1() const;
  25. long long file_id() const;
  26. long long file_offset() const;
  27. long long size1() const;
  28. long long timestamp() const;
  29. long long version() const;
  30. long long size2() const;
  31. EXTENSION ext() const;
  32. private:
  33. long long unknown0_;
  34. long long unknown1_;
  35. long long file_id_;
  36. long long file_offset_;
  37. long long size1_;
  38. long long timestamp_;
  39. long long version_;
  40. long long size2_;
  41. DatFile *dat_;
  42. EXTENSION ext_;
  43. EXTENSION GetExtension() const;
  44. bool ExportAsTXT(const char* filename) const;
  45. bool ExportAsJPG(const char* filename) const;
  46. bool ExportAsDDS(const char* filename) const;
  47. bool ExportAsOGG(const char* filename) const;
  48. bool ExportAsFont(const char* filename) const;
  49. bool ExportAsWAV(const char* filename) const;
  50. bool ExportAsUnk(const char* filename) const;
  51. };
  52. }
  53. };
  54. #endif //LOTRO_DAT_PATCHER_SUBFILE_H