|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
A chainable filter ("finder") over the maps – the heart of map randomization. More...
#include <mapsearch.h>
Public Member Functions | |
| MapSearch () | |
| Start with all maps in the result set. | |
| MapDBEntry * | pickRandom () |
A random map from the current results (backs pickRandom). | |
| MapSearch * | startOver () |
Reset to all maps. Returns this. | |
| MapSearch * | notNamed (QString val) |
Drop the map named val. | |
| MapSearch * | indexLt (int val) |
Keep maps with index < val. | |
| MapSearch * | indexGt (int val) |
Keep maps with index > val. | |
| MapSearch * | widthGt (int val) |
Keep maps wider than val. | |
| MapSearch * | widthLt (int val) |
Keep maps narrower than val. | |
| MapSearch * | heightGt (int val) |
Keep maps taller than val. | |
| MapSearch * | heightLt (int val) |
Keep maps shorter than val. | |
| MapSearch * | areaGt (int val) |
Keep maps with area > val. | |
| MapSearch * | areaLt (int val) |
Keep maps with area < val. | |
| MapSearch * | hasTileset (QString val) |
Keep maps using tileset val. | |
| MapSearch * | notTileset (QString val) |
Drop maps using tileset val. | |
| MapSearch * | isType (QString val) |
Keep maps of tileset-type val. | |
| MapSearch * | notType (QString val) |
Drop maps of tileset-type val. | |
| MapSearch * | hasConnections () |
| MapSearch * | noConnections () |
| MapSearch * | hasWarpsOut () |
| MapSearch * | noWarpsOut () |
| MapSearch * | hasWarpsIn () |
| MapSearch * | noWarpsIn () |
| MapSearch * | hasSigns () |
| MapSearch * | noSigns () |
| MapSearch * | hasSprites () |
| MapSearch * | noSprites () |
| MapSearch * | hasSpriteSet () |
| MapSearch * | noSpriteSet () |
| MapSearch * | hasDynamicSpriteSet () |
| MapSearch * | noDynamicSpriteSet () |
| MapSearch * | hasMons () |
| MapSearch * | noMons () |
| MapSearch * | isIncomplete () |
| MapSearch * | notIncomplete () |
| MapSearch * | isGlitch () |
| MapSearch * | notGlitch () |
| MapSearch * | isSpsecial () |
| MapSearch * | notSpecial () |
| MapSearch * | isGood () |
| Keep only "good" maps (criteria listed above). | |
| MapSearch * | isNotBad () |
| The complement helper used by isGood(). | |
| MapSearch * | isCity () |
| MapSearch * | notCity () |
| const QVector< MapDBEntry * > | getMaps () const |
| The current result set. | |
| int | getMapCount () const |
Result count (backs mapCount). | |
| const MapDBEntry * | mapAt (const int ind) const |
Result ind (for QML). | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
A chainable filter ("finder") over the maps – the heart of map randomization.
Obtained from MapsDB (search()/searchRaw()). Starts with every map in results and narrows them with chainable predicates; each returns this for fluent chaining. Two flavours of predicate:
pickRandom() returns a random map from the current results – the primary tool the "place player on any valid map" feature uses (typically after isGood()).
Definition at line 41 of file mapsearch.h.
| MapSearch::MapSearch | ( | ) |
Start with all maps in the result set.
Definition at line 35 of file mapsearch.cpp.
References startOver().
Referenced by areaGt(), areaLt(), hasConnections(), hasDynamicSpriteSet(), hasMons(), hasSigns(), hasSprites(), hasSpriteSet(), hasTileset(), hasWarpsIn(), hasWarpsOut(), heightGt(), heightLt(), indexGt(), indexLt(), isCity(), isGlitch(), isGood(), isIncomplete(), isNotBad(), isSpsecial(), isType(), noConnections(), noDynamicSpriteSet(), noMons(), noSigns(), noSprites(), noSpriteSet(), notCity(), notGlitch(), notIncomplete(), notNamed(), notSpecial(), notTileset(), notType(), noWarpsIn(), noWarpsOut(), startOver(), widthGt(), and widthLt().
| MapSearch * MapSearch::areaGt | ( | int | val | ) |
| MapSearch * MapSearch::areaLt | ( | int | val | ) |
| int MapSearch::getMapCount | ( | ) | const |
Result count (backs mapCount).
Definition at line 430 of file mapsearch.cpp.
Referenced by isNotBad().
| const QVector< MapDBEntry * > MapSearch::getMaps | ( | ) | const |
| MapSearch * MapSearch::hasConnections | ( | ) |
Definition at line 199 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::hasDynamicSpriteSet | ( | ) |
Definition at line 310 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::hasMons | ( | ) |
| MapSearch * MapSearch::hasSigns | ( | ) |
| MapSearch * MapSearch::hasSprites | ( | ) |
| MapSearch * MapSearch::hasSpriteSet | ( | ) |
Definition at line 289 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::hasTileset | ( | QString | val | ) |
| MapSearch * MapSearch::hasWarpsIn | ( | ) |
Definition at line 235 of file mapsearch.cpp.
References MapSearch().
Referenced by isGood().
| MapSearch * MapSearch::hasWarpsOut | ( | ) |
Definition at line 217 of file mapsearch.cpp.
References MapSearch().
Referenced by isGood().
| MapSearch * MapSearch::heightGt | ( | int | val | ) |
| MapSearch * MapSearch::heightLt | ( | int | val | ) |
| MapSearch * MapSearch::indexGt | ( | int | val | ) |
Keep maps with index > val.
Definition at line 81 of file mapsearch.cpp.
References MapSearch().
Referenced by notCity().
| MapSearch * MapSearch::indexLt | ( | int | val | ) |
Keep maps with index < val.
Definition at line 72 of file mapsearch.cpp.
References MapSearch().
Referenced by isCity().
| MapSearch * MapSearch::isCity | ( | ) |
Definition at line 415 of file mapsearch.cpp.
References indexLt(), and MapSearch().
Referenced by isNotBad().
| MapSearch * MapSearch::isGlitch | ( | ) |
| MapSearch * MapSearch::isGood | ( | ) |
Keep only "good" maps (criteria listed above).
Definition at line 409 of file mapsearch.cpp.
References hasWarpsIn(), hasWarpsOut(), MapSearch(), notGlitch(), notIncomplete(), notNamed(), and notSpecial().
| MapSearch * MapSearch::isIncomplete | ( | ) |
Definition at line 354 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::isNotBad | ( | ) |
The complement helper used by isGood().
References getMapCount(), getMaps(), isCity(), mapAt(), MapSearch(), notCity(), and qmlProtect().
| MapSearch * MapSearch::isSpsecial | ( | ) |
Definition at line 391 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::isType | ( | QString | val | ) |
Keep maps of tileset-type val.
Definition at line 168 of file mapsearch.cpp.
References MapSearch().
| const MapDBEntry * MapSearch::mapAt | ( | const int | ind | ) | const |
| MapSearch * MapSearch::noConnections | ( | ) |
Definition at line 208 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::noDynamicSpriteSet | ( | ) |
Definition at line 323 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::noMons | ( | ) |
| MapSearch * MapSearch::noSigns | ( | ) |
| MapSearch * MapSearch::noSprites | ( | ) |
| MapSearch * MapSearch::noSpriteSet | ( | ) |
| MapSearch * MapSearch::notCity | ( | ) |
Definition at line 420 of file mapsearch.cpp.
References indexGt(), and MapSearch().
Referenced by isNotBad().
| MapSearch * MapSearch::notGlitch | ( | ) |
Definition at line 381 of file mapsearch.cpp.
References MapSearch().
Referenced by isGood().
| MapSearch * MapSearch::notIncomplete | ( | ) |
Definition at line 363 of file mapsearch.cpp.
References MapSearch().
Referenced by isGood().
| MapSearch * MapSearch::notNamed | ( | QString | val | ) |
Drop the map named val.
Definition at line 62 of file mapsearch.cpp.
References MapSearch().
Referenced by isGood().
| MapSearch * MapSearch::notSpecial | ( | ) |
Definition at line 400 of file mapsearch.cpp.
References MapSearch().
Referenced by isGood().
| MapSearch * MapSearch::notTileset | ( | QString | val | ) |
| MapSearch * MapSearch::notType | ( | QString | val | ) |
Drop maps of tileset-type val.
Definition at line 186 of file mapsearch.cpp.
References MapSearch().
| MapSearch * MapSearch::noWarpsIn | ( | ) |
| MapSearch * MapSearch::noWarpsOut | ( | ) |
| MapDBEntry * MapSearch::pickRandom | ( | ) |
A random map from the current results (backs pickRandom).
Definition at line 41 of file mapsearch.cpp.
References Random::inst().
| void MapSearch::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 443 of file mapsearch.cpp.
References Utility::qmlProtectUtil().
Referenced by isNotBad().
| MapSearch * MapSearch::startOver | ( | ) |
Reset to all maps. Returns this.
Definition at line 49 of file mapsearch.cpp.
References MapsDB::inst(), and MapSearch().
Referenced by MapSearch().
| MapSearch * MapSearch::widthGt | ( | int | val | ) |
| MapSearch * MapSearch::widthLt | ( | int | val | ) |