|
OpenTTD Source 20251104-master-g3befbdd52f
|
Scanner to find language files in a GameScript directory. More...
Public Member Functions | |
| LanguageScanner (std::weak_ptr< GameStrings > gs, const std::string &exclude) | |
| Initialise. | |
| void | Scan (const std::string &directory) |
| Scan. | |
| bool | AddFile (const std::string &filename, size_t, const std::string &) override |
| Add a file with the given filename. | |
Private Attributes | |
| std::weak_ptr< GameStrings > | gs |
| std::string | exclude |
Additional Inherited Members | |
Protected Member Functions inherited from FileScanner | |
| virtual | ~FileScanner ()=default |
| Destruct the proper one... | |
| uint | Scan (std::string_view extension, Subdirectory sd, bool tars=true, bool recursive=true) |
| Scan for files with the given extension in the given search path. | |
| uint | Scan (std::string_view extension, const std::string &directory, bool recursive=true) |
| Scan for files with the given extension in the given search path. | |
Protected Attributes inherited from FileScanner | |
| Subdirectory | subdir |
| The current sub directory we are searching through. | |
Scanner to find language files in a GameScript directory.
Definition at line 163 of file game_text.cpp.
|
inline |
Initialise.
Definition at line 170 of file game_text.cpp.
|
inlineoverridevirtual |
Add a file with the given filename.
| filename | the full path to the file to read |
| basepath_length | amount of characters to chop of before to get a filename relative to the search path. |
| tar_filename | the name of the tar file the file is read from. |
Implements FileScanner.
Definition at line 180 of file game_text.cpp.
References ReadRawLanguageStrings().
Referenced by LoadTranslations().
|
inline |
Scan.
Definition at line 175 of file game_text.cpp.
References FileScanner::Scan().
Referenced by LoadTranslations().
|
private |
Definition at line 166 of file game_text.cpp.
|
private |
Definition at line 165 of file game_text.cpp.