|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The sprites database, keyed by name. More...
#include <sprites.h>
Public Member Functions | |
| const QVector< SpriteDBEntry * > | getStore () const |
| All sprites. | |
| const QHash< QString, SpriteDBEntry * > | getInd () const |
| Name->entry index. | |
| int | getStoreSize () const |
| Sprite count. | |
| SpriteDBEntry * | getStoreAt (int idx) const |
| Sprite by store index (for QML). | |
| SpriteDBEntry * | getIndAt (const QString &key) const |
| Sprite by name key (for QML). | |
| void | load () |
| Load sprites from JSON. | |
| void | index () |
| Build the name->entry index. | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
Static Public Member Functions | |
| static SpritesDB * | inst () |
| < Number of sprites. | |
The sprites database, keyed by name.
Standard DB-singleton with a name index (see CreditsDB / db.md).
|
nodiscard |
Name->entry index.
Definition at line 43 of file sprites.cpp.
| SpriteDBEntry * SpritesDB::getIndAt | ( | const QString & | key | ) | const |
Sprite by name key (for QML).
Definition at line 52 of file sprites.cpp.
Referenced by MapDBEntrySprite::deepLink(), SpriteSetDBEntry::deepLink(), and SpriteData::toSprite().
|
nodiscard |
| SpriteDBEntry * SpritesDB::getStoreAt | ( | int | idx | ) | const |
Sprite by store index (for QML).
Definition at line 46 of file sprites.cpp.
|
nodiscard |
Sprite count.
Definition at line 44 of file sprites.cpp.
| void SpritesDB::index | ( | ) |
Build the name->entry index.
Definition at line 67 of file sprites.cpp.
|
static |
< Number of sprites.
The process-wide SpritesDB singleton.
Definition at line 36 of file sprites.cpp.
Referenced by MapDBEntrySprite::deepLink(), SpriteSetDBEntry::deepLink(), DB::qmlProtect(), SpriteData::randomize(), DB::sprites(), and SpriteData::toSprite().
| void SpritesDB::load | ( | ) |
Load sprites from JSON.
Definition at line 57 of file sprites.cpp.
References GameData::inst(), and GameData::json().
| void SpritesDB::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 78 of file sprites.cpp.
References Utility::qmlProtectUtil().
Referenced by DB::qmlProtect().