|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
One sign on the current map: its tile position and text id. More...
#include <signdata.h>
Public Member Functions | |
| SignData (SaveFile *saveFile=nullptr, var8 index=0) | |
| < Sign tile X. | |
| virtual | ~SignData () |
| void | load (SaveFile *saveFile=nullptr, var8 index=0) |
Expand sign index from the save. | |
| void | save (SaveFile *saveFile, var8 index) |
Flatten sign index to the save. | |
| protected::void | xChanged () |
| void | yChanged () |
| void | txtIdChanged () |
| void | reset () |
| Blank this sign. | |
| void | randomize (QVector< TmpSignPos * > *tmpPos=nullptr) |
Randomize position (avoiding tmpPos clashes). | |
| void | setTo (MapDBEntrySign *signData) |
| Copy values from a map-defined sign. | |
Static Public Member Functions | |
| static QVector< SignData * > | randomizeAll (QVector< MapDBEntrySign * > mapSigns) |
| Randomize a whole map's signs. | |
| static QVector< SignData * > | setToAll (QVector< MapDBEntrySign * > mapSigns) |
| Build signs from a map's sign list. | |
Public Attributes | |
| int | x |
| int | y |
| int | txtId |
One sign on the current map: its tile position and text id.
A small leaf in the area's sign list. Holds the sign's x / y tile coordinates and the txtId that selects which message it shows. Can be populated from map DB data (setTo / setToAll) or randomized, with ...All static helpers that operate over a whole map's worth of signs at once.
Definition at line 36 of file signdata.h.
< Sign tile X.
Sign tile Y. Text id shown when read.
Definition at line 35 of file signdata.cpp.
References load().
Referenced by randomizeAll(), and setToAll().
|
virtual |
Definition at line 40 of file signdata.cpp.
Expand sign index from the save.
Definition at line 42 of file signdata.cpp.
References SaveFile::iterator(), SaveFileIterator::offsetTo(), reset(), txtId, txtIdChanged(), x, xChanged(), y, and yChanged().
Referenced by SignData().
| void SignData::randomize | ( | QVector< TmpSignPos * > * | tmpPos = nullptr | ) |
Randomize position (avoiding tmpPos clashes).
Definition at line 151 of file signdata.cpp.
References Random::inst(), Random::rangeExclusive(), x, xChanged(), y, and yChanged().
Referenced by txtIdChanged().
|
static |
Randomize a whole map's signs.
Definition at line 87 of file signdata.cpp.
References SignData(), and TmpSignPos::x.
Referenced by AreaSign::randomize(), and txtIdChanged().
| void SignData::reset | ( | ) |
Blank this sign.
Definition at line 75 of file signdata.cpp.
References txtId, txtIdChanged(), x, xChanged(), y, and yChanged().
Referenced by load(), setTo(), and txtIdChanged().
Flatten sign index to the save.
Definition at line 63 of file signdata.cpp.
References SaveFile::iterator(), SaveFileIterator::offsetTo(), SaveFileIterator::setByte(), txtId, x, and y.
| void SignData::setTo | ( | MapDBEntrySign * | signData | ) |
Copy values from a map-defined sign.
Definition at line 118 of file signdata.cpp.
References MapDBEntrySign::getTextID(), MapDBEntrySign::getX(), MapDBEntrySign::getY(), reset(), txtId, txtIdChanged(), x, xChanged(), y, and yChanged().
Referenced by txtIdChanged().
|
static |
Build signs from a map's sign list.
Definition at line 135 of file signdata.cpp.
References SignData().
Referenced by AreaSign::setTo(), and txtIdChanged().
| void SignData::txtIdChanged | ( | ) |
References randomize(), randomizeAll(), reset(), setTo(), and setToAll().
| protected::void SignData::xChanged | ( | ) |
Referenced by load(), randomize(), reset(), and setTo().
| void SignData::yChanged | ( | ) |
Referenced by load(), randomize(), reset(), and setTo().
| int SignData::txtId |
| int SignData::x |
Definition at line 65 of file signdata.h.
Referenced by load(), randomize(), reset(), save(), and setTo().
| int SignData::y |
Definition at line 66 of file signdata.h.
Referenced by load(), randomize(), reset(), save(), and setTo().