OpenTTD
|
Generic function implementations for base data (graphics, sounds). More...
#include "base_media_base.h"
#include "debug.h"
#include "ini_type.h"
#include "string_func.h"
#include "network/network_content.h"
Go to the source code of this file.
Macros | |
#define | fetch_metadata(name) |
Try to read a single piece of metadata and return false if it doesn't exist. | |
#define | INSTANTIATE_BASE_MEDIA_METHODS(repl_type, set_type) |
Force instantiation of methods so we don't get linker errors. |
Functions | |
template<class Tbase_set > | |
const char * | TryGetBaseSetFile (const ContentInfo *ci, bool md5sum, const Tbase_set *s) |
Check whether there's a base set matching some information. |
Generic function implementations for base data (graphics, sounds).
Definition in file base_media_func.h.
#define fetch_metadata | ( | name | ) |
Try to read a single piece of metadata and return false if it doesn't exist.
name | the name of the item to fetch. |
Definition at line 29 of file base_media_func.h.
Referenced by BaseSet< T, Tnum_files, Tsearch_in_tars >::FillSetDetails().
#define INSTANTIATE_BASE_MEDIA_METHODS | ( | repl_type, | |
set_type | |||
) |
Force instantiation of methods so we don't get linker errors.
repl_type | the type of the BaseMedia to instantiate |
set_type | the type of the BaseSet to instantiate |
Definition at line 400 of file base_media_func.h.
const char* 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. |
NULL
if there is no match. Definition at line 286 of file base_media_func.h.
References ContentInfo::md5sum, and ContentInfo::unique_id.
Referenced by ContentInfo::GetTextfile(), and BaseMedia< Tbase_set >::HasSet().