Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
areanpc.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 <pse-common/types.h>
20
21class SaveFile;
22class MapDBEntry;
23
34class SAVEFILE_AUTOPORT AreaNPC : public QObject
35{
36 Q_OBJECT
37
38 Q_PROPERTY(bool npcsFaceAway MEMBER npcsFaceAway NOTIFY npcsFaceAwayChanged)
42 Q_PROPERTY(bool ignoreJoypad MEMBER ignoreJoypad NOTIFY ignoreJoypadChanged)
43 Q_PROPERTY(bool joypadSimulation MEMBER joypadSimulation NOTIFY joypadSimulationChanged)
46 Q_PROPERTY(int trainerHeaderPtr MEMBER trainerHeaderPtr NOTIFY trainerHeaderPtrChanged)
47
48public:
49 AreaNPC(SaveFile* saveFile = nullptr);
50 virtual ~AreaNPC();
51
52 void load(SaveFile* saveFile = nullptr);
53 void save(SaveFile* saveFile);
54
55signals:
65
66public slots:
67 void reset();
68 void randomize();
69 void setTo(MapDBEntry* map);
70
71public:
72 // Sprites
77
78 // Controls
81
82 // Battle
86};
bool npcSpriteMovement
Definition areanpc.h:75
void trainerWantsBattleChanged()
void tradeCenterSpritesFacedChanged()
bool npcsFaceAway
Definition areanpc.h:73
void load(SaveFile *saveFile=nullptr)
Expand these flags from the save.
Definition areanpc.cpp:35
AreaNPC(SaveFile *saveFile=nullptr)
< NPCs face away from the player.
Definition areanpc.cpp:28
void trainerHeaderPtrChanged()
bool ignoreJoypad
Definition areanpc.h:79
void randomize()
Randomize the flags.
Definition areanpc.cpp:125
void npcSpriteMovementChanged()
void scriptedNPCMovementChanged()
void ignoreJoypadChanged()
protected::void npcsFaceAwayChanged()
void joypadSimulationChanged()
bool scriptedNPCMovement
Definition areanpc.h:74
bool trainerWantsBattle
Definition areanpc.h:84
bool runningTestBattle
Definition areanpc.h:83
int trainerHeaderPtr
Definition areanpc.h:85
bool joypadSimulation
Definition areanpc.h:80
void save(SaveFile *saveFile)
Flatten these flags to the save.
Definition areanpc.cpp:72
void reset()
Blank the flags.
Definition areanpc.cpp:87
bool tradeCenterSpritesFaced
Definition areanpc.h:76
void runningTestBattleChanged()
void setTo(MapDBEntry *map)
Set from a chosen map's defaults.
Definition areanpc.cpp:130
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, ...).
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 map's complete static definition – the root of the MapDBEntry family.
Definition mapdbentry.h:56