Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
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>
20
21class SaveFile;
22class MapDBEntry;
23
34class 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)
42
43public:
44 AreaAudio(SaveFile* saveFile = nullptr);
45 virtual ~AreaAudio();
46
47 void load(SaveFile* saveFile = nullptr);
48 void save(SaveFile* saveFile);
49
50signals:
55
56public slots:
57 void reset();
58 void randomize();
59 void setTo(MapDBEntry* map);
60
61public:
62 int musicID;
66};
AreaAudio(SaveFile *saveFile=nullptr)
< Playing track id.
Definition areaaudio.cpp:31
int musicBank
Definition areaaudio.h:63
void setTo(MapDBEntry *map)
Set music to map's default.
Definition areaaudio.cpp:99
void randomize()
Randomize the track.
Definition areaaudio.cpp:84
int musicID
Definition areaaudio.h:62
bool preventMusicChange
Definition areaaudio.h:65
void preventMusicChangeChanged()
protected::void musicIDChanged()
bool noAudioFadeout
Definition areaaudio.h:64
void save(SaveFile *saveFile)
Flatten audio settings to the save.
Definition areaaudio.cpp:59
void reset()
Blank audio settings.
Definition areaaudio.cpp:69
void noAudioFadeoutChanged()
void musicBankChanged()
void load(SaveFile *saveFile=nullptr)
Expand audio settings from the save.
Definition areaaudio.cpp:38
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