Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
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>
20
21class SaveFile;
22
30struct SAVEFILE_AUTOPORT ContrastIds : public QObject
31{
32 Q_OBJECT
33 Q_ENUMS(ContrastIds_)
34
35public:
50};
51
53
63class 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
71public:
72 AreaGeneral(SaveFile* saveFile = nullptr);
73 virtual ~AreaGeneral();
74
75 void load(SaveFile* saveFile = nullptr);
76 void save(SaveFile* saveFile);
77
78signals:
82
83public slots:
84 void reset();
85 void randomize();
86 void setTo(MapDBEntry* map);
87
88public:
92};
class SAVEFILE_AUTOPORT MapDBEntry
Definition areageneral.h:52
protected::void contrastChanged()
void randomize()
Randomize the flags.
void load(SaveFile *saveFile=nullptr)
Expand these flags from the save.
void setTo(MapDBEntry *map)
Set from a chosen map's defaults.
void reset()
Blank the flags.
AreaGeneral(SaveFile *saveFile=nullptr)
< Screen contrast (see ContrastIds).
bool noLetterDelay
Definition areageneral.h:90
void save(SaveFile *saveFile)
Flatten these flags to the save.
void noLetterDelayChanged()
void countPlaytimeChanged()
bool countPlaytime
Definition areageneral.h:91
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition savefile.h:46
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.
Screen-contrast / flash levels, QML-visible.
Definition areageneral.h:31
@ Normal
Full brightness.
Definition areageneral.h:38
@ Glitch_1B
Glitchy in-between value.
Definition areageneral.h:44
@ Darken1
One step darker.
Definition areageneral.h:39
@ Darken3_SolidBlack
Fully black.
Definition areageneral.h:41
@ Glitch_2A
Glitchy in-between value.
Definition areageneral.h:45
@ Glitch_2B
Glitchy in-between value.
Definition areageneral.h:46
@ Glitch_3A
Glitchy in-between value.
Definition areageneral.h:47
@ Glitch_1A
Glitchy in-between value.
Definition areageneral.h:43
@ Darken2_NeedsFlash
Two steps darker (needs Flash).
Definition areageneral.h:40
@ Glitch_3B
Glitchy in-between value.
Definition areageneral.h:48
One map's complete static definition – the root of the MapDBEntry family.
Definition mapdbentry.h:56