OpenTTD Source: src/base_media_sounds.h Source File

OpenTTD Source 15.3

base_media_sounds.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef BASE_MEDIA_SOUNDS_H
11#define BASE_MEDIA_SOUNDS_H
12
13#include "base_media_base.h"
14
15 template <> struct BaseSetTraits<struct SoundsSet> {
16 static constexpr size_t num_files = 1;
17 static constexpr bool search_in_tars = true;
18 static constexpr std::string_view set_type = "sounds";
19};
20
22 struct SoundsSet : BaseSet<SoundsSet> {};
23
25 class BaseSounds : public BaseMedia<SoundsSet> {
26public:
28 static inline std::string ini_set;
29};
30
31#endif /* BASE_MEDIA_SOUNDS_H */
base_media_base.h
Generic functions for replacing base data (graphics, sounds).
BaseMedia
Base for all base media (graphics, sounds)
Definition base_media_base.h:163
BaseSounds
All data/functions related with replacing the base sounds.
Definition base_media_sounds.h:25
BaseSounds::ini_set
static std::string ini_set
The set as saved in the config file.
Definition base_media_sounds.h:28
BaseSetTraits
Defines the traits of a BaseSet type.
Definition base_media_base.h:43
BaseSet
Information about a single base set.
Definition base_media_base.h:50
SoundsSet
All data of a sounds set.
Definition base_media_sounds.h:22