|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
"Visited" flags for towns – which fly destinations are unlocked. More...
#include <worldtowns.h>
Public Member Functions | |
| WorldTowns (SaveFile *saveFile=nullptr) | |
| virtual | ~WorldTowns () |
| void | load (SaveFile *saveFile=nullptr) |
| Expand the visited-town flags from the save. | |
| void | save (SaveFile *saveFile) |
| Flatten the visited-town flags to the save. | |
| int | townsCount () |
| Number of town flags (townCount). | |
| bool | townsAt (int ind) |
Is town ind visited (fly-unlocked)? | |
| void | townsSet (int ind, bool val) |
Set/clear visited for town ind. | |
| protected::void | visitedTownsChanged () |
| void | reset () |
| Clear all visited flags. | |
| void | randomize () |
| Randomize the visited flags. | |
Public Attributes | |
| bool | visitedTowns [townCount] |
| Per-town visited (fly-unlocked) flags. | |
"Visited" flags for towns – which fly destinations are unlocked.
A visitedTowns bool array of townCount flags; setting one unlocks that town as a Fly destination. QML count/at/set access. Standard expanded-node convention (see SaveFileExpanded).
Definition at line 35 of file worldtowns.h.
| WorldTowns::WorldTowns | ( | SaveFile * | saveFile = nullptr | ) |
Definition at line 32 of file worldtowns.cpp.
References load().
|
virtual |
Definition at line 37 of file worldtowns.cpp.
| void WorldTowns::load | ( | SaveFile * | saveFile = nullptr | ) |
Expand the visited-town flags from the save.
Definition at line 39 of file worldtowns.cpp.
References SaveFileToolset::getBitField(), reset(), SaveFile::toolset, townByteCount, townCount, visitedTowns, and visitedTownsChanged().
Referenced by WorldTowns().
| void WorldTowns::randomize | ( | ) |
Randomize the visited flags.
Definition at line 90 of file worldtowns.cpp.
References Random::chanceSuccess(), Random::inst(), reset(), visitedTowns, and visitedTownsChanged().
Referenced by visitedTownsChanged().
| void WorldTowns::reset | ( | ) |
Clear all visited flags.
Definition at line 84 of file worldtowns.cpp.
References townCount, visitedTowns, and visitedTownsChanged().
Referenced by load(), randomize(), and visitedTownsChanged().
| void WorldTowns::save | ( | SaveFile * | saveFile | ) |
Flatten the visited-town flags to the save.
Definition at line 56 of file worldtowns.cpp.
References SaveFileToolset::setBitField(), SaveFile::toolset, townByteCount, townCount, and visitedTowns.
| bool WorldTowns::townsAt | ( | int | ind | ) |
Is town ind visited (fly-unlocked)?
Definition at line 73 of file worldtowns.cpp.
References visitedTowns.
| int WorldTowns::townsCount | ( | ) |
Number of town flags (townCount).
Definition at line 68 of file worldtowns.cpp.
References townCount.
| void WorldTowns::townsSet | ( | int | ind, |
| bool | val ) |
Set/clear visited for town ind.
Definition at line 78 of file worldtowns.cpp.
References visitedTowns, and visitedTownsChanged().
| protected::void WorldTowns::visitedTownsChanged | ( | ) |
References randomize(), and reset().
Referenced by load(), randomize(), reset(), and townsSet().
| bool WorldTowns::visitedTowns[townCount] |
Per-town visited (fly-unlocked) flags.
Definition at line 58 of file worldtowns.h.
Referenced by load(), randomize(), reset(), save(), townsAt(), and townsSet().