A container of Items – either the trainer's bag or a PC item box.
The trainer's headline values: name, ID, money, coins, badges, starter.
A single Pokemon record – the most property-rich object in the tree.
Holds contents of a single Pokemon storage box.
Holds contents of a single box set, basically a row or array of boxes each holding Pokemon.
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
int boxCount()
Total boxes across both sets (12).
Storage(SaveFile *saveFile=nullptr)
< The PC item box.
void randomizeItems()
Randomize just the PC items.
PokemonStorageSet * pokemon[maxPokemonStorageSets]
The two box sets (6 boxes each).
void reset()
Blank the whole PC.
void randomize(PlayerBasics *basics)
Randomize items and Pokemon.
PokemonStorageBox * freeSpace()
First box with room, or null if all full.
void save(SaveFile *saveFile)
Flatten the PC back to the save.
void load(SaveFile *saveFile=nullptr)
Expand the PC (items + both box sets) from the save.
void randomizePokemon(PlayerBasics *basics)
Randomize just the boxed Pokemon.
void boxesFormattedChanged()
PokemonStorageBox * boxAt(int ind)
Box ind in the flattened 0..11 space (GC-protected return).
protected::void itemsChanged()
bool depositPokemon(PokemonBox *pokemon)
Put pokemon in the first box with space.
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.
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.
constexpr var8 maxPokemonBoxes
Total PC boxes (12).
constexpr var8 maxPokemonStorageSets
PC Pokemon-box banks (2 sets).