Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
rival.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 <QString>
19
#include <
pse-common/types.h
>
20
#include "
../savefile_autoport.h
"
21
22
class
SaveFile
;
23
33
class
SAVEFILE_AUTOPORT
Rival
:
public
QObject
34
{
35
Q_OBJECT
36
37
Q_PROPERTY(QString
name
MEMBER
name
NOTIFY
nameChanged
)
38
Q_PROPERTY(
int
starter
MEMBER
starter
NOTIFY
starterChanged
)
39
40
public
:
41
Rival
(
SaveFile
* saveFile =
nullptr
);
42
virtual
~Rival
();
43
44
void
load
(
SaveFile
* saveFile =
nullptr
);
45
void
save
(
SaveFile
* saveFile);
46
47
signals:
48
void
nameChanged
();
49
void
starterChanged
();
50
51
public
slots:
52
void
reset
();
53
void
randomize
();
54
55
public
:
56
// Rival's Name and Starter Pokemon
57
// This essentially selects his team that he uses to battle you, it goes
58
// by internal Pokemon index and only 3 options are valid, Charmander,
59
// Bulbasaur, and Squirtle. I have no idea what will happen if you put a
60
// different value in here.
61
QString
name
;
62
int
starter
;
63
};
Rival::reset
void reset()
Blank the rival.
Definition
rival.cpp:61
Rival::save
void save(SaveFile *saveFile)
Flatten the rival data to the save.
Definition
rival.cpp:53
Rival::name
QString name
Definition
rival.h:61
Rival::starter
int starter
Definition
rival.h:62
Rival::Rival
Rival(SaveFile *saveFile=nullptr)
< Rival's name.
Definition
rival.cpp:30
Rival::nameChanged
protected::void nameChanged()
Rival::starterChanged
void starterChanged()
Rival::randomize
void randomize()
Randomize the rival's name/starter.
Definition
rival.cpp:70
Rival::load
void load(SaveFile *saveFile=nullptr)
Expand the rival data from the save.
Definition
rival.cpp:37
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, ...).
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
projects
savefile
src
pse-savefile
expanded
rival.h
Generated by
1.17.0