|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The current map's warps, plus the live warp-transition state. More...
#include <areawarps.h>
Public Member Functions | |
| AreaWarps (SaveFile *saveFile=nullptr) | |
| < Do a scripted warp. | |
| virtual | ~AreaWarps () |
| void | load (SaveFile *saveFile=nullptr) |
| Expand the warp list + state from the save. | |
| void | save (SaveFile *saveFile) |
| Flatten the warp list + state to the save. | |
| int | warpCount () |
| Number of warps. | |
| int | warpMax () |
| Capacity (maxWarps). | |
| WarpData * | warpAt (int ind) |
Warp ind (GC-protected return). | |
| void | warpSwap (int from, int to) |
| Reorder warps. | |
| void | warpRemove (int ind) |
Remove warp ind. | |
| void | warpNew () |
| Add a fresh warp. | |
| protected::void | scriptedWarpChanged () |
| void | isDungeonWarpChanged () |
| void | skipJoypadCheckWarpsChanged () |
| void | warpDestChanged () |
| void | dungeonWarpDestMapChanged () |
| void | specialWarpDestMapChanged () |
| void | flyOrDungeonWarpChanged () |
| void | flyWarpChanged () |
| void | dungeonWarpChanged () |
| void | whichDungeonWarpChanged () |
| void | warpedFromWarpChanged () |
| void | warpedfromMapChanged () |
| void | warpsChanged () |
| void | reset () |
| Empty warps + clear state. | |
| void | randomize (MapDBEntry *map) |
Randomize warps for map. | |
| void | setTo (MapDBEntry *map) |
Rebuild warps from map. | |
Public Attributes | |
| bool | scriptedWarp |
| Do a scripted warp. | |
| bool | isDungeonWarp |
| On a dungeon warp. | |
| bool | skipJoypadCheckWarps |
| Skips check for warp after not collided (Forced Warp)?? | |
| int | warpDest |
| Warp actively warping to or 0xFF to warp to same position. | |
| int | dungeonWarpDestMap |
| Destination Map for dungeon warps. | |
| int | specialWarpDestMap |
| Destination Map for special warps. | |
| bool | flyOrDungeonWarp |
| Is a fly or dungeon warp. | |
| bool | flyWarp |
| Is a fly warp. | |
| bool | dungeonWarp |
| Is a dungeon warp. | |
| int | whichDungeonWarp |
| Warped from which dungeon warp. | |
| int | warpedFromWarp |
| Warped from which warp. | |
| int | warpedfromMap |
| Warped from which map. | |
| QVector< WarpData * > | warps |
| The map's warp points. | |
The current map's warps, plus the live warp-transition state.
Two things in one: the list of WarpData warp points (up to maxWarps, with QML add/remove/swap/access), and a set of transient flags describing an in-progress warp – whether it's scripted/dungeon/fly, the destinations, and where the player warped from. The field comments below give each flag's meaning. Standard expanded-node convention (see SaveFileExpanded).
Definition at line 39 of file areawarps.h.
| AreaWarps::AreaWarps | ( | SaveFile * | saveFile = nullptr | ) |
< Do a scripted warp.
On a dungeon warp. Forced-warp joypad skip. Active warp destination (0xFF = same position). Dungeon-warp destination map. Special-warp destination map. Is a fly or dungeon warp. Is a fly warp. Is a dungeon warp. Warped from which dungeon warp. Warped from which warp. Warped from which map.
Definition at line 34 of file areawarps.cpp.
References load().
|
virtual |
Definition at line 39 of file areawarps.cpp.
References warps.
| void AreaWarps::dungeonWarpDestMapChanged | ( | ) |
Referenced by load(), randomize(), reset(), and setTo().
| void AreaWarps::load | ( | SaveFile * | saveFile = nullptr | ) |
Expand the warp list + state from the save.
Definition at line 89 of file areawarps.cpp.
References dungeonWarp, dungeonWarpChanged(), dungeonWarpDestMap, dungeonWarpDestMapChanged(), flyOrDungeonWarp, flyOrDungeonWarpChanged(), flyWarp, flyWarpChanged(), isDungeonWarp, isDungeonWarpChanged(), reset(), scriptedWarp, scriptedWarpChanged(), skipJoypadCheckWarps, skipJoypadCheckWarpsChanged(), specialWarpDestMap, specialWarpDestMapChanged(), SaveFile::toolset, warpDest, warpDestChanged(), warpedfromMap, warpedfromMapChanged(), warpedFromWarp, warpedFromWarpChanged(), warps, warpsChanged(), whichDungeonWarp, and whichDungeonWarpChanged().
Referenced by AreaWarps().
| void AreaWarps::randomize | ( | MapDBEntry * | map | ) |
Randomize warps for map.
Definition at line 210 of file areawarps.cpp.
References dungeonWarp, dungeonWarpDestMap, dungeonWarpDestMapChanged(), MapDBEntry::getWarpOut(), MapsDB::inst(), Random::inst(), Random::rangeExclusive(), reset(), MapsDB::search(), specialWarpDestMap, specialWarpDestMapChanged(), warpedFromWarp, warpedFromWarpChanged(), warps, warpsChanged(), whichDungeonWarp, and whichDungeonWarpChanged().
Referenced by warpsChanged().
| void AreaWarps::reset | ( | ) |
Empty warps + clear state.
Definition at line 165 of file areawarps.cpp.
References dungeonWarp, dungeonWarpChanged(), dungeonWarpDestMap, dungeonWarpDestMapChanged(), flyOrDungeonWarp, flyOrDungeonWarpChanged(), flyWarp, flyWarpChanged(), isDungeonWarp, isDungeonWarpChanged(), scriptedWarp, scriptedWarpChanged(), skipJoypadCheckWarps, skipJoypadCheckWarpsChanged(), specialWarpDestMap, specialWarpDestMapChanged(), warpDest, warpDestChanged(), warpedfromMap, warpedfromMapChanged(), warpedFromWarp, warpedFromWarpChanged(), warps, warpsChanged(), whichDungeonWarp, and whichDungeonWarpChanged().
Referenced by load(), randomize(), setTo(), and warpsChanged().
| void AreaWarps::save | ( | SaveFile * | saveFile | ) |
Flatten the warp list + state to the save.
Definition at line 141 of file areawarps.cpp.
References dungeonWarp, dungeonWarpDestMap, flyOrDungeonWarp, flyWarp, isDungeonWarp, scriptedWarp, SaveFileToolset::setByte(), skipJoypadCheckWarps, specialWarpDestMap, SaveFile::toolset, warpDest, warpedfromMap, warpedFromWarp, warps, and whichDungeonWarp.
| void AreaWarps::setTo | ( | MapDBEntry * | map | ) |
Rebuild warps from map.
Definition at line 249 of file areawarps.cpp.
References dungeonWarp, dungeonWarpDestMap, dungeonWarpDestMapChanged(), MapDBEntry::getWarpOut(), MapsDB::inst(), Random::inst(), Random::rangeExclusive(), reset(), MapsDB::search(), specialWarpDestMap, specialWarpDestMapChanged(), warpedFromWarp, warpedFromWarpChanged(), warps, warpsChanged(), whichDungeonWarp, and whichDungeonWarpChanged().
Referenced by warpsChanged().
| void AreaWarps::specialWarpDestMapChanged | ( | ) |
Referenced by load(), randomize(), reset(), and setTo().
| WarpData * AreaWarps::warpAt | ( | int | ind | ) |
Warp ind (GC-protected return).
Definition at line 54 of file areawarps.cpp.
References qmlCppOwned(), and warps.
| int AreaWarps::warpCount | ( | ) |
| void AreaWarps::warpedFromWarpChanged | ( | ) |
Referenced by load(), randomize(), reset(), and setTo().
| int AreaWarps::warpMax | ( | ) |
| void AreaWarps::warpNew | ( | ) |
Add a fresh warp.
Definition at line 80 of file areawarps.cpp.
References maxWarps, warps, and warpsChanged().
| void AreaWarps::warpRemove | ( | int | ind | ) |
| void AreaWarps::warpsChanged | ( | ) |
References randomize(), reset(), and setTo().
Referenced by load(), randomize(), reset(), setTo(), warpNew(), warpRemove(), and warpSwap().
| void AreaWarps::warpSwap | ( | int | from, |
| int | to ) |
| void AreaWarps::whichDungeonWarpChanged | ( | ) |
Referenced by load(), randomize(), reset(), and setTo().
| bool AreaWarps::dungeonWarp |
Is a dungeon warp.
Definition at line 102 of file areawarps.h.
Referenced by load(), randomize(), reset(), save(), and setTo().
| int AreaWarps::dungeonWarpDestMap |
Destination Map for dungeon warps.
Definition at line 98 of file areawarps.h.
Referenced by load(), randomize(), reset(), save(), and setTo().
| bool AreaWarps::flyOrDungeonWarp |
Is a fly or dungeon warp.
Definition at line 100 of file areawarps.h.
| bool AreaWarps::flyWarp |
Is a fly warp.
Definition at line 101 of file areawarps.h.
| bool AreaWarps::isDungeonWarp |
On a dungeon warp.
Definition at line 93 of file areawarps.h.
| bool AreaWarps::scriptedWarp |
Do a scripted warp.
Definition at line 92 of file areawarps.h.
| bool AreaWarps::skipJoypadCheckWarps |
Skips check for warp after not collided (Forced Warp)??
Definition at line 94 of file areawarps.h.
| int AreaWarps::specialWarpDestMap |
Destination Map for special warps.
Definition at line 99 of file areawarps.h.
Referenced by load(), randomize(), reset(), save(), and setTo().
| int AreaWarps::warpDest |
Warp actively warping to or 0xFF to warp to same position.
Definition at line 97 of file areawarps.h.
| int AreaWarps::warpedfromMap |
Warped from which map.
Definition at line 107 of file areawarps.h.
| int AreaWarps::warpedFromWarp |
Warped from which warp.
Definition at line 106 of file areawarps.h.
Referenced by load(), randomize(), reset(), save(), and setTo().
| QVector<WarpData*> AreaWarps::warps |
The map's warp points.
Definition at line 109 of file areawarps.h.
Referenced by load(), randomize(), reset(), save(), setTo(), warpAt(), warpCount(), warpNew(), warpRemove(), warpSwap(), and ~AreaWarps().
| int AreaWarps::whichDungeonWarp |
Warped from which dungeon warp.
Definition at line 105 of file areawarps.h.
Referenced by load(), randomize(), reset(), save(), and setTo().