ff7tk  1.2.0.13
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 {
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 };
IsoArchiveFF7
Definition: IsoArchiveFF7.h:9
IsoDirectory
Definition: IsoArchive.h:181
IsoArchiveFF7::None
@ None
Definition: IsoArchiveFF7.h:13
IsoArchive::open
virtual bool open(QIODevice::OpenMode mode)
Definition: IsoArchive.cpp:576
IsoArchive
Definition: IsoArchive.h:297
IsoArchiveFF7::Compression
Compression
Definition: IsoArchiveFF7.h:12
GZIP
Definition: GZIP.h:9
IsoArchive::reorganizeModifiedFilesAfter
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
IsoFile
Definition: IsoArchive.h:158
LZS
Definition: LZS.h:16
IsoArchiveFF7::Us
@ Us
Definition: IsoArchiveFF7.h:17
IsoArchiveFF7::Country
Country
Definition: IsoArchiveFF7.h:16