Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
mapconndata.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 <
pse-common/types.h
>
19
#include "
../../savefile_autoport.h
"
20
21
class
SaveFile
;
22
struct
MapDBEntry
;
23
struct
MapDBEntryConnect
;
24
36
class
SAVEFILE_AUTOPORT
MapConnData
:
public
QObject
37
{
38
Q_OBJECT
39
40
Q_PROPERTY(
int
mapPtr
MEMBER
mapPtr
NOTIFY
mapPtrChanged
)
41
Q_PROPERTY(
int
stripSrc
MEMBER
stripSrc
NOTIFY
stripSrcChanged
)
42
Q_PROPERTY(
int
stripDst
MEMBER
stripDst
NOTIFY
stripDstChanged
)
43
Q_PROPERTY(
int
stripWidth
MEMBER
stripWidth
NOTIFY
stripWidthChanged
)
44
Q_PROPERTY(
int
width
MEMBER
width
NOTIFY
widthChanged
)
45
Q_PROPERTY(
int
yAlign
MEMBER
yAlign
NOTIFY
yAlignChanged
)
46
Q_PROPERTY(
int
xAlign
MEMBER
xAlign
NOTIFY
xAlignChanged
)
47
Q_PROPERTY(
int
viewPtr
MEMBER
viewPtr
NOTIFY
viewPtrChanged
)
48
49
public
:
50
MapConnData
(
SaveFile
* saveFile =
nullptr
,
var16
offset = 0);
51
virtual
~MapConnData
();
52
53
void
load
(
SaveFile
* saveFile =
nullptr
,
var16
offset = 0);
54
void
save
(
SaveFile
* saveFile,
var16
offset);
55
void
loadFromData
(
MapDBEntryConnect
* connect);
56
57
MapDBEntry
*
toMap
();
58
59
signals:
60
void
mapPtrChanged
();
61
void
stripSrcChanged
();
62
void
stripDstChanged
();
63
void
stripWidthChanged
();
64
void
widthChanged
();
65
void
yAlignChanged
();
66
void
xAlignChanged
();
67
void
viewPtrChanged
();
68
69
public
slots:
70
void
reset
();
71
72
public
:
73
int
mapPtr
;
74
int
stripSrc
;
75
int
stripDst
;
76
int
stripWidth
;
77
int
width
;
78
int
yAlign
;
79
int
xAlign
;
80
int
viewPtr
;
81
};
MapConnData::loadFromData
void loadFromData(MapDBEntryConnect *connect)
Populate from a map-defined connection.
Definition
mapconndata.cpp:119
MapConnData::xAlignChanged
void xAlignChanged()
MapConnData::stripDstChanged
void stripDstChanged()
MapConnData::widthChanged
void widthChanged()
MapConnData::stripSrcChanged
void stripSrcChanged()
MapConnData::stripWidth
int stripWidth
Definition
mapconndata.h:76
MapConnData::stripWidthChanged
void stripWidthChanged()
MapConnData::reset
void reset()
Blank this connection.
Definition
mapconndata.cpp:92
MapConnData::toMap
MapDBEntry * toMap()
The connected map's DB entry.
Definition
mapconndata.cpp:145
MapConnData::mapPtrChanged
protected::void mapPtrChanged()
MapConnData::load
void load(SaveFile *saveFile=nullptr, var16 offset=0)
Expand a connection block from the save.
Definition
mapconndata.cpp:39
MapConnData::stripDst
int stripDst
Definition
mapconndata.h:75
MapConnData::width
int width
Definition
mapconndata.h:77
MapConnData::mapPtr
int mapPtr
Definition
mapconndata.h:73
MapConnData::save
void save(SaveFile *saveFile, var16 offset)
Flatten a connection block to the save.
Definition
mapconndata.cpp:76
MapConnData::yAlign
int yAlign
Definition
mapconndata.h:78
MapConnData::yAlignChanged
void yAlignChanged()
MapConnData::MapConnData
MapConnData(SaveFile *saveFile=nullptr, var16 offset=0)
< Pointer to the connected map's data.
Definition
mapconndata.cpp:32
MapConnData::viewPtr
int viewPtr
Definition
mapconndata.h:80
MapConnData::xAlign
int xAlign
Definition
mapconndata.h:79
MapConnData::viewPtrChanged
void viewPtrChanged()
MapConnData::stripSrc
int stripSrc
Definition
mapconndata.h:74
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
types.h
Project-wide fixed-width integer aliases (var8, var16, ...).
var16
var16e var16
Everyday 16-bit alias. Exact width to avoid the "fastest" widening bug.
Definition
types.h:125
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
MapDBEntryConnect
One edge connection of a map (the seam to a neighbouring map).
Definition
mapdbentryconnect.h:60
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
projects
savefile
src
pse-savefile
expanded
fragments
mapconndata.h
Generated by
1.17.0