Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
worldcompleted.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
34
class
SAVEFILE_AUTOPORT
WorldCompleted
:
public
QObject
35
{
36
Q_OBJECT
37
38
Q_PROPERTY(
bool
obtainedOldRod
MEMBER
obtainedOldRod
NOTIFY
obtainedOldRodChanged
)
39
Q_PROPERTY(
bool
obtainedGoodRod
MEMBER
obtainedGoodRod
NOTIFY
obtainedGoodRodChanged
)
40
Q_PROPERTY(
bool
obtainedSuperRod
MEMBER
obtainedSuperRod
NOTIFY
obtainedSuperRodChanged
)
41
Q_PROPERTY(
bool
obtainedLapras
MEMBER
obtainedLapras
NOTIFY
obtainedLaprasChanged
)
42
Q_PROPERTY(
bool
obtainedStarterPokemon
MEMBER
obtainedStarterPokemon
NOTIFY
obtainedStarterPokemonChanged
)
43
Q_PROPERTY(
bool
everHealedPokemon
MEMBER
everHealedPokemon
NOTIFY
everHealedPokemonChanged
)
44
Q_PROPERTY(
bool
satisfiedSaffronGuards
MEMBER
satisfiedSaffronGuards
NOTIFY
satisfiedSaffronGuardsChanged
)
45
Q_PROPERTY(
bool
defeatedLorelei
MEMBER
defeatedLorelei
NOTIFY
defeatedLoreleiChanged
)
46
47
public
:
48
WorldCompleted
(
SaveFile
* saveFile =
nullptr
);
49
virtual
~WorldCompleted
();
50
51
void
load
(
SaveFile
* saveFile =
nullptr
);
52
void
save
(
SaveFile
* saveFile);
53
54
signals:
55
void
obtainedOldRodChanged
();
56
void
obtainedGoodRodChanged
();
57
void
obtainedSuperRodChanged
();
58
void
obtainedLaprasChanged
();
59
void
obtainedStarterPokemonChanged
();
60
void
everHealedPokemonChanged
();
61
void
satisfiedSaffronGuardsChanged
();
62
void
defeatedLoreleiChanged
();
63
64
public
slots:
65
void
reset
();
66
void
randomize
();
67
68
public
:
69
// Rods
70
bool
obtainedOldRod
;
71
bool
obtainedGoodRod
;
72
bool
obtainedSuperRod
;
73
74
// Pokemon
75
bool
obtainedLapras
;
76
bool
obtainedStarterPokemon
;
77
bool
everHealedPokemon
;
78
79
// Other
80
bool
satisfiedSaffronGuards
;
81
bool
defeatedLorelei
;
82
};
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
WorldCompleted::obtainedLaprasChanged
void obtainedLaprasChanged()
WorldCompleted::defeatedLorelei
bool defeatedLorelei
Definition
worldcompleted.h:81
WorldCompleted::satisfiedSaffronGuards
bool satisfiedSaffronGuards
Definition
worldcompleted.h:80
WorldCompleted::obtainedOldRodChanged
protected::void obtainedOldRodChanged()
WorldCompleted::obtainedOldRod
bool obtainedOldRod
Definition
worldcompleted.h:70
WorldCompleted::obtainedGoodRodChanged
void obtainedGoodRodChanged()
WorldCompleted::save
void save(SaveFile *saveFile)
Flatten these flags to the save.
Definition
worldcompleted.cpp:70
WorldCompleted::obtainedGoodRod
bool obtainedGoodRod
Definition
worldcompleted.h:71
WorldCompleted::obtainedStarterPokemonChanged
void obtainedStarterPokemonChanged()
WorldCompleted::randomize
void randomize()
Randomize these milestones.
Definition
worldcompleted.cpp:114
WorldCompleted::obtainedStarterPokemon
bool obtainedStarterPokemon
Definition
worldcompleted.h:76
WorldCompleted::defeatedLoreleiChanged
void defeatedLoreleiChanged()
WorldCompleted::reset
void reset()
Blank these milestones.
Definition
worldcompleted.cpp:84
WorldCompleted::obtainedLapras
bool obtainedLapras
Definition
worldcompleted.h:75
WorldCompleted::everHealedPokemon
bool everHealedPokemon
Definition
worldcompleted.h:77
WorldCompleted::WorldCompleted
WorldCompleted(SaveFile *saveFile=nullptr)
< Got the Old Rod.
Definition
worldcompleted.cpp:29
WorldCompleted::obtainedSuperRodChanged
void obtainedSuperRodChanged()
WorldCompleted::load
void load(SaveFile *saveFile=nullptr)
Expand these flags from the save.
Definition
worldcompleted.cpp:36
WorldCompleted::everHealedPokemonChanged
void everHealedPokemonChanged()
WorldCompleted::obtainedSuperRod
bool obtainedSuperRod
Definition
worldcompleted.h:72
WorldCompleted::satisfiedSaffronGuardsChanged
void satisfiedSaffronGuardsChanged()
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
worldcompleted.h
Generated by
1.17.0