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

A map sprite that is a plain NPC (type NPC). More...

#include <mapdbentryspritenpc.h>

Inheritance diagram for MapDBEntrySpriteNPC:
Collaboration diagram for MapDBEntrySpriteNPC:

Public Member Functions

virtual SpriteType type () const
 Returns NPC.
Public Member Functions inherited from MapDBEntrySprite
int adjustedX () const
int adjustedY () const
const QString getSprite () const
int getX () const
int getY () const
const QString getMove () const
int getText () const
int getRange () const
const QString getFace () const
int getMissable () const
MissableDBEntrygetToMissable () const
SpriteDBEntrygetToSprite () const
MapDBEntrygetParent () const
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Protected Member Functions

 MapDBEntrySpriteNPC (const QJsonValue &data, MapDBEntry *const parent)
 Build from JSON under parent.
virtual void qmlRegister () const
 Register with QML.
Protected Member Functions inherited from MapDBEntrySprite
 MapDBEntrySprite ()
 Empty entry.
 MapDBEntrySprite (const QJsonValue &data, MapDBEntry *const parent)
 Build from JSON under parent.
virtual void deepLink ()
 Resolve sprite/missable links.

Friends

class MapDBEntry

Additional Inherited Members

Public Types inherited from MapDBEntrySprite
enum  SpriteType {
  NPC , ITEM , POKEMON , TRAINER ,
  ERROR
}
 < X adjusted for Gen 1 placement. More...
Protected Attributes inherited from MapDBEntrySprite
QString sprite
 Sprite name (read via getSprite()).
int x = 0
 Raw X.
int y = 0
 Raw Y.
QString move = ""
 Movement mode (see note).
int text = -1
 Interaction text id.
int range = -1
 Wander range (exclusive with face).
QString face = ""
 Static facing (exclusive with range).
int missable = -1
 Missable index, or -1.
MissableDBEntrytoMissable = nullptr
 Resolved missable (deepLink).
SpriteDBEntrytoSprite = nullptr
 Resolved sprite picture (deepLink).
MapDBEntryparent = nullptr
 Owning map.

Detailed Description

A map sprite that is a plain NPC (type NPC).

Adds nothing beyond MapDBEntrySprite's common fields – a talking NPC is fully described by the base data. type() returns NPC. See db.md.

See also
MapDBEntrySprite (base).

Definition at line 31 of file mapdbentryspritenpc.h.

Constructor & Destructor Documentation

◆ MapDBEntrySpriteNPC()

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

Build from JSON under parent.

Definition at line 25 of file mapdbentryspritenpc.cpp.

References MapDBEntry, MapDBEntrySprite::MapDBEntrySprite(), MapDBEntrySprite::parent, and qmlRegister().

Member Function Documentation

◆ qmlRegister()

void MapDBEntrySpriteNPC::qmlRegister ( ) const
protectedvirtual

Register with QML.

Reimplemented from MapDBEntrySprite.

Definition at line 32 of file mapdbentryspritenpc.cpp.

Referenced by MapDBEntrySpriteNPC().

◆ type()

MapDBEntrySpriteNPC::SpriteType MapDBEntrySpriteNPC::type ( ) const
virtual

Returns NPC.

Reimplemented from MapDBEntrySprite.

Definition at line 43 of file mapdbentryspritenpc.cpp.

References MapDBEntrySprite::NPC.

◆ MapDBEntry

friend class MapDBEntry
friend

Definition at line 42 of file mapdbentryspritenpc.h.

References MapDBEntry.

Referenced by MapDBEntry, and MapDBEntrySpriteNPC().


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