Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
areageneral.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 <
pse-common/types.h
>
19
#include "
../../savefile_autoport.h
"
20
21
class
SaveFile
;
22
30
struct
SAVEFILE_AUTOPORT
ContrastIds
:
public
QObject
31
{
32
Q_OBJECT
33
Q_ENUMS(
ContrastIds_
)
34
35
public
:
36
enum
ContrastIds_
:
int
37
{
38
Normal
= 0,
39
Darken1
= 3,
40
Darken2_NeedsFlash
= 6,
41
Darken3_SolidBlack
= 9,
42
43
Glitch_1A
= 1,
44
Glitch_1B
= 2,
45
Glitch_2A
= 4,
46
Glitch_2B
= 5,
47
Glitch_3A
= 7,
48
Glitch_3B
= 8
49
};
50
};
51
52
class
SAVEFILE_AUTOPORT
MapDBEntry
;
53
63
class
SAVEFILE_AUTOPORT
AreaGeneral
:
public
QObject
64
{
65
Q_OBJECT
66
67
Q_PROPERTY(
int
contrast
MEMBER
contrast
NOTIFY
contrastChanged
)
68
Q_PROPERTY(
bool
noLetterDelay
MEMBER
noLetterDelay
NOTIFY
noLetterDelayChanged
)
69
Q_PROPERTY(
bool
countPlaytime
MEMBER
countPlaytime
NOTIFY
countPlaytimeChanged
)
70
71
public
:
72
AreaGeneral
(
SaveFile
* saveFile =
nullptr
);
73
virtual
~AreaGeneral
();
74
75
void
load
(
SaveFile
* saveFile =
nullptr
);
76
void
save
(
SaveFile
* saveFile);
77
78
signals:
79
void
contrastChanged
();
80
void
noLetterDelayChanged
();
81
void
countPlaytimeChanged
();
82
83
public
slots:
84
void
reset
();
85
void
randomize
();
86
void
setTo
(
MapDBEntry
* map);
87
88
public
:
89
int
contrast
;
90
bool
noLetterDelay
;
91
bool
countPlaytime
;
92
};
MapDBEntry
class SAVEFILE_AUTOPORT MapDBEntry
Definition
areageneral.h:52
AreaGeneral::contrastChanged
protected::void contrastChanged()
AreaGeneral::randomize
void randomize()
Randomize the flags.
Definition
areageneral.cpp:77
AreaGeneral::load
void load(SaveFile *saveFile=nullptr)
Expand these flags from the save.
Definition
areageneral.cpp:37
AreaGeneral::setTo
void setTo(MapDBEntry *map)
Set from a chosen map's defaults.
Definition
areageneral.cpp:94
AreaGeneral::reset
void reset()
Blank the flags.
Definition
areageneral.cpp:65
AreaGeneral::AreaGeneral
AreaGeneral(SaveFile *saveFile=nullptr)
< Screen contrast (see ContrastIds).
Definition
areageneral.cpp:30
AreaGeneral::contrast
int contrast
Definition
areageneral.h:89
AreaGeneral::noLetterDelay
bool noLetterDelay
Definition
areageneral.h:90
AreaGeneral::save
void save(SaveFile *saveFile)
Flatten these flags to the save.
Definition
areageneral.cpp:56
AreaGeneral::noLetterDelayChanged
void noLetterDelayChanged()
AreaGeneral::countPlaytimeChanged
void countPlaytimeChanged()
AreaGeneral::countPlaytime
bool countPlaytime
Definition
areageneral.h:91
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
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
ContrastIds
Screen-contrast / flash levels, QML-visible.
Definition
areageneral.h:31
ContrastIds::ContrastIds_
ContrastIds_
Definition
areageneral.h:37
ContrastIds::Normal
@ Normal
Full brightness.
Definition
areageneral.h:38
ContrastIds::Glitch_1B
@ Glitch_1B
Glitchy in-between value.
Definition
areageneral.h:44
ContrastIds::Darken1
@ Darken1
One step darker.
Definition
areageneral.h:39
ContrastIds::Darken3_SolidBlack
@ Darken3_SolidBlack
Fully black.
Definition
areageneral.h:41
ContrastIds::Glitch_2A
@ Glitch_2A
Glitchy in-between value.
Definition
areageneral.h:45
ContrastIds::Glitch_2B
@ Glitch_2B
Glitchy in-between value.
Definition
areageneral.h:46
ContrastIds::Glitch_3A
@ Glitch_3A
Glitchy in-between value.
Definition
areageneral.h:47
ContrastIds::Glitch_1A
@ Glitch_1A
Glitchy in-between value.
Definition
areageneral.h:43
ContrastIds::Darken2_NeedsFlash
@ Darken2_NeedsFlash
Two steps darker (needs Flash).
Definition
areageneral.h:40
ContrastIds::Glitch_3B
@ Glitch_3B
Glitchy in-between value.
Definition
areageneral.h:48
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
projects
savefile
src
pse-savefile
expanded
area
areageneral.h
Generated by
1.17.0