Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
AreaWarps Class Reference

The current map's warps, plus the live warp-transition state. More...

#include <areawarps.h>

Inheritance diagram for AreaWarps:
Collaboration diagram for AreaWarps:

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).
WarpDatawarpAt (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.

Detailed Description

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).

See also
WarpData (a warp point), Area, MapDBEntry.

Definition at line 39 of file areawarps.h.

Constructor & Destructor Documentation

◆ AreaWarps()

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().

◆ ~AreaWarps()

AreaWarps::~AreaWarps ( )
virtual

Definition at line 39 of file areawarps.cpp.

References warps.

Member Function Documentation

◆ dungeonWarpChanged()

void AreaWarps::dungeonWarpChanged ( )

Referenced by load(), and reset().

◆ dungeonWarpDestMapChanged()

void AreaWarps::dungeonWarpDestMapChanged ( )

Referenced by load(), randomize(), reset(), and setTo().

◆ flyOrDungeonWarpChanged()

void AreaWarps::flyOrDungeonWarpChanged ( )

Referenced by load(), and reset().

◆ flyWarpChanged()

void AreaWarps::flyWarpChanged ( )

Referenced by load(), and reset().

◆ isDungeonWarpChanged()

void AreaWarps::isDungeonWarpChanged ( )

Referenced by load(), and reset().

◆ load()

◆ randomize()

◆ reset()

◆ save()

◆ scriptedWarpChanged()

protected::void AreaWarps::scriptedWarpChanged ( )

Referenced by load(), and reset().

◆ setTo()

◆ skipJoypadCheckWarpsChanged()

void AreaWarps::skipJoypadCheckWarpsChanged ( )

Referenced by load(), and reset().

◆ specialWarpDestMapChanged()

void AreaWarps::specialWarpDestMapChanged ( )

Referenced by load(), randomize(), reset(), and setTo().

◆ warpAt()

WarpData * AreaWarps::warpAt ( int ind)

Warp ind (GC-protected return).

Definition at line 54 of file areawarps.cpp.

References qmlCppOwned(), and warps.

◆ warpCount()

int AreaWarps::warpCount ( )

Number of warps.

Definition at line 44 of file areawarps.cpp.

References warps.

◆ warpDestChanged()

void AreaWarps::warpDestChanged ( )

Referenced by load(), and reset().

◆ warpedfromMapChanged()

void AreaWarps::warpedfromMapChanged ( )

Referenced by load(), and reset().

◆ warpedFromWarpChanged()

void AreaWarps::warpedFromWarpChanged ( )

Referenced by load(), randomize(), reset(), and setTo().

◆ warpMax()

int AreaWarps::warpMax ( )

Capacity (maxWarps).

Definition at line 49 of file areawarps.cpp.

References maxWarps.

◆ warpNew()

void AreaWarps::warpNew ( )

Add a fresh warp.

Definition at line 80 of file areawarps.cpp.

References maxWarps, warps, and warpsChanged().

◆ warpRemove()

void AreaWarps::warpRemove ( int ind)

Remove warp ind.

Definition at line 70 of file areawarps.cpp.

References warps, and warpsChanged().

◆ warpsChanged()

void AreaWarps::warpsChanged ( )

◆ warpSwap()

void AreaWarps::warpSwap ( int from,
int to )

Reorder warps.

Definition at line 59 of file areawarps.cpp.

References warps, and warpsChanged().

◆ whichDungeonWarpChanged()

void AreaWarps::whichDungeonWarpChanged ( )

Referenced by load(), randomize(), reset(), and setTo().

Member Data Documentation

◆ dungeonWarp

bool AreaWarps::dungeonWarp

Is a dungeon warp.

Definition at line 102 of file areawarps.h.

Referenced by load(), randomize(), reset(), save(), and setTo().

◆ dungeonWarpDestMap

int AreaWarps::dungeonWarpDestMap

Destination Map for dungeon warps.

Definition at line 98 of file areawarps.h.

Referenced by load(), randomize(), reset(), save(), and setTo().

◆ flyOrDungeonWarp

bool AreaWarps::flyOrDungeonWarp

Is a fly or dungeon warp.

Definition at line 100 of file areawarps.h.

Referenced by load(), reset(), and save().

◆ flyWarp

bool AreaWarps::flyWarp

Is a fly warp.

Definition at line 101 of file areawarps.h.

Referenced by load(), reset(), and save().

◆ isDungeonWarp

bool AreaWarps::isDungeonWarp

On a dungeon warp.

Definition at line 93 of file areawarps.h.

Referenced by load(), reset(), and save().

◆ scriptedWarp

bool AreaWarps::scriptedWarp

Do a scripted warp.

Definition at line 92 of file areawarps.h.

Referenced by load(), reset(), and save().

◆ skipJoypadCheckWarps

bool AreaWarps::skipJoypadCheckWarps

Skips check for warp after not collided (Forced Warp)??

Definition at line 94 of file areawarps.h.

Referenced by load(), reset(), and save().

◆ specialWarpDestMap

int AreaWarps::specialWarpDestMap

Destination Map for special warps.

Definition at line 99 of file areawarps.h.

Referenced by load(), randomize(), reset(), save(), and setTo().

◆ warpDest

int AreaWarps::warpDest

Warp actively warping to or 0xFF to warp to same position.

Definition at line 97 of file areawarps.h.

Referenced by load(), reset(), and save().

◆ warpedfromMap

int AreaWarps::warpedfromMap

Warped from which map.

Definition at line 107 of file areawarps.h.

Referenced by load(), reset(), and save().

◆ warpedFromWarp

int AreaWarps::warpedFromWarp

Warped from which warp.

Definition at line 106 of file areawarps.h.

Referenced by load(), randomize(), reset(), save(), and setTo().

◆ warps

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().

◆ whichDungeonWarp

int AreaWarps::whichDungeonWarp

Warped from which dungeon warp.

Definition at line 105 of file areawarps.h.

Referenced by load(), randomize(), reset(), save(), and setTo().


The documentation for this class was generated from the following files:
  • projects/savefile/src/pse-savefile/expanded/area/areawarps.h
  • projects/savefile/src/pse-savefile/expanded/area/areawarps.cpp