|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Holds contents of a single box set, basically a row or array of boxes each holding Pokemon. More...
#include <pokemonstorageset.h>
Public Member Functions | |
| PokemonStorageSet (SaveFile *saveFile=nullptr, var16 boxesOffset=0, svar8 skipInd=-1) | |
| virtual | ~PokemonStorageSet () |
| void | load (SaveFile *saveFile=nullptr, var16 boxesOffset=0, svar8 skipInd=-1) |
| Auto load or save boxes 1-6 from a single address and skip a box if it's the current box. | |
| void | save (SaveFile *saveFile, var16 boxesOffset, svar8 skipInd=-1) |
| Auto load or save boxes 1-6 from a single address and skip a box if it's the current box. | |
| void | loadSpecific (SaveFile *saveFile=nullptr, var16 offset=0, var8 toBox=0) |
Load a specific box at a specific address into box toBox, overwriting it. | |
| void | saveSpecific (SaveFile *saveFile=nullptr, var16 offset=0, var8 fromBox=0) |
Save box fromBox out to a specific address. | |
| PokemonStorageBox * | boxAt (int ind) |
Box at ind within this set. | |
| protected::void | boxesChanged () |
| Any box in the set changed. | |
| void | reset () |
| Empty all six boxes. | |
| void | randomize (PlayerBasics *basics) |
| Fill the set with constrained random mons. | |
Public Attributes | |
| PokemonStorageBox * | boxes [setMaxBoxes] |
| The six boxes (fixed-size; never grows/shrinks). | |
Holds contents of a single box set, basically a row or array of boxes each holding Pokemon.
One bank of six PC boxes.
The PC's storage is two of these sets (12 boxes total). The set knows how to load/save all six boxes from one base address, optionally skipping a box – because the "current box" is stored separately in the save, so when expanding a set we skip the slot that the live current-box occupies. loadSpecific()/ saveSpecific() move an individual box to/from a specific address.
Definition at line 45 of file pokemonstorageset.h.
| PokemonStorageSet::PokemonStorageSet | ( | SaveFile * | saveFile = nullptr, |
| var16 | boxesOffset = 0, | ||
| svar8 | skipInd = -1 ) |
| boxesOffset | base address of the six boxes; |
| skipInd | box to skip (-1 = none). |
Definition at line 31 of file pokemonstorageset.cpp.
References boxes, load(), and setMaxBoxes.
|
virtual |
Definition at line 39 of file pokemonstorageset.cpp.
References boxes, and setMaxBoxes.
| PokemonStorageBox * PokemonStorageSet::boxAt | ( | int | ind | ) |
| protected::void PokemonStorageSet::boxesChanged | ( | ) |
Any box in the set changed.
References randomize(), and reset().
| void PokemonStorageSet::load | ( | SaveFile * | saveFile = nullptr, |
| var16 | boxesOffset = 0, | ||
| svar8 | skipInd = -1 ) |
Auto load or save boxes 1-6 from a single address and skip a box if it's the current box.
Definition at line 45 of file pokemonstorageset.cpp.
References boxes, reset(), and setMaxBoxes.
Referenced by PokemonStorageSet().
| void PokemonStorageSet::loadSpecific | ( | SaveFile * | saveFile = nullptr, |
| var16 | offset = 0, | ||
| var8 | toBox = 0 ) |
Load a specific box at a specific address into box toBox, overwriting it.
Definition at line 96 of file pokemonstorageset.cpp.
References boxes.
| void PokemonStorageSet::randomize | ( | PlayerBasics * | basics | ) |
Fill the set with constrained random mons.
Definition at line 88 of file pokemonstorageset.cpp.
References boxes, randomize(), reset(), and setMaxBoxes.
Referenced by boxesChanged(), and randomize().
| void PokemonStorageSet::reset | ( | ) |
Empty all six boxes.
Definition at line 82 of file pokemonstorageset.cpp.
References boxes, reset(), and setMaxBoxes.
Referenced by boxesChanged(), load(), randomize(), and reset().
Auto load or save boxes 1-6 from a single address and skip a box if it's the current box.
Definition at line 66 of file pokemonstorageset.cpp.
References boxes, and setMaxBoxes.
| void PokemonStorageSet::saveSpecific | ( | SaveFile * | saveFile = nullptr, |
| var16 | offset = 0, | ||
| var8 | fromBox = 0 ) |
Save box fromBox out to a specific address.
Definition at line 103 of file pokemonstorageset.cpp.
References boxes.
| PokemonStorageBox* PokemonStorageSet::boxes[setMaxBoxes] |
The six boxes (fixed-size; never grows/shrinks).
Definition at line 76 of file pokemonstorageset.h.
Referenced by boxAt(), load(), loadSpecific(), PokemonStorageSet(), randomize(), reset(), save(), saveSpecific(), and ~PokemonStorageSet().