Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
mapdbentrywarpout.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 <QJsonValue>
19
#include "
../db_autoport.h
"
20
21
class
QQmlEngine;
22
class
MapDBEntry
;
23
class
MapsDB
;
24
class
MapDBEntryWarpIn
;
25
26
// List of Warps on Map that warp out to a different map
27
// They can only warp to a "warp-in" point
37
struct
DB_AUTOPORT
MapDBEntryWarpOut
:
public
QObject {
38
Q_OBJECT
39
Q_PROPERTY(
int
getX
READ
getX
CONSTANT)
40
Q_PROPERTY(
int
getY
READ
getY
CONSTANT)
41
Q_PROPERTY(
int
getWarp
READ
getWarp
CONSTANT)
42
Q_PROPERTY(QString
getMap
READ
getMap
CONSTANT)
43
Q_PROPERTY(
bool
getGlitch
READ
getGlitch
CONSTANT)
44
Q_PROPERTY(
MapDBEntry
*
getToMap
READ
getToMap
CONSTANT)
45
Q_PROPERTY(
MapDBEntry
*
getParent
READ
getParent
CONSTANT)
46
Q_PROPERTY(
MapDBEntryWarpIn
*
getToWarp
READ
getToWarp
CONSTANT)
47
48
public
:
49
int
getX
()
const
;
50
int
getY
()
const
;
51
int
getWarp
()
const
;
52
const
QString
getMap
()
const
;
53
bool
getGlitch
()
const
;
54
MapDBEntry
*
getToMap
()
const
;
55
MapDBEntry
*
getParent
()
const
;
56
MapDBEntryWarpIn
*
getToWarp
()
const
;
57
58
public
slots:
59
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
60
61
protected
:
62
MapDBEntryWarpOut
();
63
MapDBEntryWarpOut
(
const
QJsonValue& data,
MapDBEntry
*
const
parent
);
64
void
deepLink
();
65
void
qmlRegister
()
const
;
66
67
// X & Y location on Map
68
int
x
= 0;
69
int
y
= 0;
70
71
// Which pre-defined warp-in to warp to
72
int
warp
= 0;
73
74
// Which map to warp to
75
QString
map
=
""
;
76
77
// Is this warp-out not intended to be used
78
bool
glitch
=
false
;
79
80
// Go to map
81
MapDBEntry
*
toMap
=
nullptr
;
82
MapDBEntry
*
parent
=
nullptr
;
83
84
// Go to warp spot on destination map
85
MapDBEntryWarpIn
*
toWarp
=
nullptr
;
86
87
friend
class
MapDBEntry
;
88
friend
class
MapsDB
;
89
friend
class
MapDBEntryWarpIn
;
90
};
MapsDB
The maps database – every map and its full layout, keyed by name.
Definition
mapsdb.h:41
db_autoport.h
Import/export macro for the db library, plus the central list of DB entry pointer types declared opaq...
DB_AUTOPORT
#define DB_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.
Definition
db_autoport.h:37
MapDBEntryWarpIn
A warp-in point: a destination spot other maps' warp-outs land on.
Definition
mapdbentrywarpin.h:35
MapDBEntryWarpOut::MapDBEntryWarpOut
MapDBEntryWarpOut()
Empty entry.
Definition
mapdbentrywarpout.cpp:30
MapDBEntryWarpOut::toMap
MapDBEntry * toMap
Resolved destination map (deepLink).
Definition
mapdbentrywarpout.h:81
MapDBEntryWarpOut::getToWarp
MapDBEntryWarpIn * getToWarp() const
Definition
mapdbentrywarpout.cpp:83
MapDBEntryWarpOut::deepLink
void deepLink()
Resolve the destination map + warp-in.
Definition
mapdbentrywarpout.cpp:44
MapDBEntryWarpOut::toWarp
MapDBEntryWarpIn * toWarp
Resolved destination warp-in (deepLink).
Definition
mapdbentrywarpout.h:85
MapDBEntryWarpOut::MapDBEntry
friend class MapDBEntry
Definition
mapdbentrywarpout.h:87
MapDBEntryWarpOut::getX
int getX() const
< Warp-out tile X.
Definition
mapdbentrywarpout.cpp:123
MapDBEntryWarpOut::getWarp
int getWarp() const
Definition
mapdbentrywarpout.cpp:113
MapDBEntryWarpOut::MapDBEntryWarpIn
friend class MapDBEntryWarpIn
Definition
mapdbentrywarpout.h:89
MapDBEntryWarpOut::qmlRegister
void qmlRegister() const
Register with QML.
Definition
mapdbentrywarpout.cpp:72
MapDBEntryWarpOut::getMap
const QString getMap() const
Definition
mapdbentrywarpout.cpp:108
MapDBEntryWarpOut::MapsDB
friend class MapsDB
Definition
mapdbentrywarpout.h:88
MapDBEntryWarpOut::x
int x
Warp-out tile X.
Definition
mapdbentrywarpout.h:68
MapDBEntryWarpOut::getY
int getY() const
Definition
mapdbentrywarpout.cpp:118
MapDBEntryWarpOut::y
int y
Warp-out tile Y.
Definition
mapdbentrywarpout.h:69
MapDBEntryWarpOut::getParent
MapDBEntry * getParent() const
Definition
mapdbentrywarpout.cpp:93
MapDBEntryWarpOut::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
mapdbentrywarpout.cpp:88
MapDBEntryWarpOut::parent
MapDBEntry * parent
Owning map.
Definition
mapdbentrywarpout.h:82
MapDBEntryWarpOut::map
QString map
Destination map name.
Definition
mapdbentrywarpout.h:75
MapDBEntryWarpOut::getGlitch
bool getGlitch() const
Definition
mapdbentrywarpout.cpp:103
MapDBEntryWarpOut::glitch
bool glitch
Glitch/unintended warp.
Definition
mapdbentrywarpout.h:78
MapDBEntryWarpOut::getToMap
MapDBEntry * getToMap() const
Definition
mapdbentrywarpout.cpp:98
MapDBEntryWarpOut::warp
int warp
Target warp-in index.
Definition
mapdbentrywarpout.h:72
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
projects
db
src
pse-db
entries
mapdbentrywarpout.h
Generated by
1.17.0