|
OpenTTD Source 20251117-master-g7398d2e290
|
The songs that OpenTTD knows. More...
#include "stdafx.h"#include "string_func.h"#include "base_media_func.h"#include "base_media_music.h"#include "random_access_file_type.h"#include "core/string_consumer.hpp"#include "safeguards.h"Go to the source code of this file.
Functions | |
| std::optional< std::string > | GetMusicCatEntryName (const std::string &filename, size_t entrynum) |
| Read the name of a music CAT file entry. | |
| std::optional< std::vector< uint8_t > > | GetMusicCatEntryData (const std::string &filename, size_t entrynum) |
| Read the full data of a music CAT file entry. | |
Variables | |
| static const std::string_view | _music_file_names [] |
| Names corresponding to the music set's files. | |
The songs that OpenTTD knows.
Definition in file music.cpp.
| std::optional< std::vector< uint8_t > > GetMusicCatEntryData | ( | const std::string & | filename, |
| size_t | entrynum | ||
| ) |
Read the full data of a music CAT file entry.
| filename | Name of CAT file to read from. |
| entrynum | Index of entry to read |
Definition at line 50 of file music.cpp.
References BASESET_DIR, FioCheckFileExists(), RandomAccessFile::ReadBlock(), RandomAccessFile::ReadByte(), RandomAccessFile::ReadDword(), RandomAccessFile::SeekTo(), and RandomAccessFile::SkipBytes().
Referenced by MidiFile::GetSMFFile().
| std::optional< std::string > GetMusicCatEntryName | ( | const std::string & | filename, |
| size_t | entrynum | ||
| ) |
Read the name of a music CAT file entry.
| filename | Name of CAT file to read from |
| entrynum | Index of entry whose name to read |
Definition at line 26 of file music.cpp.
References BASESET_DIR, FioCheckFileExists(), RandomAccessFile::ReadBlock(), RandomAccessFile::ReadByte(), RandomAccessFile::ReadDword(), RandomAccessFile::SeekTo(), and StrMakeValid().
|
static |
Names corresponding to the music set's files.