Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
warpdata.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 <QVector>
19
#include <
pse-common/types.h
>
20
#include "
../../savefile_autoport.h
"
21
22
class
SaveFile
;
23
class
MapDBEntry
;
24
class
MapDBEntryWarpOut
;
25
35
class
SAVEFILE_AUTOPORT
WarpData
:
public
QObject
36
{
37
Q_OBJECT
38
39
Q_PROPERTY(
int
y
MEMBER
y
NOTIFY
yChanged
)
40
Q_PROPERTY(
int
x
MEMBER
x
NOTIFY
xChanged
)
41
Q_PROPERTY(
int
destWarp
MEMBER
destWarp
NOTIFY
destWarpChanged
)
42
Q_PROPERTY(
int
destMap
MEMBER
destMap
NOTIFY
destMapChanged
)
43
44
public
:
45
WarpData
(
SaveFile
* saveFile =
nullptr
,
var8
index = 0);
46
WarpData
(
MapDBEntryWarpOut
* warp);
47
virtual
~WarpData
();
48
49
void
load
(
SaveFile
* saveFile =
nullptr
,
var8
index = 0);
50
void
load
(
MapDBEntryWarpOut
* warp);
51
void
save
(
SaveFile
* saveFile,
var8
index);
52
53
MapDBEntry
*
toMap
();
54
55
signals:
56
void
yChanged
();
57
void
xChanged
();
58
void
destWarpChanged
();
59
void
destMapChanged
();
60
61
public
slots:
62
void
reset
();
63
void
randomize
();
64
65
public
:
66
int
y
;
67
int
x
;
68
int
destWarp
;
69
int
destMap
;
70
};
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
WarpData::load
void load(SaveFile *saveFile=nullptr, var8 index=0)
Expand warp index from the save.
Definition
warpdata.cpp:45
WarpData::WarpData
WarpData(SaveFile *saveFile=nullptr, var8 index=0)
< Warp tile Y.
Definition
warpdata.cpp:33
WarpData::destMap
int destMap
Definition
warpdata.h:69
WarpData::x
int x
Definition
warpdata.h:67
WarpData::reset
void reset()
Blank this warp.
Definition
warpdata.cpp:96
WarpData::randomize
void randomize()
Randomize this warp.
Definition
warpdata.cpp:111
WarpData::save
void save(SaveFile *saveFile, var8 index)
Flatten warp index to the save.
Definition
warpdata.cpp:84
WarpData::destMapChanged
void destMapChanged()
WarpData::xChanged
void xChanged()
WarpData::toMap
MapDBEntry * toMap()
The destination map's DB entry.
Definition
warpdata.cpp:134
WarpData::destWarpChanged
void destWarpChanged()
WarpData::y
int y
Definition
warpdata.h:66
WarpData::destWarp
int destWarp
Definition
warpdata.h:68
WarpData::yChanged
protected::void yChanged()
types.h
Project-wide fixed-width integer aliases (var8, var16, ...).
var8
var8e var8
Everyday 8-bit alias. Exact (not "fastest") to dodge the pointer-width bug noted above.
Definition
types.h:124
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
MapDBEntryWarpOut
A warp-out point: a tile that warps the player to another map.
Definition
mapdbentrywarpout.h:37
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
projects
savefile
src
pse-savefile
expanded
fragments
warpdata.h
Generated by
1.17.0