Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
world.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020 Twilight
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#pragma once
17
#include <QObject>
18
#include "
../../savefile_autoport.h
"
19
20
#include "
./worldother.h
"
21
22
class
SaveFile
;
23
24
class
WorldCompleted
;
25
class
WorldEvents
;
26
class
WorldGeneral
;
27
class
WorldHidden
;
28
class
WorldMissables
;
29
class
WorldOther
;
30
class
WorldScripts
;
31
class
WorldTowns
;
32
class
WorldTrades
;
33
class
WorldLocal
;
34
49
class
SAVEFILE_AUTOPORT
World
:
public
QObject
50
{
51
Q_OBJECT
52
53
Q_PROPERTY(
WorldCompleted
*
completed
MEMBER
completed
NOTIFY
completedChanged
)
54
Q_PROPERTY(
WorldEvents
*
events
MEMBER
events
NOTIFY
eventsChanged
)
55
Q_PROPERTY(
WorldGeneral
*
general
MEMBER
general
NOTIFY
generalChanged
)
56
Q_PROPERTY(
WorldHidden
*
hidden
MEMBER
hidden
NOTIFY
hiddenChanged
)
57
Q_PROPERTY(
WorldMissables
*
missables
MEMBER
missables
NOTIFY
missablesChanged
)
58
Q_PROPERTY(
WorldOther
*
other
MEMBER
other
NOTIFY
otherChanged
)
59
Q_PROPERTY(
WorldScripts
*
scripts
MEMBER
scripts
NOTIFY
scriptsChanged
)
60
Q_PROPERTY(
WorldTowns
*
towns
MEMBER
towns
NOTIFY
townsChanged
)
61
Q_PROPERTY(
WorldTrades
*
trades
MEMBER
trades
NOTIFY
tradesChanged
)
62
Q_PROPERTY(
WorldLocal
*
local
MEMBER
local
NOTIFY
localChanged
)
63
64
public
:
65
World
(
SaveFile
* saveFile =
nullptr
);
66
virtual
~World
();
67
68
void
load
(
SaveFile
* saveFile =
nullptr
);
69
void
save
(
SaveFile
* saveFile);
70
71
signals:
72
void
completedChanged
();
73
void
eventsChanged
();
74
void
generalChanged
();
75
void
hiddenChanged
();
76
void
missablesChanged
();
77
void
otherChanged
();
78
void
scriptsChanged
();
79
void
townsChanged
();
80
void
tradesChanged
();
81
void
localChanged
();
82
83
public
slots:
84
void
reset
();
85
void
randomize
();
86
87
public
:
88
WorldCompleted
*
completed
=
nullptr
;
89
WorldEvents
*
events
=
nullptr
;
90
WorldGeneral
*
general
=
nullptr
;
91
WorldHidden
*
hidden
=
nullptr
;
92
WorldMissables
*
missables
=
nullptr
;
93
WorldOther
*
other
=
nullptr
;
94
WorldScripts
*
scripts
=
nullptr
;
95
WorldTowns
*
towns
=
nullptr
;
96
WorldTrades
*
trades
=
nullptr
;
97
WorldLocal
*
local
=
nullptr
;
98
};
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
WorldCompleted
A handful of one-off "have you done X yet" milestone flags.
Definition
worldcompleted.h:35
WorldEvents
The game's story-event flags – a flat array of 508 booleans.
Definition
worldevents.h:39
WorldGeneral
General world settings: last maps plus the Options / LetterDelay objects.
Definition
worldgeneral.h:75
WorldHidden
"Already collected" flags for hidden items and hidden Game Corner coins.
Definition
worldhidden.h:42
WorldLocal
A few map-specific puzzle/minigame state values.
Definition
worldlocal.h:34
WorldMissables
Visibility flags for "missable" sprites (one-time NPCs/items on maps).
Definition
worldmissables.h:40
WorldOther
Odds-and-ends world state: debug mode, the playtime clock, fossil results.
Definition
worldother.h:83
WorldScripts
Per-map script progress values (the in-progress state of each map's script).
Definition
worldscripts.h:38
WorldTowns
"Visited" flags for towns – which fly destinations are unlocked.
Definition
worldtowns.h:36
WorldTrades
"Done" flags for the game's in-game (NPC) trades.
Definition
worldtrades.h:36
World::other
WorldOther * other
Definition
world.h:93
World::scripts
WorldScripts * scripts
Definition
world.h:94
World::missables
WorldMissables * missables
Definition
world.h:92
World::completed
WorldCompleted * completed
Definition
world.h:88
World::missablesChanged
void missablesChanged()
World::generalChanged
void generalChanged()
World::scriptsChanged
void scriptsChanged()
World::local
WorldLocal * local
Definition
world.h:97
World::load
void load(SaveFile *saveFile=nullptr)
Expand all world regions from the save.
Definition
world.cpp:65
World::tradesChanged
void tradesChanged()
World::randomize
void randomize()
Randomize all world regions (constrained).
Definition
world.cpp:110
World::trades
WorldTrades * trades
Definition
world.h:96
World::towns
WorldTowns * towns
Definition
world.h:95
World::reset
void reset()
Blank all world regions.
Definition
world.cpp:96
World::completedChanged
protected::void completedChanged()
World::hiddenChanged
void hiddenChanged()
World::general
WorldGeneral * general
Definition
world.h:90
World::localChanged
void localChanged()
World::otherChanged
void otherChanged()
World::save
void save(SaveFile *saveFile)
Flatten all world regions to the save.
Definition
world.cpp:82
World::events
WorldEvents * events
Definition
world.h:89
World::World
World(SaveFile *saveFile=nullptr)
< Completion milestones.
Definition
world.cpp:35
World::hidden
WorldHidden * hidden
Definition
world.h:91
World::townsChanged
void townsChanged()
World::eventsChanged
void eventsChanged()
savefile_autoport.h
Import/export macro for the savefile library, plus the central list of QObject types kept deliberatel...
SAVEFILE_AUTOPORT
#define SAVEFILE_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.
Definition
savefile_autoport.h:38
worldother.h
projects
savefile
src
pse-savefile
expanded
world
world.h
Generated by
1.17.0