Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
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>
21
22class SaveFile;
23struct PokemonDBEntry;
24
33class 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
41public:
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
50
51signals:
55
56public slots:
57 void reset();
58 void randomize();
59
60public:
61 int species;
62 int level;
63 QString name;
64};
QString name
Definition hofpokemon.h:63
void nameChanged()
void levelChanged()
void reset()
Blank this entry.
void save(SaveFile *saveFile, var16 recordOffset, var16 ind)
Flatten to the save.
void randomize()
Randomize this entry.
void load(SaveFile *saveFile=nullptr, var16 recordOffset=0, var16 ind=0)
Expand from the save.
HoFPokemon(SaveFile *saveFile=nullptr, var16 recordOffset=0, var16 ind=0)
< Species id.
PokemonDBEntry * toSpecies()
Resolve species to its DB entry.
protected::void speciesChanged()
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Definition savefile.h:46
Project-wide fixed-width integer aliases (var8, var16, ...).
var16e var16
Everyday 16-bit alias. Exact width to avoid the "fastest" widening bug.
Definition types.h:125
Import/export macro for the savefile library, plus the central list of QObject types kept deliberatel...
#define SAVEFILE_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.
One species' complete static data – the richest entry in the db layer.
Definition pokemon.h:98