Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
areaaudio.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
AreaAudio
:
public
QObject
35
{
36
Q_OBJECT
37
38
Q_PROPERTY(
int
musicID
MEMBER
musicID
NOTIFY
musicIDChanged
)
39
Q_PROPERTY(
int
musicBank
MEMBER
musicBank
NOTIFY
musicBankChanged
)
40
Q_PROPERTY(
bool
noAudioFadeout
MEMBER
noAudioFadeout
NOTIFY
noAudioFadeoutChanged
)
41
Q_PROPERTY(
bool
preventMusicChange
MEMBER
preventMusicChange
NOTIFY
preventMusicChangeChanged
)
42
43
public
:
44
AreaAudio
(
SaveFile
* saveFile =
nullptr
);
45
virtual
~AreaAudio
();
46
47
void
load
(
SaveFile
* saveFile =
nullptr
);
48
void
save
(
SaveFile
* saveFile);
49
50
signals:
51
void
musicIDChanged
();
52
void
musicBankChanged
();
53
void
noAudioFadeoutChanged
();
54
void
preventMusicChangeChanged
();
55
56
public
slots:
57
void
reset
();
58
void
randomize
();
59
void
setTo
(
MapDBEntry
* map);
60
61
public
:
62
int
musicID
;
63
int
musicBank
;
64
bool
noAudioFadeout
;
65
bool
preventMusicChange
;
66
};
AreaAudio::AreaAudio
AreaAudio(SaveFile *saveFile=nullptr)
< Playing track id.
Definition
areaaudio.cpp:31
AreaAudio::musicBank
int musicBank
Definition
areaaudio.h:63
AreaAudio::setTo
void setTo(MapDBEntry *map)
Set music to map's default.
Definition
areaaudio.cpp:99
AreaAudio::randomize
void randomize()
Randomize the track.
Definition
areaaudio.cpp:84
AreaAudio::musicID
int musicID
Definition
areaaudio.h:62
AreaAudio::preventMusicChange
bool preventMusicChange
Definition
areaaudio.h:65
AreaAudio::preventMusicChangeChanged
void preventMusicChangeChanged()
AreaAudio::musicIDChanged
protected::void musicIDChanged()
AreaAudio::noAudioFadeout
bool noAudioFadeout
Definition
areaaudio.h:64
AreaAudio::save
void save(SaveFile *saveFile)
Flatten audio settings to the save.
Definition
areaaudio.cpp:59
AreaAudio::reset
void reset()
Blank audio settings.
Definition
areaaudio.cpp:69
AreaAudio::noAudioFadeoutChanged
void noAudioFadeoutChanged()
AreaAudio::musicBankChanged
void musicBankChanged()
AreaAudio::load
void load(SaveFile *saveFile=nullptr)
Expand audio settings from the save.
Definition
areaaudio.cpp:38
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
areaaudio.h
Generated by
1.17.0