Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
signdata.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
MapDBEntrySign
;
24
struct
TmpSignPos
;
25
36
class
SAVEFILE_AUTOPORT
SignData
:
public
QObject
37
{
38
Q_OBJECT
39
40
Q_PROPERTY(
int
x
MEMBER
x
NOTIFY
xChanged
)
41
Q_PROPERTY(
int
y
MEMBER
y
NOTIFY
yChanged
)
42
Q_PROPERTY(
int
txtId
MEMBER
txtId
NOTIFY
txtIdChanged
)
43
44
public
:
45
SignData
(
SaveFile
* saveFile =
nullptr
,
var8
index = 0);
46
virtual
~SignData
();
47
48
void
load
(
SaveFile
* saveFile =
nullptr
,
var8
index = 0);
49
void
save
(
SaveFile
* saveFile,
var8
index);
50
51
signals:
52
void
xChanged
();
53
void
yChanged
();
54
void
txtIdChanged
();
55
56
public
slots:
57
void
reset
();
58
void
randomize
(QVector<TmpSignPos*>* tmpPos =
nullptr
);
59
static
QVector<SignData*>
randomizeAll
(QVector<MapDBEntrySign*> mapSigns);
60
61
void
setTo
(
MapDBEntrySign
* signData);
62
static
QVector<SignData*>
setToAll
(QVector<MapDBEntrySign*> mapSigns);
63
64
public
:
65
int
x
;
66
int
y
;
67
int
txtId
;
68
};
SaveFile
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition
savefile.h:46
SignData::setTo
void setTo(MapDBEntrySign *signData)
Copy values from a map-defined sign.
Definition
signdata.cpp:118
SignData::load
void load(SaveFile *saveFile=nullptr, var8 index=0)
Expand sign index from the save.
Definition
signdata.cpp:42
SignData::yChanged
void yChanged()
SignData::randomize
void randomize(QVector< TmpSignPos * > *tmpPos=nullptr)
Randomize position (avoiding tmpPos clashes).
Definition
signdata.cpp:151
SignData::txtIdChanged
void txtIdChanged()
SignData::xChanged
protected::void xChanged()
SignData::txtId
int txtId
Definition
signdata.h:67
SignData::save
void save(SaveFile *saveFile, var8 index)
Flatten sign index to the save.
Definition
signdata.cpp:63
SignData::SignData
SignData(SaveFile *saveFile=nullptr, var8 index=0)
< Sign tile X.
Definition
signdata.cpp:35
SignData::y
int y
Definition
signdata.h:66
SignData::reset
void reset()
Blank this sign.
Definition
signdata.cpp:75
SignData::randomizeAll
static QVector< SignData * > randomizeAll(QVector< MapDBEntrySign * > mapSigns)
Randomize a whole map's signs.
Definition
signdata.cpp:87
SignData::x
int x
Definition
signdata.h:65
SignData::setToAll
static QVector< SignData * > setToAll(QVector< MapDBEntrySign * > mapSigns)
Build signs from a map's sign list.
Definition
signdata.cpp:135
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
MapDBEntrySign
One sign defined on a map: its position and text id.
Definition
mapdbentrysign.h:33
TmpSignPos
Definition
signdata.cpp:30
projects
savefile
src
pse-savefile
expanded
fragments
signdata.h
Generated by
1.17.0