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

One missable definition: a script/sprite that can be hidden or shown. More...

#include <missabledbentry.h>

Inheritance diagram for MissableDBEntry:
Collaboration diagram for MissableDBEntry:

Public Member Functions

const QString getName () const
 < Missable name.
int getInd () const
const QString getMap () const
int getSprite () const
bool getDefShow () const
MapDBEntrygetToMap () const
MapDBEntrySpritegetToMapSprite () const
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Protected Member Functions

 MissableDBEntry ()
 Empty entry (built by MissablesDB).
 MissableDBEntry (QJsonValue &data)
 Build from a JSON value.
void deepLink ()
 Resolve the map + map-sprite links.
void qmlRegister () const
 Register with QML.

Protected Attributes

QString name = ""
 Backing field (read via getName()).
int ind = 0
 Backing field (read via getInd()).
QString map = ""
 Backing field (read via getMap()).
int sprite = 0
 Backing field (read via getSprite()).
bool defShow = false
 Backing field (read via getDefShow()).
MapDBEntrytoMap = nullptr
 Resolved map (may be null; see note above).
MapDBEntrySpritetoMapSprite = nullptr
 Resolved map sprite (may be null; see note above).

Friends

class MissablesDB
 Owning DB constructs/populates entries.

Detailed Description

One missable definition: a script/sprite that can be hidden or shown.

QObject-getter style DB entry. A "missable" is the game's mechanism for hiding/showing things based on progress (see the explanation above). Each entry names the missable and links to the toMap / toMapSprite it controls (resolved in deepLink). defShow is its default visibility.

See also
MissablesDB, WorldMissables (the save-side flags), SpriteData::missableIndex.

Definition at line 51 of file missabledbentry.h.

Constructor & Destructor Documentation

◆ MissableDBEntry() [1/2]

MissableDBEntry::MissableDBEntry ( )
protected

Empty entry (built by MissablesDB).

Definition at line 35 of file missabledbentry.cpp.

References qmlRegister().

◆ MissableDBEntry() [2/2]

MissableDBEntry::MissableDBEntry ( QJsonValue & data)
protected

Build from a JSON value.

Definition at line 38 of file missabledbentry.cpp.

References defShow, ind, map, name, qmlRegister(), and sprite.

Member Function Documentation

◆ deepLink()

void MissableDBEntry::deepLink ( )
protected

Resolve the map + map-sprite links.

Definition at line 50 of file missabledbentry.cpp.

References MapsDB::getInd(), MapsDB::inst(), map, name, sprite, toMap, and toMapSprite.

◆ getDefShow()

bool MissableDBEntry::getDefShow ( ) const
See also
getDefShow property.

Definition at line 108 of file missabledbentry.cpp.

References defShow.

◆ getInd()

int MissableDBEntry::getInd ( ) const
See also
getInd property.

Definition at line 123 of file missabledbentry.cpp.

References ind.

◆ getMap()

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

Definition at line 118 of file missabledbentry.cpp.

References map.

◆ getName()

const QString MissableDBEntry::getName ( ) const

< Missable name.

Missable index (the bit it controls). Name of the map it's on. Sprite index on that map. Default visibility. Resolved map. Resolved map sprite.

See also
getName property.

Definition at line 128 of file missabledbentry.cpp.

References name.

◆ getSprite()

int MissableDBEntry::getSprite ( ) const
See also
getSprite property.

Definition at line 113 of file missabledbentry.cpp.

References sprite.

◆ getToMap()

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

Definition at line 103 of file missabledbentry.cpp.

References toMap.

◆ getToMapSprite()

MapDBEntrySprite * MissableDBEntry::getToMapSprite ( ) const
See also
getToMapSprite property.

Definition at line 93 of file missabledbentry.cpp.

References toMapSprite.

◆ qmlProtect()

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

Pin to C++ ownership.

Definition at line 98 of file missabledbentry.cpp.

References Utility::qmlProtectUtil().

◆ qmlRegister()

void MissableDBEntry::qmlRegister ( ) const
protected

Register with QML.

Definition at line 82 of file missabledbentry.cpp.

Referenced by MissableDBEntry(), and MissableDBEntry().

◆ MissablesDB

friend class MissablesDB
friend

Owning DB constructs/populates entries.

Definition at line 100 of file missabledbentry.h.

References MissablesDB.

Referenced by MissablesDB.

Member Data Documentation

◆ defShow

bool MissableDBEntry::defShow = false
protected

Backing field (read via getDefShow()).

Definition at line 88 of file missabledbentry.h.

Referenced by getDefShow(), and MissableDBEntry().

◆ ind

int MissableDBEntry::ind = 0
protected

Backing field (read via getInd()).

Definition at line 81 of file missabledbentry.h.

Referenced by getInd(), and MissableDBEntry().

◆ map

QString MissableDBEntry::map = ""
protected

Backing field (read via getMap()).

Definition at line 84 of file missabledbentry.h.

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

◆ name

QString MissableDBEntry::name = ""
protected

Backing field (read via getName()).

Definition at line 80 of file missabledbentry.h.

Referenced by deepLink(), getName(), and MissableDBEntry().

◆ sprite

int MissableDBEntry::sprite = 0
protected

Backing field (read via getSprite()).

Definition at line 85 of file missabledbentry.h.

Referenced by deepLink(), getSprite(), and MissableDBEntry().

◆ toMap

MapDBEntry* MissableDBEntry::toMap = nullptr
protected

Resolved map (may be null; see note above).

Definition at line 97 of file missabledbentry.h.

Referenced by deepLink(), and getToMap().

◆ toMapSprite

MapDBEntrySprite* MissableDBEntry::toMapSprite = nullptr
protected

Resolved map sprite (may be null; see note above).

Definition at line 98 of file missabledbentry.h.

Referenced by deepLink(), and getToMapSprite().


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