|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
One warp point on the current map: its tile and where it leads. More...
#include <warpdata.h>
Public Member Functions | |
| WarpData (SaveFile *saveFile=nullptr, var8 index=0) | |
| < Warp tile Y. | |
| WarpData (MapDBEntryWarpOut *warp) | |
| From a map-defined warp. | |
| virtual | ~WarpData () |
| void | load (SaveFile *saveFile=nullptr, var8 index=0) |
Expand warp index from the save. | |
| void | load (MapDBEntryWarpOut *warp) |
| Populate from a map-defined warp. | |
| void | save (SaveFile *saveFile, var8 index) |
Flatten warp index to the save. | |
| MapDBEntry * | toMap () |
| The destination map's DB entry. | |
| protected::void | yChanged () |
| void | xChanged () |
| void | destWarpChanged () |
| void | destMapChanged () |
| void | reset () |
| Blank this warp. | |
| void | randomize () |
| Randomize this warp. | |
Public Attributes | |
| int | y |
| int | x |
| int | destWarp |
| int | destMap |
One warp point on the current map: its tile and where it leads.
Holds the warp's x / y tile position and its destination (destMap + destWarp index on that map). Can be built from the save or from a map DB warp definition. toMap() resolves the destination to its map entry.
Definition at line 35 of file warpdata.h.
< Warp tile Y.
Warp tile X. Destination warp index on the target map. Destination map id. From the save at warp index.
Definition at line 33 of file warpdata.cpp.
References load().
| WarpData::WarpData | ( | MapDBEntryWarpOut * | warp | ) |
|
virtual |
Definition at line 43 of file warpdata.cpp.
| void WarpData::destMapChanged | ( | ) |
References randomize(), and reset().
Referenced by load(), load(), randomize(), and reset().
| void WarpData::destWarpChanged | ( | ) |
Referenced by load(), load(), randomize(), and reset().
| void WarpData::load | ( | MapDBEntryWarpOut * | warp | ) |
Populate from a map-defined warp.
Definition at line 69 of file warpdata.cpp.
References destMap, destMapChanged(), destWarp, destWarpChanged(), MapDBEntry::getInd(), MapDBEntryWarpOut::getToMap(), MapDBEntryWarpOut::getWarp(), MapDBEntryWarpOut::getX(), MapDBEntryWarpOut::getY(), x, xChanged(), y, and yChanged().
Expand warp index from the save.
Definition at line 45 of file warpdata.cpp.
References destMap, destMapChanged(), destWarp, destWarpChanged(), SaveFile::iterator(), SaveFileIterator::offsetTo(), reset(), x, xChanged(), y, and yChanged().
Referenced by WarpData(), and WarpData().
| void WarpData::randomize | ( | ) |
Randomize this warp.
Definition at line 111 of file warpdata.cpp.
References destMap, destMapChanged(), destWarp, destWarpChanged(), MapsDB::inst(), Random::inst(), Random::rangeExclusive(), reset(), MapsDB::search(), x, xChanged(), y, and yChanged().
Referenced by destMapChanged().
| void WarpData::reset | ( | ) |
Blank this warp.
Definition at line 96 of file warpdata.cpp.
References destMap, destMapChanged(), destWarp, destWarpChanged(), x, xChanged(), y, and yChanged().
Referenced by destMapChanged(), load(), and randomize().
Flatten warp index to the save.
Definition at line 84 of file warpdata.cpp.
References destMap, destWarp, SaveFile::iterator(), SaveFileIterator::offsetTo(), SaveFileIterator::setByte(), x, and y.
| MapDBEntry * WarpData::toMap | ( | ) |
The destination map's DB entry.
Definition at line 134 of file warpdata.cpp.
References destMap, MapsDB::getIndAt(), and MapsDB::inst().
| void WarpData::xChanged | ( | ) |
Referenced by load(), load(), randomize(), and reset().
| protected::void WarpData::yChanged | ( | ) |
Referenced by load(), load(), randomize(), and reset().
| int WarpData::destMap |
Definition at line 69 of file warpdata.h.
Referenced by load(), load(), randomize(), reset(), save(), and toMap().
| int WarpData::destWarp |
Definition at line 68 of file warpdata.h.
Referenced by load(), load(), randomize(), reset(), and save().
| int WarpData::x |
Definition at line 67 of file warpdata.h.
Referenced by load(), load(), randomize(), reset(), and save().
| int WarpData::y |
Definition at line 66 of file warpdata.h.
Referenced by load(), load(), randomize(), reset(), and save().