OpenTTD Source 20241224-master-gee860a5c8e
|
The songs that OpenTTD knows. More...
#include "stdafx.h"
#include "string_func.h"
#include "base_media_func.h"
#include "random_access_file_type.h"
#include "safeguards.h"
Go to the source code of this file.
Macros | |
#define | SET_TYPE "music" |
The type of set we're replacing. | |
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 char *const | _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 52 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 28 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.