The trainer's headline values: name, ID, money, coins, badges, starter.
A single Pokemon record – the most property-rich object in the tree.
bool isParty
True if this box is actually the party (affects record format).
void pokemonChanged()
Box contents changed.
virtual void randomize(PlayerBasics *basics)
Fill with constrained random mons.
int pokemonMax()
Capacity (maxSize).
virtual void pokemonNew()
Add a fresh mon.
void pokemonInsertChange()
A mon was inserted.
virtual void load(SaveFile *saveFile=nullptr, var16 boxOffset=0)
Expand the box from the save.
virtual bool relocateOne(PokemonStorageBox *dst, int ind)
Move one mon into dst.
QVector< PokemonBox * > pokemon
The stored mons.
void pokemonResetChange()
The box was reset.
virtual void save(SaveFile *saveFile, var16 boxOffset=0)
Flatten the box to the save.
void pokemonMoveChange(int from, int to)
A mon moved slot.
void reset()
Empty the box.
SaveFile * file
Owning save.
bool pokemonMove(int from, int to)
Reorder a mon within the box.
bool relocateAll(PokemonStorageBox *dst)
Move every mon into dst.
bool isFull()
At capacity.
int pokemonCount()
Number of mons present.
PokemonStorageBox(int maxSize=boxMaxPokemon, SaveFile *saveFile=nullptr, var16 boxOffset=0)
< How many mons are in the box.
PokemonBox * pokemonAt(int ind)
Mon at ind (GC-protected return).
void pokemonRemove(int ind)
Remove the mon at ind.
void pokemonRemoveChange(int ind)
A mon was removed.
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Project-wide fixed-width integer aliases (var8, var16, ...).
var8e var8
Everyday 8-bit alias. Exact (not "fastest") to dodge the pointer-width bug noted above.
var16e var16
Everyday 16-bit alias. Exact width to avoid the "fastest" widening bug.
constexpr var8 boxMaxPokemon
Capacity of a single PC box.
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.