ff7tk 0.80.25
Work with Final Fantasy 7 game data
FF7Achievements.h
Go to the documentation of this file.
1/****************************************************************************/
2// copyright 2013 - 2020 Chris Rizzitello <sithlord48@gmail.com> //
3// //
4// This file is part of FF7tk //
5// //
6// FF7tk is free software: you can redistribute it and/or modify //
7// it under the terms of the GNU General Public License as published by //
8// the Free Software Foundation, either version 3 of the License, or //
9// (at your option) any later version. //
10// //
11// FF7tk is distributed in the hope that it will be useful, //
12// but WITHOUT ANY WARRANTY; without even the implied warranty of //
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14// GNU General Public License for more details. //
15/****************************************************************************/
16#pragma once
17
18#include <QObject>
19
20#include <ff7tk_export.h>
21
29class FF7TK_EXPORT FF7Achievements : public QObject
30{
31 Q_OBJECT
32public:
33 FF7Achievements() = default;
34 ~FF7Achievements() = default;
41 Q_INVOKABLE bool openFile(const QString &fileName);
42
49 Q_INVOKABLE bool saveFile(const QString &fileName);
50
56 Q_INVOKABLE bool achievmentUnlocked(int bit);
57
63 Q_INVOKABLE void setAchievementUnlocked(int bit, bool unlocked);
64
69 Q_INVOKABLE QString name(int bit);
70private:
71 QByteArray _achievements = QByteArray(8, '\x00');
72 inline static const QStringList _names{
73 QT_TR_NOOP("Dice")
74 , QT_TR_NOOP("Sled Fang")
75 , QT_TR_NOOP("Greased Lightning")
76 , QT_TR_NOOP("Beat Rush")
77 , QT_TR_NOOP("Boost Jump")
78 , QT_TR_NOOP("Healing Wind")
79 , QT_TR_NOOP("Galian Beast")
80 , QT_TR_NOOP("Big Shot")
81 , QT_TR_NOOP("Braver")
82 , QT_TR_NOOP("First Battle")
83 , QT_TR_NOOP("Gold Chocobo")
84 , QT_TR_NOOP("Battle Square")
85 , QT_TR_NOOP("Materia Overlord")
86 , QT_TR_NOOP("Yuffie")
87 , QT_TR_NOOP("Vincent")
88 , QT_TR_NOOP("Emerald Weapon")
89 , QT_TR_NOOP("Ruby Weapon")
90 , QT_TR_NOOP("Diamond Weapon")
91 , QT_TR_NOOP("Ultimate Weapon")
92 , QT_TR_NOOP("Bahamut Zero")
93 , QT_TR_NOOP("Slots")
94 , QT_TR_NOOP("Cosmo Memory")
95 , QT_TR_NOOP("All Creation")
96 , QT_TR_NOOP("Final Heaven")
97 , QT_TR_NOOP("Highwind")
98 , QT_TR_NOOP("Great Gospel")
99 , QT_TR_NOOP("Chaos")
100 , QT_TR_NOOP("Catastrophe")
101 , QT_TR_NOOP("Omnislash")
102 , QT_TR_NOOP("Knights of the Round")
103 , QT_TR_NOOP("Top Level")
104 , QT_TR_NOOP("Master of Gil")
105 , QT_TR_NOOP("Master Materia")
106 , QT_TR_NOOP("End of Game")
107 , QT_TR_NOOP("End of Part II")
108 , QT_TR_NOOP("End of Part I")
109 };
110};
Work with achievements.dat.
Definition: FF7Achievements.h:30
~FF7Achievements()=default
FF7Achievements()=default