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

A warp-out point: a tile that warps the player to another map. More...

#include <mapdbentrywarpout.h>

Inheritance diagram for MapDBEntryWarpOut:
Collaboration diagram for MapDBEntryWarpOut:

Public Member Functions

int getX () const
 < Warp-out tile X.
int getY () const
int getWarp () const
const QString getMap () const
bool getGlitch () const
MapDBEntrygetToMap () const
MapDBEntrygetParent () const
MapDBEntryWarpIngetToWarp () const
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Protected Member Functions

 MapDBEntryWarpOut ()
 Empty entry.
 MapDBEntryWarpOut (const QJsonValue &data, MapDBEntry *const parent)
 Build from JSON under parent.
void deepLink ()
 Resolve the destination map + warp-in.
void qmlRegister () const
 Register with QML.

Protected Attributes

int x = 0
 Warp-out tile X.
int y = 0
 Warp-out tile Y.
int warp = 0
 Target warp-in index.
QString map = ""
 Destination map name.
bool glitch = false
 Glitch/unintended warp.
MapDBEntrytoMap = nullptr
 Resolved destination map (deepLink).
MapDBEntryparent = nullptr
 Owning map.
MapDBEntryWarpIntoWarp = nullptr
 Resolved destination warp-in (deepLink).

Friends

class MapDBEntry
class MapsDB
class MapDBEntryWarpIn

Detailed Description

A warp-out point: a tile that warps the player to another map.

As the note says, a warp-out can only target a "warp-in" point (warp index on map). deepLink() resolves toMap and toWarp. A leaf of MapDBEntry. See db.md.

See also
MapDBEntry (parent), MapDBEntryWarpIn, WarpData (the save-side warp).

Definition at line 37 of file mapdbentrywarpout.h.

Constructor & Destructor Documentation

◆ MapDBEntryWarpOut() [1/2]

MapDBEntryWarpOut::MapDBEntryWarpOut ( )
protected

Empty entry.

Definition at line 30 of file mapdbentrywarpout.cpp.

References qmlRegister().

◆ MapDBEntryWarpOut() [2/2]

MapDBEntryWarpOut::MapDBEntryWarpOut ( const QJsonValue & data,
MapDBEntry *const parent )
protected

Build from JSON under parent.

Definition at line 33 of file mapdbentrywarpout.cpp.

References glitch, map, MapDBEntry, parent, qmlRegister(), warp, x, and y.

Member Function Documentation

◆ deepLink()

void MapDBEntryWarpOut::deepLink ( )
protected

Resolve the destination map + warp-in.

Definition at line 44 of file mapdbentrywarpout.cpp.

References MapsDB::getInd(), MapsDB::inst(), map, MapDBEntryWarpIn, toMap, toWarp, and warp.

◆ getGlitch()

bool MapDBEntryWarpOut::getGlitch ( ) const
See also
getGlitch property.

Definition at line 103 of file mapdbentrywarpout.cpp.

References glitch.

◆ getMap()

const QString MapDBEntryWarpOut::getMap ( ) const
See also
getMap property.

Definition at line 108 of file mapdbentrywarpout.cpp.

References map.

◆ getParent()

MapDBEntry * MapDBEntryWarpOut::getParent ( ) const
See also
getParent property.

Definition at line 93 of file mapdbentrywarpout.cpp.

References MapDBEntry, and parent.

◆ getToMap()

MapDBEntry * MapDBEntryWarpOut::getToMap ( ) const
See also
getToMap property.

Definition at line 98 of file mapdbentrywarpout.cpp.

References MapDBEntry, and toMap.

Referenced by WarpData::load().

◆ getToWarp()

MapDBEntryWarpIn * MapDBEntryWarpOut::getToWarp ( ) const
See also
getToWarp property.

Definition at line 83 of file mapdbentrywarpout.cpp.

References MapDBEntryWarpIn, and toWarp.

◆ getWarp()

int MapDBEntryWarpOut::getWarp ( ) const
See also
getWarp property.

Definition at line 113 of file mapdbentrywarpout.cpp.

References warp.

Referenced by WarpData::load().

◆ getX()

int MapDBEntryWarpOut::getX ( ) const

< Warp-out tile X.

Warp-out tile Y. Target warp-in index on the destination map. Destination map name. Whether this warp is unintended (glitch). Resolved destination map. Owning map. Resolved destination warp-in.

See also
getX property.

Definition at line 123 of file mapdbentrywarpout.cpp.

References x.

Referenced by WarpData::load().

◆ getY()

int MapDBEntryWarpOut::getY ( ) const
See also
getY property.

Definition at line 118 of file mapdbentrywarpout.cpp.

References y.

Referenced by WarpData::load().

◆ qmlProtect()

void MapDBEntryWarpOut::qmlProtect ( const QQmlEngine *const engine) const

Pin to C++ ownership.

Definition at line 88 of file mapdbentrywarpout.cpp.

References Utility::qmlProtectUtil().

◆ qmlRegister()

void MapDBEntryWarpOut::qmlRegister ( ) const
protected

Register with QML.

Definition at line 72 of file mapdbentrywarpout.cpp.

Referenced by MapDBEntryWarpOut(), and MapDBEntryWarpOut().

◆ MapDBEntry

friend class MapDBEntry
friend

Definition at line 87 of file mapdbentrywarpout.h.

References MapDBEntry.

Referenced by getParent(), getToMap(), MapDBEntry, and MapDBEntryWarpOut().

◆ MapDBEntryWarpIn

friend class MapDBEntryWarpIn
friend

Definition at line 89 of file mapdbentrywarpout.h.

References MapDBEntryWarpIn.

Referenced by deepLink(), getToWarp(), and MapDBEntryWarpIn.

◆ MapsDB

friend class MapsDB
friend

Definition at line 88 of file mapdbentrywarpout.h.

References MapsDB.

Referenced by MapsDB.

Member Data Documentation

◆ glitch

bool MapDBEntryWarpOut::glitch = false
protected

Glitch/unintended warp.

Definition at line 78 of file mapdbentrywarpout.h.

Referenced by getGlitch(), and MapDBEntryWarpOut().

◆ map

QString MapDBEntryWarpOut::map = ""
protected

Destination map name.

Definition at line 75 of file mapdbentrywarpout.h.

Referenced by deepLink(), getMap(), and MapDBEntryWarpOut().

◆ parent

MapDBEntry* MapDBEntryWarpOut::parent = nullptr
protected

Owning map.

Definition at line 82 of file mapdbentrywarpout.h.

Referenced by getParent(), and MapDBEntryWarpOut().

◆ toMap

MapDBEntry* MapDBEntryWarpOut::toMap = nullptr
protected

Resolved destination map (deepLink).

Definition at line 81 of file mapdbentrywarpout.h.

Referenced by deepLink(), and getToMap().

◆ toWarp

MapDBEntryWarpIn* MapDBEntryWarpOut::toWarp = nullptr
protected

Resolved destination warp-in (deepLink).

Definition at line 85 of file mapdbentrywarpout.h.

Referenced by deepLink(), and getToWarp().

◆ warp

int MapDBEntryWarpOut::warp = 0
protected

Target warp-in index.

Definition at line 72 of file mapdbentrywarpout.h.

Referenced by deepLink(), getWarp(), and MapDBEntryWarpOut().

◆ x

int MapDBEntryWarpOut::x = 0
protected

Warp-out tile X.

Definition at line 68 of file mapdbentrywarpout.h.

Referenced by getX(), and MapDBEntryWarpOut().

◆ y

int MapDBEntryWarpOut::y = 0
protected

Warp-out tile Y.

Definition at line 69 of file mapdbentrywarpout.h.

Referenced by getY(), and MapDBEntryWarpOut().


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