Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
hofpokemon.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
struct
PokemonDBEntry
;
24
33
class
SAVEFILE_AUTOPORT
HoFPokemon
:
public
QObject
34
{
35
Q_OBJECT
36
37
Q_PROPERTY(
int
species
MEMBER
species
NOTIFY
speciesChanged
)
38
Q_PROPERTY(
int
level
MEMBER
level
NOTIFY
levelChanged
)
39
Q_PROPERTY(QString
name
MEMBER
name
NOTIFY
nameChanged
)
40
41
public
:
43
HoFPokemon
(
SaveFile
* saveFile =
nullptr
,
var16
recordOffset = 0,
var16
ind = 0);
44
virtual
~HoFPokemon
();
45
46
void
load
(
SaveFile
* saveFile =
nullptr
,
var16
recordOffset = 0,
var16
ind = 0);
47
void
save
(
SaveFile
* saveFile,
var16
recordOffset,
var16
ind);
48
49
PokemonDBEntry
*
toSpecies
();
50
51
signals:
52
void
speciesChanged
();
53
void
levelChanged
();
54
void
nameChanged
();
55
56
public
slots:
57
void
reset
();
58
void
randomize
();
59
60
public
:
61
int
species
;
62
int
level
;
63
QString
name
;
64
};
HoFPokemon::name
QString name
Definition
hofpokemon.h:63
HoFPokemon::nameChanged
void nameChanged()
HoFPokemon::levelChanged
void levelChanged()
HoFPokemon::reset
void reset()
Blank this entry.
Definition
hofpokemon.cpp:83
HoFPokemon::save
void save(SaveFile *saveFile, var16 recordOffset, var16 ind)
Flatten to the save.
Definition
hofpokemon.cpp:70
HoFPokemon::species
int species
Definition
hofpokemon.h:61
HoFPokemon::level
int level
Definition
hofpokemon.h:62
HoFPokemon::randomize
void randomize()
Randomize this entry.
Definition
hofpokemon.cpp:95
HoFPokemon::load
void load(SaveFile *saveFile=nullptr, var16 recordOffset=0, var16 ind=0)
Expand from the save.
Definition
hofpokemon.cpp:37
HoFPokemon::HoFPokemon
HoFPokemon(SaveFile *saveFile=nullptr, var16 recordOffset=0, var16 ind=0)
< Species id.
Definition
hofpokemon.cpp:30
HoFPokemon::toSpecies
PokemonDBEntry * toSpecies()
Resolve species to its DB entry.
Definition
hofpokemon.cpp:118
HoFPokemon::speciesChanged
protected::void speciesChanged()
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
PokemonDBEntry
One species' complete static data – the richest entry in the db layer.
Definition
pokemon.h:98
projects
savefile
src
pse-savefile
expanded
fragments
hofpokemon.h
Generated by
1.17.0