40 for(
auto warp :
warps)
61 auto eFrom =
warps.at(from);
62 auto eTo =
warps.at(to);
64 warps.replace(from, eTo);
65 warps.replace(to, eFrom);
75 warps.at(ind)->deleteLater();
93 if(saveFile ==
nullptr)
96 auto toolset = saveFile->
toolset;
98 for (
var8 i = 0; i < toolset->getByte(0x265A) && i < 32; i++) {
104 warpDest = toolset->getByte(0x26DB);
125 flyWarp = toolset->getBit(0x29DE, 1, 3);
143 auto toolset = saveFile->
toolset;
147 for (
var8 i = 0; i <
warps.size() && i < 32; i++) {
148 warps.at(i)->save(saveFile, i);
158 toolset->setBit(0x29DE, 1, 3,
flyWarp);
203 for(
auto warp :
warps)
235 auto tmp =
new WarpData(warpDataEntry);
240 if(tmp->destMap != 0xFF)
274 auto tmp =
new WarpData(warpDataEntry);
constexpr var8 maxWarps
Maximum warps on a map.
void warpNew()
Add a fresh warp.
protected::void scriptedWarpChanged()
void flyOrDungeonWarpChanged()
bool skipJoypadCheckWarps
Skips check for warp after not collided (Forced Warp)??
int warpedFromWarp
Warped from which warp.
WarpData * warpAt(int ind)
Warp ind (GC-protected return).
int whichDungeonWarp
Warped from which dungeon warp.
void dungeonWarpChanged()
int specialWarpDestMap
Destination Map for special warps.
void warpSwap(int from, int to)
Reorder warps.
void warpedfromMapChanged()
AreaWarps(SaveFile *saveFile=nullptr)
< Do a scripted warp.
bool isDungeonWarp
On a dungeon warp.
void whichDungeonWarpChanged()
void randomize(MapDBEntry *map)
Randomize warps for map.
bool flyOrDungeonWarp
Is a fly or dungeon warp.
int warpDest
Warp actively warping to or 0xFF to warp to same position.
int warpedfromMap
Warped from which map.
bool scriptedWarp
Do a scripted warp.
void dungeonWarpDestMapChanged()
int warpMax()
Capacity (maxWarps).
int warpCount()
Number of warps.
void setTo(MapDBEntry *map)
Rebuild warps from map.
void save(SaveFile *saveFile)
Flatten the warp list + state to the save.
int dungeonWarpDestMap
Destination Map for dungeon warps.
bool dungeonWarp
Is a dungeon warp.
void warpedFromWarpChanged()
void load(SaveFile *saveFile=nullptr)
Expand the warp list + state from the save.
void specialWarpDestMapChanged()
void reset()
Empty warps + clear state.
void isDungeonWarpChanged()
bool flyWarp
Is a fly warp.
void warpRemove(int ind)
Remove warp ind.
void skipJoypadCheckWarpsChanged()
QVector< WarpData * > warps
The map's warp points.
static MapsDB * inst()
< Number of maps.
QScopedPointer< MapSearch, QScopedPointerDeleteLater > search() const
C++-owned finder (smart pointer).
static Random * inst()
< Convenience 50% coin flip (integer path), readable from QML.
int rangeExclusive(const int start, const int end) const
Random integer in the half-open interval [start, end).
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
SaveFileToolset * toolset
Tools to operate directly on the raw sav file data.
One warp point on the current map: its tile and where it leads.
var8e var8
Everyday 8-bit alias. Exact (not "fastest") to dodge the pointer-width bug noted above.
qmlCppOwned() – protect Q_INVOKABLE QObject returns from QML's GC.
static T * qmlCppOwned(T *obj)
Hand QML CppOwnership of a C++-owned QObject returned from a Q_INVOKABLE.
One map's complete static definition – the root of the MapDBEntry family.
const QVector< MapDBEntryWarpOut * > getWarpOut() const
Outgoing warps.