|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The JSON asset loader – the raw data source behind every database. More...
#include <gamedata.h>
Public Member Functions | |
| const QByteArray | jsonRaw (const QString filename) const |
Raw bytes of filename (no .json extension). | |
| const QJsonDocument | json (const QString filename) const |
Parsed document for filename. | |
| const QString | jsonStr (const QString filename) const |
filename as a string (for QML). | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
Static Public Member Functions | |
| static GameData * | inst () |
| The process-wide GameData singleton. | |
The JSON asset loader – the raw data source behind every database.
A singleton that reads the bundled /assets/data/.json files from disk. Each DB's load() calls into this to get its document. Exposed to QML as db.json.
Definition at line 35 of file gamedata.h.
|
static |
The process-wide GameData singleton.
Definition at line 71 of file gamedata.cpp.
Referenced by DB::json(), AbstractHiddenItemDB::load(), AbstractRandomString::load(), CreditsDB::load(), EventPokemonDB::load(), EventsDB::load(), FlyDB::load(), FontsDB::load(), GameCornerDB::load(), ItemsDB::load(), MapsDB::load(), MissablesDB::load(), MovesDB::load(), MusicDB::load(), PokemonDB::load(), ScriptsDB::load(), SpritesDB::load(), SpriteSetDB::load(), StarterPokemonDB::load(), TilesetDB::load(), TmHmsDB::load(), TradesDB::load(), TrainersDB::load(), TypesDB::load(), and DB::qmlProtect().
| const QJsonDocument GameData::json | ( | const QString | filename | ) | const |
Parsed document for filename.
Definition at line 45 of file gamedata.cpp.
References jsonRaw().
Referenced by AbstractHiddenItemDB::load(), AbstractRandomString::load(), CreditsDB::load(), EventPokemonDB::load(), EventsDB::load(), FlyDB::load(), FontsDB::load(), GameCornerDB::load(), ItemsDB::load(), MapsDB::load(), MissablesDB::load(), MovesDB::load(), MusicDB::load(), PokemonDB::load(), ScriptsDB::load(), SpritesDB::load(), SpriteSetDB::load(), StarterPokemonDB::load(), TilesetDB::load(), TmHmsDB::load(), TradesDB::load(), TrainersDB::load(), and TypesDB::load().
| const QByteArray GameData::jsonRaw | ( | const QString | filename | ) | const |
Raw bytes of filename (no .json extension).
Definition at line 29 of file gamedata.cpp.
| const QString GameData::jsonStr | ( | const QString | filename | ) | const |
| void GameData::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 56 of file gamedata.cpp.
References Utility::qmlProtectUtil().
Referenced by DB::qmlProtect().