|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Transient NPC/control/battle flags for the current map. More...
#include <areanpc.h>
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 |
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).
| 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().
|
virtual |
Definition at line 33 of file areanpc.cpp.
| void AreaNPC::load | ( | SaveFile * | saveFile = nullptr | ) |
Expand these flags from the save.
Definition at line 35 of file areanpc.cpp.
References ignoreJoypad, ignoreJoypadChanged(), joypadSimulation, joypadSimulationChanged(), npcsFaceAway, npcsFaceAwayChanged(), npcSpriteMovement, npcSpriteMovementChanged(), reset(), runningTestBattle, runningTestBattleChanged(), scriptedNPCMovement, scriptedNPCMovementChanged(), SaveFile::toolset, tradeCenterSpritesFaced, tradeCenterSpritesFacedChanged(), trainerHeaderPtr, trainerHeaderPtrChanged(), trainerWantsBattle, and trainerWantsBattleChanged().
Referenced by AreaNPC().
| void AreaNPC::randomize | ( | ) |
Randomize the flags.
Definition at line 125 of file areanpc.cpp.
References reset().
Referenced by trainerHeaderPtrChanged().
| void AreaNPC::reset | ( | ) |
Blank the flags.
Definition at line 87 of file areanpc.cpp.
References ignoreJoypad, ignoreJoypadChanged(), joypadSimulation, joypadSimulationChanged(), npcsFaceAway, npcsFaceAwayChanged(), npcSpriteMovement, npcSpriteMovementChanged(), runningTestBattle, runningTestBattleChanged(), scriptedNPCMovement, scriptedNPCMovementChanged(), tradeCenterSpritesFaced, tradeCenterSpritesFacedChanged(), trainerHeaderPtr, trainerHeaderPtrChanged(), trainerWantsBattle, and trainerWantsBattleChanged().
Referenced by load(), randomize(), setTo(), and trainerHeaderPtrChanged().
| void AreaNPC::save | ( | SaveFile * | saveFile | ) |
Flatten these flags to the save.
Definition at line 72 of file areanpc.cpp.
References ignoreJoypad, joypadSimulation, npcsFaceAway, npcSpriteMovement, runningTestBattle, scriptedNPCMovement, SaveFileToolset::setBit(), SaveFile::toolset, tradeCenterSpritesFaced, trainerHeaderPtr, and trainerWantsBattle.
| 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().
| void AreaNPC::trainerHeaderPtrChanged | ( | ) |
References randomize(), reset(), and setTo().
| bool AreaNPC::ignoreJoypad |
| bool AreaNPC::joypadSimulation |
| bool AreaNPC::npcsFaceAway |
| bool AreaNPC::npcSpriteMovement |
| bool AreaNPC::runningTestBattle |
| bool AreaNPC::scriptedNPCMovement |
| bool AreaNPC::tradeCenterSpritesFaced |
| int AreaNPC::trainerHeaderPtr |
| bool AreaNPC::trainerWantsBattle |