Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
savefileexpanded.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 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 "
../savefile_autoport.h
"
19
20
#include "
./player/player.h
"
21
#include "
./area/area.h
"
22
#include "
./world/world.h
"
23
#include "
./storage.h
"
24
25
class
SaveFile
;
26
class
Player
;
27
class
Area
;
28
class
World
;
29
class
Daycare
;
30
class
HallOfFame
;
31
class
Rival
;
32
class
Storage
;
33
57
class
SAVEFILE_AUTOPORT
SaveFileExpanded
:
public
QObject
58
{
59
Q_OBJECT
60
61
Q_PROPERTY(
Player
*
player
MEMBER
player
NOTIFY playerChanged)
62
Q_PROPERTY(
Area
*
area
MEMBER
area
NOTIFY
areaChanged
)
63
Q_PROPERTY(
World
*
world
MEMBER
world
NOTIFY
worldChanged
)
64
Q_PROPERTY(
Daycare
*
daycare
MEMBER
daycare
NOTIFY
daycareChanged
)
65
Q_PROPERTY(
HallOfFame
*
hof
MEMBER
hof
NOTIFY
hofChanged
)
66
Q_PROPERTY(
Rival
*
rival
MEMBER
rival
NOTIFY
rivalChanged
)
67
Q_PROPERTY(
Storage
*
storage
MEMBER
storage
NOTIFY
storageChanged
)
68
69
public
:
70
SaveFileExpanded
(
SaveFile
* saveFile =
nullptr
);
71
virtual
~SaveFileExpanded
();
72
73
void
load
(
SaveFile
* saveFile =
nullptr
);
74
void
save
(
SaveFile
* saveFile);
75
76
signals:
77
// No point in having these change signals but Q_PROPERTY requires them
78
void
playerChanged();
79
void
areaChanged
();
80
void
worldChanged
();
81
void
daycareChanged
();
82
void
hofChanged
();
83
void
rivalChanged
();
84
void
storageChanged
();
85
86
public
slots:
87
void
reset
();
88
void
randomize
();
89
90
public
:
91
Player
*
player
=
nullptr
;
92
Area
*
area
=
nullptr
;
93
World
*
world
=
nullptr
;
94
Daycare
*
daycare
=
nullptr
;
95
HallOfFame
*
hof
=
nullptr
;
96
Rival
*
rival
=
nullptr
;
97
Storage
*
storage
=
nullptr
;
98
};
area.h
Area
The current map's complete live state – everything about "where you are".
Definition
area.h:82
Daycare
The Day Care: at most one deposited Pokemon.
Definition
daycare.h:42
HallOfFame
The Hall of Fame: a rolling list of up to 50 winning-team records.
Definition
halloffame.h:38
Player
The trainer: their basics, bag, pokedex, and party.
Definition
player.h:42
Rival
The rival: their name and chosen starter.
Definition
rival.h:34
SaveFileExpanded::save
void save(SaveFile *saveFile)
Flatten: write the whole tree back into saveFile.
Definition
savefileexpanded.cpp:71
SaveFileExpanded::hofChanged
void hofChanged()
SaveFileExpanded::hof
HallOfFame * hof
Definition
savefileexpanded.h:95
SaveFileExpanded::randomize
void randomize()
Constrained full randomization across the whole tree.
Definition
savefileexpanded.cpp:93
SaveFileExpanded::areaChanged
void areaChanged()
SaveFileExpanded::reset
void reset()
Blank every region (acts like a fresh save's expansion).
Definition
savefileexpanded.cpp:82
SaveFileExpanded::SaveFileExpanded
SaveFileExpanded(SaveFile *saveFile=nullptr)
< The trainer: basics, items, pokedex, party.
Definition
savefileexpanded.cpp:33
SaveFileExpanded::storage
Storage * storage
Definition
savefileexpanded.h:97
SaveFileExpanded::rivalChanged
void rivalChanged()
SaveFileExpanded::worldChanged
void worldChanged()
SaveFileExpanded::area
Area * area
Definition
savefileexpanded.h:92
SaveFileExpanded::player
Player * player
Definition
savefileexpanded.h:91
SaveFileExpanded::load
void load(SaveFile *saveFile=nullptr)
Expand: build the whole tree from saveFile's raw bytes.
Definition
savefileexpanded.cpp:57
SaveFileExpanded::rival
Rival * rival
Definition
savefileexpanded.h:96
SaveFileExpanded::world
World * world
Definition
savefileexpanded.h:93
SaveFileExpanded::storageChanged
void storageChanged()
SaveFileExpanded::daycareChanged
void daycareChanged()
SaveFileExpanded::daycare
Daycare * daycare
Definition
savefileexpanded.h:94
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
Storage
The PC: the item storage box and all 12 Pokemon boxes.
Definition
storage.h:49
World
Global, map-independent game state – "the state of the world".
Definition
world.h:50
player.h
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
storage.h
world.h
projects
savefile
src
pse-savefile
expanded
savefileexpanded.h
Generated by
1.17.0