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

Global, map-independent game state – "the state of the world". More...

#include <world.h>

Inheritance diagram for World:
Collaboration diagram for World:

Public Member Functions

 World (SaveFile *saveFile=nullptr)
 < Completion milestones.
virtual ~World ()
void load (SaveFile *saveFile=nullptr)
 Expand all world regions from the save.
void save (SaveFile *saveFile)
 Flatten all world regions to the save.
protected::void completedChanged ()
void eventsChanged ()
void generalChanged ()
void hiddenChanged ()
void missablesChanged ()
void otherChanged ()
void scriptsChanged ()
void townsChanged ()
void tradesChanged ()
void localChanged ()
void reset ()
 Blank all world regions.
void randomize ()
 Randomize all world regions (constrained).

Public Attributes

WorldCompletedcompleted = nullptr
WorldEventsevents = nullptr
WorldGeneralgeneral = nullptr
WorldHiddenhidden = nullptr
WorldMissablesmissables = nullptr
WorldOtherother = nullptr
WorldScriptsscripts = nullptr
WorldTownstowns = nullptr
WorldTradestrades = nullptr
WorldLocallocal = nullptr

Detailed Description

Global, map-independent game state – "the state of the world".

Where Area is about the current map, World is everything that persists across maps: story events, completed milestones, missables visibility, scripts, towns visited, trades done, hidden items, plus general settings, local map-object state, and other (playtime, fossils, debug). Follows the standard expanded-node convention (load/save/reset/randomize – see SaveFileExpanded).

Note
Most children are kept opaque to QML in savefile_autoport.h for build speed (only other is traversed, via the trainer-card playtime).
See also
SaveFileExpanded, Area, and the system map.

Definition at line 49 of file world.h.

Constructor & Destructor Documentation

◆ World()

World::World ( SaveFile * saveFile = nullptr)

< Completion milestones.

The 508-flag story event bitfield. Options, letter delay, last maps. Hidden-item collection flags. Missable-sprite visibility flags. Playtime, fossils, debug (QML-traversed). Per-map script progress. Towns visited (fly destinations). In-game trades completed. Current-map sprite/object local state.

Definition at line 35 of file world.cpp.

References completed, events, general, hidden, load(), local, missables, other, scripts, towns, and trades.

◆ ~World()

World::~World ( )
virtual

Definition at line 51 of file world.cpp.

References completed, events, general, hidden, local, missables, other, scripts, towns, and trades.

Member Function Documentation

◆ completedChanged()

protected::void World::completedChanged ( )

◆ eventsChanged()

void World::eventsChanged ( )

◆ generalChanged()

void World::generalChanged ( )

◆ hiddenChanged()

void World::hiddenChanged ( )

◆ load()

void World::load ( SaveFile * saveFile = nullptr)

Expand all world regions from the save.

Definition at line 65 of file world.cpp.

References completed, events, general, hidden, local, missables, other, reset(), scripts, towns, and trades.

Referenced by World().

◆ localChanged()

void World::localChanged ( )

References randomize(), and reset().

◆ missablesChanged()

void World::missablesChanged ( )

◆ otherChanged()

void World::otherChanged ( )

◆ randomize()

void World::randomize ( )

Randomize all world regions (constrained).

Definition at line 110 of file world.cpp.

References completed, events, general, hidden, local, missables, other, scripts, towns, and trades.

Referenced by localChanged().

◆ reset()

void World::reset ( )

Blank all world regions.

Definition at line 96 of file world.cpp.

References completed, events, general, hidden, local, missables, other, scripts, towns, and trades.

Referenced by load(), and localChanged().

◆ save()

void World::save ( SaveFile * saveFile)

Flatten all world regions to the save.

Definition at line 82 of file world.cpp.

References completed, events, general, hidden, local, missables, other, scripts, towns, and trades.

◆ scriptsChanged()

void World::scriptsChanged ( )

◆ townsChanged()

void World::townsChanged ( )

◆ tradesChanged()

void World::tradesChanged ( )

Member Data Documentation

◆ completed

WorldCompleted* World::completed = nullptr
See also
completed property.

Definition at line 88 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ events

WorldEvents* World::events = nullptr
See also
events property.

Definition at line 89 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ general

WorldGeneral* World::general = nullptr
See also
general property.

Definition at line 90 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ hidden

WorldHidden* World::hidden = nullptr
See also
hidden property.

Definition at line 91 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ local

WorldLocal* World::local = nullptr
See also
local property.

Definition at line 97 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ missables

WorldMissables* World::missables = nullptr
See also
missables property.

Definition at line 92 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ other

WorldOther* World::other = nullptr
See also
other property.

Definition at line 93 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ scripts

WorldScripts* World::scripts = nullptr
See also
scripts property.

Definition at line 94 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ towns

WorldTowns* World::towns = nullptr
See also
towns property.

Definition at line 95 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().

◆ trades

WorldTrades* World::trades = nullptr
See also
trades property.

Definition at line 96 of file world.h.

Referenced by load(), randomize(), reset(), save(), World(), and ~World().


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