ff7FieldTextWriter.h 517 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include "common/TypeDefine.h"
  3. #include "common/Logger.h"
  4. #include <vector>
  5. #include <memory>
  6. class FF7FieldTextWriter
  7. {
  8. public:
  9. void Begin(std::string fileName);
  10. void Write(const std::vector<u8>& scriptSectionBuffer, std::string fieldName, bool english = true);
  11. void End();
  12. private:
  13. void AddText(std::vector< unsigned char >& text);
  14. u16 GetU16LE(u32 offset);
  15. u8 GetU8(u32 offset);
  16. std::unique_ptr<Logger> mLogger;
  17. std::vector<u8> mData;
  18. bool mTagOpen = false;
  19. };