|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Per-map script progress values (the in-progress state of each map's script). More...
#include <worldscripts.h>
Public Member Functions | |
| WorldScripts (SaveFile *saveFile=nullptr) | |
| virtual | ~WorldScripts () |
| void | load (SaveFile *saveFile=nullptr) |
| Expand the script values from the save. | |
| void | save (SaveFile *saveFile) |
| Flatten the script values to the save. | |
| int | scriptsCount () |
| Number of script values (scriptCount). | |
| int | scriptsAt (int ind) |
Script value for map index ind. | |
| void | scriptsSet (int ind, int val) |
Set the script value for ind. | |
| protected::void | curScriptsChanged () |
| void | reset () |
| Zero all script values. | |
| void | randomize () |
| Randomize the script values. | |
Public Attributes | |
| var16 | curScripts [scriptCount] |
| Per-map script-progress values. | |
Per-map script progress values (the in-progress state of each map's script).
Each map has a script "step" counter tracking how far its events have advanced; this holds all scriptCount of them as a curScripts array. Unlike the boolean event/missable flags these are small integers, so the QML accessors take and return int. Standard expanded-node convention (see SaveFileExpanded).
Definition at line 37 of file worldscripts.h.
| WorldScripts::WorldScripts | ( | SaveFile * | saveFile = nullptr | ) |
Definition at line 30 of file worldscripts.cpp.
References load().
|
virtual |
Definition at line 35 of file worldscripts.cpp.
| protected::void WorldScripts::curScriptsChanged | ( | ) |
References randomize(), and reset().
Referenced by load(), reset(), and scriptsSet().
| void WorldScripts::load | ( | SaveFile * | saveFile = nullptr | ) |
Expand the script values from the save.
Definition at line 37 of file worldscripts.cpp.
References curScripts, curScriptsChanged(), ScriptsDB::inst(), SaveFile::iterator(), SaveFileIterator::offsetTo(), and reset().
Referenced by WorldScripts().
| void WorldScripts::randomize | ( | ) |
Randomize the script values.
Definition at line 105 of file worldscripts.cpp.
References reset().
Referenced by curScriptsChanged().
| void WorldScripts::reset | ( | ) |
Zero all script values.
Definition at line 98 of file worldscripts.cpp.
References curScripts, curScriptsChanged(), and scriptCount.
Referenced by curScriptsChanged(), load(), and randomize().
| void WorldScripts::save | ( | SaveFile * | saveFile | ) |
Flatten the script values to the save.
Definition at line 63 of file worldscripts.cpp.
References curScripts, ScriptsDB::inst(), SaveFile::iterator(), and SaveFileIterator::offsetTo().
| int WorldScripts::scriptsAt | ( | int | ind | ) |
Script value for map index ind.
Definition at line 87 of file worldscripts.cpp.
References curScripts.
| int WorldScripts::scriptsCount | ( | ) |
Number of script values (scriptCount).
Definition at line 82 of file worldscripts.cpp.
References scriptCount.
| void WorldScripts::scriptsSet | ( | int | ind, |
| int | val ) |
Set the script value for ind.
Definition at line 92 of file worldscripts.cpp.
References curScripts, and curScriptsChanged().
| var16 WorldScripts::curScripts[scriptCount] |
Per-map script-progress values.
Definition at line 60 of file worldscripts.h.
Referenced by load(), reset(), save(), scriptsAt(), and scriptsSet().