Subfile.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. bool compressed_;
  42. DatFile *dat_;
  43. EXTENSION ext_;
  44. EXTENSION GetExtension() const;
  45. bool ExportAsTXT(const char* filename) const;
  46. bool ExportAsJPG(const char* filename) const;
  47. bool ExportAsDDS(const char* filename) const;
  48. bool ExportAsOGG(const char* filename) const;
  49. bool ExportAsFont(const char* filename) const;
  50. bool ExportAsWAV(const char* filename) const;
  51. bool ExportAsUnk(const char* filename) const;
  52. };
  53. }
  54. };
  55. #endif //LOTRO_DAT_PATCHER_SUBFILE_H