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

Transient NPC/control/battle flags for the current map. More...

#include <areanpc.h>

Inheritance diagram for AreaNPC:
Collaboration diagram for AreaNPC:

Public Member Functions

 AreaNPC (SaveFile *saveFile=nullptr)
 < NPCs face away from the player.
virtual ~AreaNPC ()
void load (SaveFile *saveFile=nullptr)
 Expand these flags from the save.
void save (SaveFile *saveFile)
 Flatten these flags to the save.
protected::void npcsFaceAwayChanged ()
void scriptedNPCMovementChanged ()
void npcSpriteMovementChanged ()
void tradeCenterSpritesFacedChanged ()
void ignoreJoypadChanged ()
void joypadSimulationChanged ()
void runningTestBattleChanged ()
void trainerWantsBattleChanged ()
void trainerHeaderPtrChanged ()
void reset ()
 Blank the flags.
void randomize ()
 Randomize the flags.
void setTo (MapDBEntry *map)
 Set from a chosen map's defaults.

Public Attributes

bool npcsFaceAway
bool scriptedNPCMovement
bool npcSpriteMovement
bool tradeCenterSpritesFaced
bool ignoreJoypad
bool joypadSimulation
bool runningTestBattle
bool trainerWantsBattle
int trainerHeaderPtr

Detailed Description

Transient NPC/control/battle flags for the current map.

A bag of runtime flags grouped (in the fields below) into sprites, controls, and battle state – e.g. whether NPCs face away, the joypad is ignored/simulated, or a trainer wants to battle, plus the trainer-header pointer. Mostly mid-gameplay state. Standard expanded-node convention (see SaveFileExpanded).

See also
Area.

Definition at line 34 of file areanpc.h.

Constructor & Destructor Documentation

◆ AreaNPC()

AreaNPC::AreaNPC ( SaveFile * saveFile = nullptr)

< NPCs face away from the player.

NPC movement is script-driven. NPC sprites are moving. Trade-center sprites have faced. Joypad input is ignored. Joypad input is being simulated. A test battle is running. A trainer is initiating battle. Pointer to the active trainer header.

Definition at line 28 of file areanpc.cpp.

References load().

◆ ~AreaNPC()

AreaNPC::~AreaNPC ( )
virtual

Definition at line 33 of file areanpc.cpp.

Member Function Documentation

◆ ignoreJoypadChanged()

void AreaNPC::ignoreJoypadChanged ( )

Referenced by load(), and reset().

◆ joypadSimulationChanged()

void AreaNPC::joypadSimulationChanged ( )

Referenced by load(), and reset().

◆ load()

◆ npcsFaceAwayChanged()

protected::void AreaNPC::npcsFaceAwayChanged ( )

Referenced by load(), and reset().

◆ npcSpriteMovementChanged()

void AreaNPC::npcSpriteMovementChanged ( )

Referenced by load(), and reset().

◆ randomize()

void AreaNPC::randomize ( )

Randomize the flags.

Definition at line 125 of file areanpc.cpp.

References reset().

Referenced by trainerHeaderPtrChanged().

◆ reset()

◆ runningTestBattleChanged()

void AreaNPC::runningTestBattleChanged ( )

Referenced by load(), and reset().

◆ save()

◆ scriptedNPCMovementChanged()

void AreaNPC::scriptedNPCMovementChanged ( )

Referenced by load(), and reset().

◆ setTo()

void AreaNPC::setTo ( MapDBEntry * map)

Set from a chosen map's defaults.

Definition at line 130 of file areanpc.cpp.

References reset().

Referenced by trainerHeaderPtrChanged().

◆ tradeCenterSpritesFacedChanged()

void AreaNPC::tradeCenterSpritesFacedChanged ( )

Referenced by load(), and reset().

◆ trainerHeaderPtrChanged()

void AreaNPC::trainerHeaderPtrChanged ( )

References randomize(), reset(), and setTo().

Referenced by load(), and reset().

◆ trainerWantsBattleChanged()

void AreaNPC::trainerWantsBattleChanged ( )

Referenced by load(), and reset().

Member Data Documentation

◆ ignoreJoypad

bool AreaNPC::ignoreJoypad
See also
ignoreJoypad property.

Definition at line 79 of file areanpc.h.

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

◆ joypadSimulation

bool AreaNPC::joypadSimulation
See also
joypadSimulation property.

Definition at line 80 of file areanpc.h.

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

◆ npcsFaceAway

bool AreaNPC::npcsFaceAway
See also
npcsFaceAway property.

Definition at line 73 of file areanpc.h.

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

◆ npcSpriteMovement

bool AreaNPC::npcSpriteMovement
See also
npcSpriteMovement property.

Definition at line 75 of file areanpc.h.

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

◆ runningTestBattle

bool AreaNPC::runningTestBattle
See also
runningTestBattle property.

Definition at line 83 of file areanpc.h.

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

◆ scriptedNPCMovement

bool AreaNPC::scriptedNPCMovement
See also
scriptedNPCMovement property.

Definition at line 74 of file areanpc.h.

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

◆ tradeCenterSpritesFaced

bool AreaNPC::tradeCenterSpritesFaced
See also
tradeCenterSpritesFaced property.

Definition at line 76 of file areanpc.h.

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

◆ trainerHeaderPtr

int AreaNPC::trainerHeaderPtr
See also
trainerHeaderPtr property.

Definition at line 85 of file areanpc.h.

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

◆ trainerWantsBattle

bool AreaNPC::trainerWantsBattle
See also
trainerWantsBattle property.

Definition at line 84 of file areanpc.h.

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


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