|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
One edge connection of the current map (the seam to a neighbouring map). More...
#include <mapconndata.h>
Public Member Functions | |
| MapConnData (SaveFile *saveFile=nullptr, var16 offset=0) | |
| < Pointer to the connected map's data. | |
| virtual | ~MapConnData () |
| void | load (SaveFile *saveFile=nullptr, var16 offset=0) |
| Expand a connection block from the save. | |
| void | save (SaveFile *saveFile, var16 offset) |
| Flatten a connection block to the save. | |
| void | loadFromData (MapDBEntryConnect *connect) |
| Populate from a map-defined connection. | |
| MapDBEntry * | toMap () |
| The connected map's DB entry. | |
| protected::void | mapPtrChanged () |
| void | stripSrcChanged () |
| void | stripDstChanged () |
| void | stripWidthChanged () |
| void | widthChanged () |
| void | yAlignChanged () |
| void | xAlignChanged () |
| void | viewPtrChanged () |
| void | reset () |
| Blank this connection. | |
Public Attributes | |
| int | mapPtr |
| int | stripSrc |
| int | stripDst |
| int | stripWidth |
| int | width |
| int | yAlign |
| int | xAlign |
| int | viewPtr |
One edge connection of the current map (the seam to a neighbouring map).
Gen 1 maps stitch together at their edges; each connection records the neighbouring map pointer, the source/destination strips, width, and alignment offsets, plus the view pointer. These are low-level layout values mirrored from the game's connection block. Can be populated from the save or from a map DB connection (loadFromData).
Definition at line 36 of file mapconndata.h.
< Pointer to the connected map's data.
Source strip pointer. Destination strip pointer. Strip width. Connected map width. Vertical alignment offset. Horizontal alignment offset. View pointer.
Definition at line 32 of file mapconndata.cpp.
References load().
|
virtual |
Definition at line 37 of file mapconndata.cpp.
Expand a connection block from the save.
Definition at line 39 of file mapconndata.cpp.
References SaveFile::iterator(), mapPtr, mapPtrChanged(), SaveFileIterator::offsetTo(), reset(), stripDst, stripDstChanged(), stripSrc, stripSrcChanged(), stripWidth, stripWidthChanged(), viewPtr, viewPtrChanged(), width, widthChanged(), xAlign, xAlignChanged(), yAlign, and yAlignChanged().
Referenced by MapConnData().
| void MapConnData::loadFromData | ( | MapDBEntryConnect * | connect | ) |
Populate from a map-defined connection.
Definition at line 119 of file mapconndata.cpp.
References MapDBEntry::getInd(), MapDBEntryConnect::getToMap(), MapDBEntry::getWidth(), MapDBEntryConnect::mapPos(), mapPtr, mapPtrChanged(), stripDst, stripDstChanged(), MapDBEntryConnect::stripLocation(), MapDBEntryConnect::stripSize(), stripSrc, stripSrcChanged(), stripWidth, stripWidthChanged(), viewPtr, viewPtrChanged(), width, widthChanged(), MapDBEntryConnect::window(), xAlign, MapDBEntryConnect::xAlign(), xAlignChanged(), yAlign, MapDBEntryConnect::yAlign(), and yAlignChanged().
Referenced by AreaMap::randomize().
| protected::void MapConnData::mapPtrChanged | ( | ) |
Referenced by load(), loadFromData(), and reset().
| void MapConnData::reset | ( | ) |
Blank this connection.
Definition at line 92 of file mapconndata.cpp.
References mapPtr, mapPtrChanged(), stripDst, stripDstChanged(), stripSrc, stripSrcChanged(), stripWidth, stripWidthChanged(), viewPtr, viewPtrChanged(), width, widthChanged(), xAlign, xAlignChanged(), yAlign, and yAlignChanged().
Referenced by load(), and viewPtrChanged().
Flatten a connection block to the save.
Definition at line 76 of file mapconndata.cpp.
References SaveFile::iterator(), mapPtr, SaveFileIterator::offsetTo(), SaveFileIterator::setByte(), stripDst, stripSrc, stripWidth, viewPtr, width, xAlign, and yAlign.
| void MapConnData::stripDstChanged | ( | ) |
Referenced by load(), loadFromData(), and reset().
| void MapConnData::stripSrcChanged | ( | ) |
Referenced by load(), loadFromData(), and reset().
| void MapConnData::stripWidthChanged | ( | ) |
Referenced by load(), loadFromData(), and reset().
| MapDBEntry * MapConnData::toMap | ( | ) |
The connected map's DB entry.
Definition at line 145 of file mapconndata.cpp.
References MapsDB::getIndAt(), MapsDB::inst(), and mapPtr.
| void MapConnData::viewPtrChanged | ( | ) |
References reset().
Referenced by load(), loadFromData(), and reset().
| void MapConnData::widthChanged | ( | ) |
Referenced by load(), loadFromData(), and reset().
| void MapConnData::xAlignChanged | ( | ) |
Referenced by load(), loadFromData(), and reset().
| void MapConnData::yAlignChanged | ( | ) |
Referenced by load(), loadFromData(), and reset().
| int MapConnData::mapPtr |
Definition at line 73 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), save(), and toMap().
| int MapConnData::stripDst |
Definition at line 75 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), and save().
| int MapConnData::stripSrc |
Definition at line 74 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), and save().
| int MapConnData::stripWidth |
Definition at line 76 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), and save().
| int MapConnData::viewPtr |
Definition at line 80 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), and save().
| int MapConnData::width |
Definition at line 77 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), and save().
| int MapConnData::xAlign |
Definition at line 79 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), and save().
| int MapConnData::yAlign |
Definition at line 78 of file mapconndata.h.
Referenced by load(), loadFromData(), reset(), and save().