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