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

One edge connection of the current map (the seam to a neighbouring map). More...

#include <mapconndata.h>

Inheritance diagram for MapConnData:
Collaboration diagram for MapConnData:

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

Detailed Description

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

See also
AreaMap / Area (the map state), MapDBEntryConnect (map-defined connection).

Definition at line 36 of file mapconndata.h.

Constructor & Destructor Documentation

◆ MapConnData()

MapConnData::MapConnData ( SaveFile * saveFile = nullptr,
var16 offset = 0 )

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

◆ ~MapConnData()

MapConnData::~MapConnData ( )
virtual

Definition at line 37 of file mapconndata.cpp.

Member Function Documentation

◆ load()

void MapConnData::load ( SaveFile * saveFile = nullptr,
var16 offset = 0 )

◆ loadFromData()

◆ mapPtrChanged()

protected::void MapConnData::mapPtrChanged ( )

Referenced by load(), loadFromData(), and reset().

◆ reset()

void MapConnData::reset ( )

◆ save()

void MapConnData::save ( SaveFile * saveFile,
var16 offset )

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.

◆ stripDstChanged()

void MapConnData::stripDstChanged ( )

Referenced by load(), loadFromData(), and reset().

◆ stripSrcChanged()

void MapConnData::stripSrcChanged ( )

Referenced by load(), loadFromData(), and reset().

◆ stripWidthChanged()

void MapConnData::stripWidthChanged ( )

Referenced by load(), loadFromData(), and reset().

◆ toMap()

MapDBEntry * MapConnData::toMap ( )

The connected map's DB entry.

Definition at line 145 of file mapconndata.cpp.

References MapsDB::getIndAt(), MapsDB::inst(), and mapPtr.

◆ viewPtrChanged()

void MapConnData::viewPtrChanged ( )

References reset().

Referenced by load(), loadFromData(), and reset().

◆ widthChanged()

void MapConnData::widthChanged ( )

Referenced by load(), loadFromData(), and reset().

◆ xAlignChanged()

void MapConnData::xAlignChanged ( )

Referenced by load(), loadFromData(), and reset().

◆ yAlignChanged()

void MapConnData::yAlignChanged ( )

Referenced by load(), loadFromData(), and reset().

Member Data Documentation

◆ mapPtr

int MapConnData::mapPtr
See also
mapPtr property.

Definition at line 73 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), save(), and toMap().

◆ stripDst

int MapConnData::stripDst
See also
stripDst property.

Definition at line 75 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), and save().

◆ stripSrc

int MapConnData::stripSrc
See also
stripSrc property.

Definition at line 74 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), and save().

◆ stripWidth

int MapConnData::stripWidth
See also
stripWidth property.

Definition at line 76 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), and save().

◆ viewPtr

int MapConnData::viewPtr
See also
viewPtr property.

Definition at line 80 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), and save().

◆ width

int MapConnData::width
See also
width property.

Definition at line 77 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), and save().

◆ xAlign

int MapConnData::xAlign
See also
xAlign property.

Definition at line 79 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), and save().

◆ yAlign

int MapConnData::yAlign
See also
yAlign property.

Definition at line 78 of file mapconndata.h.

Referenced by load(), loadFromData(), reset(), and save().


The documentation for this class was generated from the following files: