ff7tk  1.2.0.13
Work with Final Fantasy 7 game data
FF7Achievements.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2013 - 2023 Chris Rizzitello <sithlord48@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <QObject>
7 #include <ff7tkdata_export.h>
8 
16 class FF7TKDATA_EXPORT FF7Achievements : public QObject
17 {
18  Q_OBJECT
19 public:
20  FF7Achievements() = default;
21  ~FF7Achievements() = default;
28  Q_INVOKABLE bool openFile(const QString &fileName);
29 
36  Q_INVOKABLE bool saveFile(const QString &fileName);
37 
43  Q_INVOKABLE bool achievementUnlocked(int bit);
44 
50  Q_INVOKABLE void setAchievementUnlocked(int bit, bool unlocked);
51 
56  Q_INVOKABLE QString name(int bit);
57 private:
58  QByteArray _achievements = QByteArray(8, '\x00');
59  inline static const QStringList _names{
60  QT_TR_NOOP("Dice")
61  , QT_TR_NOOP("Sled Fang")
62  , QT_TR_NOOP("Greased Lightning")
63  , QT_TR_NOOP("Beat Rush")
64  , QT_TR_NOOP("Boost Jump")
65  , QT_TR_NOOP("Healing Wind")
66  , QT_TR_NOOP("Galian Beast")
67  , QT_TR_NOOP("Big Shot")
68  , QT_TR_NOOP("Braver")
69  , QT_TR_NOOP("First Battle")
70  , QT_TR_NOOP("Gold Chocobo")
71  , QT_TR_NOOP("Battle Square")
72  , QT_TR_NOOP("Materia Overlord")
73  , QT_TR_NOOP("Yuffie")
74  , QT_TR_NOOP("Vincent")
75  , QT_TR_NOOP("Emerald Weapon")
76  , QT_TR_NOOP("Ruby Weapon")
77  , QT_TR_NOOP("Diamond Weapon")
78  , QT_TR_NOOP("Ultimate Weapon")
79  , QT_TR_NOOP("Bahamut Zero")
80  , QT_TR_NOOP("Slots")
81  , QT_TR_NOOP("Cosmo Memory")
82  , QT_TR_NOOP("All Creation")
83  , QT_TR_NOOP("Final Heaven")
84  , QT_TR_NOOP("Highwind")
85  , QT_TR_NOOP("Great Gospel")
86  , QT_TR_NOOP("Chaos")
87  , QT_TR_NOOP("Catastrophe")
88  , QT_TR_NOOP("Omnislash")
89  , QT_TR_NOOP("Knights of the Round")
90  , QT_TR_NOOP("Top Level")
91  , QT_TR_NOOP("Master of Gil")
92  , QT_TR_NOOP("Master Materia")
93  , QT_TR_NOOP("End of Game")
94  , QT_TR_NOOP("End of Part II")
95  , QT_TR_NOOP("End of Part I")
96  };
97 };
FF7Achievements
Work with achievements.dat.
Definition: FF7Achievements.h:16