Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
playerpokemon.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 "
../fragments/pokemonstoragebox.h
"
21
#include "
../fragments/pokemonparty.h
"
22
#include "
../../savefile_autoport.h
"
23
24
class
SaveFile
;
25
class
PlayerBasics
;
26
class
PokemonParty
;
27
28
constexpr
var8
maxParty
= 6;
29
41
class
SAVEFILE_AUTOPORT
PlayerPokemon
:
public
PokemonStorageBox
42
{
43
Q_OBJECT
44
45
public
:
46
PlayerPokemon
(
SaveFile
* saveFile =
nullptr
);
47
virtual
~PlayerPokemon
();
48
50
virtual
void
load
(
SaveFile
* saveFile =
nullptr
,
var16
boxOffset = 0);
52
virtual
void
save
(
SaveFile
* saveFile,
var16
boxOffset = 0);
53
54
Q_INVOKABLE
PokemonParty
*
partyAt
(
int
ind);
55
56
public
slots:
57
virtual
void
randomize
(
PlayerBasics
* basics);
58
virtual
void
pokemonNew
();
59
};
PlayerBasics
The trainer's headline values: name, ID, money, coins, badges, starter.
Definition
playerbasics.h:67
PlayerPokemon::partyAt
PokemonParty * partyAt(int ind)
Party member at ind (GC-protected return).
Definition
playerpokemon.cpp:99
PlayerPokemon::PlayerPokemon
PlayerPokemon(SaveFile *saveFile=nullptr)
Definition
playerpokemon.cpp:34
PokemonParty
A party Pokemon: a PokemonBox plus the five pre-generated battle stats.
Definition
pokemonparty.h:36
PokemonStorageBox::randomize
virtual void randomize(PlayerBasics *basics)
Fill with constrained random mons.
Definition
pokemonstoragebox.cpp:224
PokemonStorageBox::pokemonNew
virtual void pokemonNew()
Add a fresh mon.
Definition
pokemonstoragebox.cpp:115
PokemonStorageBox::load
virtual void load(SaveFile *saveFile=nullptr, var16 boxOffset=0)
Expand the box from the save.
Definition
pokemonstoragebox.cpp:160
PokemonStorageBox::save
virtual void save(SaveFile *saveFile, var16 boxOffset=0)
Flatten the box to the save.
Definition
pokemonstoragebox.cpp:186
PokemonStorageBox::PokemonStorageBox
PokemonStorageBox(int maxSize=boxMaxPokemon, SaveFile *saveFile=nullptr, var16 boxOffset=0)
< How many mons are in the box.
Definition
pokemonstoragebox.cpp:34
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, ...).
var8
var8e var8
Everyday 8-bit alias. Exact (not "fastest") to dodge the pointer-width bug noted above.
Definition
types.h:124
var16
var16e var16
Everyday 16-bit alias. Exact width to avoid the "fastest" widening bug.
Definition
types.h:125
maxParty
constexpr var8 maxParty
Maximum Pokemon in the active party.
Definition
playerpokemon.h:28
pokemonparty.h
pokemonstoragebox.h
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
player
playerpokemon.h
Generated by
1.17.0