|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
One Hall of Fame record: the team that beat the Elite Four, in order. More...
#include <hofrecord.h>
Public Member Functions | |
| HoFRecord (SaveFile *saveFile=nullptr, var8 ind=0) | |
| virtual | ~HoFRecord () |
| void | load (SaveFile *saveFile=nullptr, var8 ind=0) |
Expand record ind from the save. | |
| void | save (SaveFile *saveFile, var8 ind) |
Flatten record ind to the save. | |
| int | pokemonCount () |
| Mons in this record. | |
| int | pokemonMax () |
| Capacity (maxPokemon). | |
| HoFPokemon * | pokemonAt (int ind) |
Mon at ind (GC-protected return). | |
| void | pokemonSwap (int from, int to) |
| Reorder mons. | |
| void | pokemonRemove (int ind) |
Remove mon ind. | |
| void | pokemonNew () |
| Add a fresh mon. | |
| protected::void | pokemonChanged () |
| The record's mon list changed. | |
| void | reset () |
| Empty this record. | |
| void | randomize () |
| Fill with random mons. | |
Public Attributes | |
| QVector< HoFPokemon * > | pokemon |
| The recorded team. | |
One Hall of Fame record: the team that beat the Elite Four, in order.
Holds up to maxPokemon HoFPokemon snapshots. The save keeps a rolling list of these records; this is a single entry, addressed by ind. Provides QML-callable add/remove/swap/access over its mons.
Definition at line 36 of file hofrecord.h.
| ind | which Hall of Fame record (index into the save's HoF list). |
Definition at line 30 of file hofrecord.cpp.
References load().
|
virtual |
Definition at line 35 of file hofrecord.cpp.
References pokemon.
Expand record ind from the save.
Definition at line 88 of file hofrecord.cpp.
References pokemon, pokemonChanged(), reset(), and SaveFile::toolset.
Referenced by HoFRecord().
| HoFPokemon * HoFRecord::pokemonAt | ( | int | ind | ) |
Mon at ind (GC-protected return).
Definition at line 51 of file hofrecord.cpp.
References pokemon, and qmlCppOwned().
| protected::void HoFRecord::pokemonChanged | ( | ) |
The record's mon list changed.
References randomize(), and reset().
Referenced by load(), pokemonNew(), pokemonRemove(), pokemonSwap(), randomize(), and reset().
| int HoFRecord::pokemonCount | ( | ) |
| int HoFRecord::pokemonMax | ( | ) |
| void HoFRecord::pokemonNew | ( | ) |
Add a fresh mon.
Definition at line 79 of file hofrecord.cpp.
References maxPokemon, pokemon, and pokemonChanged().
| void HoFRecord::pokemonRemove | ( | int | ind | ) |
Remove mon ind.
Definition at line 67 of file hofrecord.cpp.
References pokemon, and pokemonChanged().
| void HoFRecord::pokemonSwap | ( | int | from, |
| int | to ) |
Reorder mons.
Definition at line 56 of file hofrecord.cpp.
References pokemon, and pokemonChanged().
| void HoFRecord::randomize | ( | ) |
Fill with random mons.
Definition at line 151 of file hofrecord.cpp.
References Random::inst(), pokemon, pokemonChanged(), Random::rangeInclusive(), and reset().
Referenced by pokemonChanged().
| void HoFRecord::reset | ( | ) |
Empty this record.
Definition at line 142 of file hofrecord.cpp.
References pokemon, and pokemonChanged().
Referenced by load(), pokemonChanged(), and randomize().
Flatten record ind to the save.
Definition at line 119 of file hofrecord.cpp.
References pokemon, and SaveFile::toolset.
| QVector<HoFPokemon*> HoFRecord::pokemon |
The recorded team.
Definition at line 63 of file hofrecord.h.
Referenced by load(), pokemonAt(), pokemonCount(), pokemonNew(), pokemonRemove(), pokemonSwap(), randomize(), reset(), save(), and ~HoFRecord().