Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
Daycare Class Reference

The Day Care: at most one deposited Pokemon. More...

#include <daycare.h>

Inheritance diagram for Daycare:
Collaboration diagram for Daycare:

Public Member Functions

 Daycare (SaveFile *saveFile=nullptr)
 < The Pokemon left at the Day Care (may be empty).
virtual ~Daycare ()
void load (SaveFile *saveFile=nullptr)
 Expand the day-care mon from the save.
void save (SaveFile *saveFile)
 Flatten the day-care mon to the save.
protected::void pokemonChanged ()
void reset ()
 Empty the Day Care.
void randomize (PlayerBasics *basics)
 Put a random mon in the Day Care.

Public Attributes

PokemonBoxpokemon = nullptr

Detailed Description

The Day Care: at most one deposited Pokemon.

The simplest top-level region – a single pokemon slot (a PokemonBox) for the mon left at the Day Care. Standard expanded-node convention (see SaveFileExpanded); randomize() needs PlayerBasics for OT/trade context.

See also
SaveFileExpanded, PokemonBox, PlayerBasics.

Definition at line 41 of file daycare.h.

Constructor & Destructor Documentation

◆ Daycare()

Daycare::Daycare ( SaveFile * saveFile = nullptr)

< The Pokemon left at the Day Care (may be empty).

Definition at line 31 of file daycare.cpp.

References load().

◆ ~Daycare()

Daycare::~Daycare ( )
virtual

Definition at line 36 of file daycare.cpp.

References pokemon.

Member Function Documentation

◆ load()

void Daycare::load ( SaveFile * saveFile = nullptr)

Expand the day-care mon from the save.

Definition at line 47 of file daycare.cpp.

References pokemon, pokemonChanged(), reset(), and SaveFile::toolset.

Referenced by Daycare().

◆ pokemonChanged()

protected::void Daycare::pokemonChanged ( )

References randomize(), and reset().

Referenced by load(), randomize(), and reset().

◆ randomize()

void Daycare::randomize ( PlayerBasics * basics)

Put a random mon in the Day Care.

Definition at line 83 of file daycare.cpp.

References Random::inst(), pokemon, pokemonChanged(), and reset().

Referenced by pokemonChanged().

◆ reset()

void Daycare::reset ( )

Empty the Day Care.

Definition at line 73 of file daycare.cpp.

References pokemon, and pokemonChanged().

Referenced by load(), pokemonChanged(), and randomize().

◆ save()

void Daycare::save ( SaveFile * saveFile)

Flatten the day-care mon to the save.

Definition at line 63 of file daycare.cpp.

References pokemon, SaveFileToolset::setByte(), and SaveFile::toolset.

Member Data Documentation

◆ pokemon

PokemonBox* Daycare::pokemon = nullptr
See also
pokemon property.

Definition at line 62 of file daycare.h.

Referenced by load(), randomize(), reset(), save(), and ~Daycare().


The documentation for this class was generated from the following files:
  • projects/savefile/src/pse-savefile/expanded/daycare.h
  • projects/savefile/src/pse-savefile/expanded/daycare.cpp