Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
daycare.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
19
#include <
pse-common/types.h
>
20
#include "
../savefile_autoport.h
"
21
22
// PlayerBasics is used as a slot parameter below; include the full type so its
23
// QMetaType resolves now that it is no longer Q_DECLARE_OPAQUE_POINTER'd.
24
#include "
./player/playerbasics.h
"
25
// PokemonBox is a Q_PROPERTY below — full include so QML can traverse it.
26
#include "
./fragments/pokemonbox.h
"
27
28
class
SaveFile
;
29
class
PokemonBox
;
30
class
PlayerBasics
;
31
41
class
SAVEFILE_AUTOPORT
Daycare
:
public
QObject
42
{
43
Q_OBJECT
44
45
Q_PROPERTY(
PokemonBox
*
pokemon
MEMBER
pokemon
NOTIFY
pokemonChanged
)
46
47
public
:
48
Daycare
(
SaveFile
* saveFile =
nullptr
);
49
virtual
~Daycare
();
50
51
void
load
(
SaveFile
* saveFile =
nullptr
);
52
void
save
(
SaveFile
* saveFile);
53
54
signals:
55
void
pokemonChanged
();
56
57
public
slots:
58
void
reset
();
59
void
randomize
(
PlayerBasics
* basics);
60
61
public
:
62
PokemonBox
*
pokemon
=
nullptr
;
63
};
Daycare::reset
void reset()
Empty the Day Care.
Definition
daycare.cpp:73
Daycare::Daycare
Daycare(SaveFile *saveFile=nullptr)
< The Pokemon left at the Day Care (may be empty).
Definition
daycare.cpp:31
Daycare::pokemonChanged
protected::void pokemonChanged()
Daycare::load
void load(SaveFile *saveFile=nullptr)
Expand the day-care mon from the save.
Definition
daycare.cpp:47
Daycare::save
void save(SaveFile *saveFile)
Flatten the day-care mon to the save.
Definition
daycare.cpp:63
Daycare::randomize
void randomize(PlayerBasics *basics)
Put a random mon in the Day Care.
Definition
daycare.cpp:83
Daycare::pokemon
PokemonBox * pokemon
Definition
daycare.h:62
PlayerBasics
The trainer's headline values: name, ID, money, coins, badges, starter.
Definition
playerbasics.h:67
PokemonBox
A single Pokemon record – the most property-rich object in the tree.
Definition
pokemonbox.h:213
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, ...).
playerbasics.h
pokemonbox.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
projects
savefile
src
pse-savefile
expanded
daycare.h
Generated by
1.17.0