OpenTTD Source 20250502-master-ge0a9c7d818
|
Generic functions for replacing base data (graphics, sounds). More...
#include "fileio_func.h"
#include "textfile_type.h"
#include "textfile_gui.h"
#include "3rdparty/md5/md5.h"
#include <unordered_map>
Go to the source code of this file.
Data Structures | |
struct | MD5File |
Structure holding filename and MD5 information about a single file. More... | |
struct | BaseSet< T > |
Information about a single base set. More... | |
class | BaseMedia< Tbase_set > |
Base for all base media (graphics, sounds) More... | |
Functions | |
template<class Tbase_set > | |
std::optional< std::string_view > | TryGetBaseSetFile (const ContentInfo &ci, bool md5sum, const Tbase_set *s) |
Check whether there's a base set matching some information. | |
Generic functions for replacing base data (graphics, sounds).
Definition in file base_media_base.h.
std::optional< std::string_view > TryGetBaseSetFile | ( | const ContentInfo & | ci, |
bool | md5sum, | ||
const Tbase_set * | s | ||
) |
Check whether there's a base set matching some information.
ci | The content info to compare it to. |
md5sum | Should the MD5 checksum be tested as well? |
s | The list with sets. |
std::nullopt
if there is no match. Definition at line 345 of file base_media_func.h.
References MD5File::hash, ContentInfo::md5sum, and ContentInfo::unique_id.
Referenced by ContentInfo::GetTextfile(), and BaseMedia< Tbase_set >::HasSet().