Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
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
>
20
#include "
../../savefile_autoport.h
"
21
22
class
SaveFile
;
23
29
class
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
36
signals:
37
void
textSlownessChanged();
38
void
battleStyleSetChanged();
39
void
battleAnimOffChanged();
40
41
public
:
42
int
textSlowness
;
43
bool
battleStyleSet
;
44
bool
battleAnimOff
;
45
};
46
50
class
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
56
signals:
57
void
normalDelayChanged();
58
void
dontDelayChanged();
59
60
public
:
61
bool
normalDelay
;
62
bool
dontDelay
;
63
};
64
74
class
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
83
public
:
84
WorldGeneral
(
SaveFile
* saveFile =
nullptr
);
85
virtual
~WorldGeneral
();
86
87
void
load
(
SaveFile
* saveFile =
nullptr
);
88
void
save
(
SaveFile
* saveFile);
89
90
signals:
91
void
lastBlackoutMapChanged
();
92
void
lastMapChanged
();
93
void
optionsChanged
();
94
void
letterDelayChanged
();
95
96
public
slots:
97
void
reset
();
98
void
randomize
();
99
100
public
:
101
int
lastBlackoutMap
;
102
int
lastMap
;
103
Options
*
options
;
104
LetterDelay
*
letterDelay
;
105
};
LetterDelay
The text letter-printing delay flags (paired with the Options text speed).
Definition
worldgeneral.h:50
LetterDelay::dontDelay
bool dontDelay
Definition
worldgeneral.h:62
LetterDelay::normalDelay
bool normalDelay
Definition
worldgeneral.h:61
Options
In-game Options menu settings (text speed, battle style, animations).
Definition
worldgeneral.h:29
Options::battleAnimOff
bool battleAnimOff
Definition
worldgeneral.h:44
Options::textSlowness
int textSlowness
Definition
worldgeneral.h:42
Options::battleStyleSet
bool battleStyleSet
Definition
worldgeneral.h:43
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
WorldGeneral::optionsChanged
void optionsChanged()
WorldGeneral::lastMap
int lastMap
Definition
worldgeneral.h:102
WorldGeneral::letterDelayChanged
void letterDelayChanged()
WorldGeneral::WorldGeneral
WorldGeneral(SaveFile *saveFile=nullptr)
< Map a blackout returns you to.
Definition
worldgeneral.cpp:32
WorldGeneral::letterDelay
LetterDelay * letterDelay
Definition
worldgeneral.h:104
WorldGeneral::lastBlackoutMap
int lastBlackoutMap
Definition
worldgeneral.h:101
WorldGeneral::lastBlackoutMapChanged
protected::void lastBlackoutMapChanged()
WorldGeneral::load
void load(SaveFile *saveFile=nullptr)
Expand general world settings from the save.
Definition
worldgeneral.cpp:44
WorldGeneral::randomize
void randomize()
Randomize these settings.
Definition
worldgeneral.cpp:115
WorldGeneral::save
void save(SaveFile *saveFile)
Flatten general world settings to the save.
Definition
worldgeneral.cpp:76
WorldGeneral::options
Options * options
Definition
worldgeneral.h:103
WorldGeneral::lastMapChanged
void lastMapChanged()
WorldGeneral::reset
void reset()
Blank these settings.
Definition
worldgeneral.cpp:91
types.h
Project-wide fixed-width integer aliases (var8, var16, ...).
savefile_autoport.h
Import/export macro for the savefile library, plus the central list of QObject types kept deliberatel...
SAVEFILE_AUTOPORT
#define SAVEFILE_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.
Definition
savefile_autoport.h:38
projects
savefile
src
pse-savefile
expanded
world
worldgeneral.h
Generated by
1.17.0