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

One Hall of Fame record: the team that beat the Elite Four, in order. More...

#include <hofrecord.h>

Inheritance diagram for HoFRecord:
Collaboration diagram for HoFRecord:

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).
HoFPokemonpokemonAt (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.

Detailed Description

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.

See also
HoFPokemon (a slot), HallOfFame (the list of records).

Definition at line 36 of file hofrecord.h.

Constructor & Destructor Documentation

◆ HoFRecord()

HoFRecord::HoFRecord ( SaveFile * saveFile = nullptr,
var8 ind = 0 )
Parameters
indwhich Hall of Fame record (index into the save's HoF list).

Definition at line 30 of file hofrecord.cpp.

References load().

◆ ~HoFRecord()

HoFRecord::~HoFRecord ( )
virtual

Definition at line 35 of file hofrecord.cpp.

References pokemon.

Member Function Documentation

◆ load()

void HoFRecord::load ( SaveFile * saveFile = nullptr,
var8 ind = 0 )

Expand record ind from the save.

Definition at line 88 of file hofrecord.cpp.

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

Referenced by HoFRecord().

◆ pokemonAt()

HoFPokemon * HoFRecord::pokemonAt ( int ind)

Mon at ind (GC-protected return).

Definition at line 51 of file hofrecord.cpp.

References pokemon, and qmlCppOwned().

◆ pokemonChanged()

protected::void HoFRecord::pokemonChanged ( )

The record's mon list changed.

References randomize(), and reset().

Referenced by load(), pokemonNew(), pokemonRemove(), pokemonSwap(), randomize(), and reset().

◆ pokemonCount()

int HoFRecord::pokemonCount ( )

Mons in this record.

Definition at line 41 of file hofrecord.cpp.

References pokemon.

◆ pokemonMax()

int HoFRecord::pokemonMax ( )

Capacity (maxPokemon).

Definition at line 46 of file hofrecord.cpp.

References maxPokemon.

◆ pokemonNew()

void HoFRecord::pokemonNew ( )

Add a fresh mon.

Definition at line 79 of file hofrecord.cpp.

References maxPokemon, pokemon, and pokemonChanged().

◆ pokemonRemove()

void HoFRecord::pokemonRemove ( int ind)

Remove mon ind.

Definition at line 67 of file hofrecord.cpp.

References pokemon, and pokemonChanged().

◆ pokemonSwap()

void HoFRecord::pokemonSwap ( int from,
int to )

Reorder mons.

Definition at line 56 of file hofrecord.cpp.

References pokemon, and pokemonChanged().

◆ randomize()

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().

◆ reset()

void HoFRecord::reset ( )

Empty this record.

Definition at line 142 of file hofrecord.cpp.

References pokemon, and pokemonChanged().

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

◆ save()

void HoFRecord::save ( SaveFile * saveFile,
var8 ind )

Flatten record ind to the save.

Definition at line 119 of file hofrecord.cpp.

References pokemon, and SaveFile::toolset.

Member Data Documentation

◆ pokemon

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().


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