ff7tk  1.2.0.24
Work with Final Fantasy 7 game data
IsoArchiveFF7.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2009 - 2022 Arzel Jérôme <myst6re@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <IsoArchive>
7 #include <ff7tkformats_export.h>
8 
9 class FF7TKFORMATS_EXPORT IsoArchiveFF7 : public IsoArchive
10 {
11 public:
12  enum Compression {
13  None, LZS, GZIP
14  };
15 
16  enum Country {
17  NoCountry, Jp, Us, Uk, Fr, De, Es
18  };
19 
20  explicit IsoArchiveFF7(const QString &name);
21  virtual ~IsoArchiveFF7() override;
22 
23  bool open(QIODevice::OpenMode mode) override;
24  const QByteArray &fileLzs(const QString &path, quint32 maxSize=0) const;
25  const QByteArray &modifiedFileLzs(const QString &path, quint32 maxSize=0) const;
26  Country country() const;
27  IsoFile *exe() const;
28  bool isDisc(int num) const;
29  QByteArray windowBinData() const;
30  IsoDirectory *fieldDirectory() const;
31  IsoDirectory *initDirectory() const;
32  bool isDemo() const;
33  QMap<int, QString> maplist();
34 private:
35  Q_DISABLE_COPY(IsoArchiveFF7)
36  bool updateBin(IsoFile *isoBin, const QList<IsoFile *> &filesRefByBin, int startOffset = 0);
37  IsoFile *updateFieldBin();
38  IsoFile *updateWorldBin();
39  IsoFile *updateYamadaBin();
40  bool reorganizeModifiedFilesAfter(QMap<quint32, const IsoFile *> &writeToTheMain, QList<const IsoFile *> &writeToTheEnd) override;
41  IsoFile *searchExe() const;
42  Country searchCountry() const;
43  QList<QIODevice *> _devicesToDelete;
44  IsoFile *_exe;
45  Country _country;
46 };
Definition: GZIP.h:10
Definition: IsoArchiveFF7.h:10
Country
Definition: IsoArchiveFF7.h:16
@ De
Definition: IsoArchiveFF7.h:17
Compression
Definition: IsoArchiveFF7.h:12
@ LZS
Definition: IsoArchiveFF7.h:13
Definition: IsoArchive.h:298
virtual bool open(QIODevice::OpenMode mode)
Definition: IsoArchive.cpp:576
virtual bool reorganizeModifiedFilesAfter(QMap< quint32, const IsoFile * > &writeToTheMain, QList< const IsoFile * > &writeToTheEnd)
Used to extend IsoArchive. Called in pack() after file reorganization.
Definition: IsoArchive.cpp:640
Definition: IsoArchive.h:182
Definition: IsoArchive.h:159