OpenTTD Source 20260421-master-gc2fbc6fdeb
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
9
10#ifndef BASE_MEDIA_SOUNDS_H
11#define BASE_MEDIA_SOUNDS_H
12
13#include "base_media_base.h"
14
16template <> struct BaseSetTraits<struct SoundsSet> {
17 static constexpr size_t num_files = 1;
18 static constexpr bool search_in_tars = true;
19 static constexpr std::string_view set_type = "sounds";
20};
21
23struct SoundsSet : BaseSet<SoundsSet> {};
24
26class BaseSounds : public BaseMedia<SoundsSet> {
27public:
29 static inline std::string ini_set;
30};
31
32#endif /* BASE_MEDIA_SOUNDS_H */
Generic functions for replacing base data (graphics, sounds).
Base for all base media (graphics, sounds).
All data/functions related with replacing the base sounds.
static std::string ini_set
The set as saved in the config file.
static constexpr size_t num_files
Number of files in a sound set.
static constexpr bool search_in_tars
Sounds can be in a tar file.
static constexpr std::string_view set_type
The type of set.
Defines the traits of a BaseSet type.
Information about a single base set.
All data of a sounds set.