Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
worldgeneral.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Twilight
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15*/
16#pragma once
17#include <QObject>
18#include <QVector>
19#include <pse-common/types.h>
21
22class SaveFile;
23
29class SAVEFILE_AUTOPORT Options : public QObject {
30 Q_OBJECT
31
32 Q_PROPERTY(int textSlowness MEMBER textSlowness NOTIFY textSlownessChanged)
33 Q_PROPERTY(bool battleStyleSet MEMBER battleStyleSet NOTIFY battleStyleSetChanged)
34 Q_PROPERTY(bool battleAnimOff MEMBER battleAnimOff NOTIFY battleAnimOffChanged)
35
36signals:
37 void textSlownessChanged();
38 void battleStyleSetChanged();
39 void battleAnimOffChanged();
40
41public:
45};
46
50class SAVEFILE_AUTOPORT LetterDelay : public QObject {
51 Q_OBJECT
52
53 Q_PROPERTY(bool normalDelay MEMBER normalDelay NOTIFY normalDelayChanged)
54 Q_PROPERTY(bool dontDelay MEMBER dontDelay NOTIFY dontDelayChanged)
55
56signals:
57 void normalDelayChanged();
58 void dontDelayChanged();
59
60public:
62 bool dontDelay;
63};
64
74class SAVEFILE_AUTOPORT WorldGeneral : public QObject
75{
76 Q_OBJECT
77
78 Q_PROPERTY(int lastBlackoutMap MEMBER lastBlackoutMap NOTIFY lastBlackoutMapChanged)
79 Q_PROPERTY(int lastMap MEMBER lastMap NOTIFY lastMapChanged)
80 Q_PROPERTY(Options* options MEMBER options NOTIFY optionsChanged)
81 Q_PROPERTY(LetterDelay* letterDelay MEMBER letterDelay NOTIFY letterDelayChanged)
82
83public:
84 WorldGeneral(SaveFile* saveFile = nullptr);
85 virtual ~WorldGeneral();
86
87 void load(SaveFile* saveFile = nullptr);
88 void save(SaveFile* saveFile);
89
90signals:
95
96public slots:
97 void reset();
98 void randomize();
99
100public:
105};
The text letter-printing delay flags (paired with the Options text speed).
In-game Options menu settings (text speed, battle style, animations).
bool battleAnimOff
int textSlowness
bool battleStyleSet
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition savefile.h:46
void optionsChanged()
void letterDelayChanged()
WorldGeneral(SaveFile *saveFile=nullptr)
< Map a blackout returns you to.
LetterDelay * letterDelay
protected::void lastBlackoutMapChanged()
void load(SaveFile *saveFile=nullptr)
Expand general world settings from the save.
void randomize()
Randomize these settings.
void save(SaveFile *saveFile)
Flatten general world settings to the save.
Options * options
void lastMapChanged()
void reset()
Blank these settings.
Project-wide fixed-width integer aliases (var8, var16, ...).
Import/export macro for the savefile library, plus the central list of QObject types kept deliberatel...
#define SAVEFILE_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.