|
OpenTTD Source
1.10.0-RC1
|
Scanner to find the unique IDs of scenarios. More...
Public Member Functions | |
| ScenarioScanner () | |
| Initialise. | |
| void | Scan (bool rescan) |
| Scan, but only if it's needed. More... | |
| bool | AddFile (const char *filename, size_t basepath_length, const char *tar_filename) override |
| Add a file with the given filename. More... | |
Private Attributes | |
| bool | scanned |
| Whether we've already scanned. | |
Additional Inherited Members | |
Protected Member Functions inherited from FileScanner | |
| virtual | ~FileScanner () |
| Destruct the proper one... More... | |
| uint | Scan (const char *extension, Subdirectory sd, bool tars=true, bool recursive=true) |
| Scan for files with the given extension in the given search path. More... | |
| uint | Scan (const char *extension, const char *directory, bool recursive=true) |
| Scan for files with the given extension in the given search path. More... | |
Protected Attributes inherited from FileScanner | |
| Subdirectory | subdir |
| The current sub directory we are searching through. | |
|
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. |
< filename without the extension.
Implements FileScanner.
Definition at line 694 of file fios.cpp.
References FioFCloseFile(), FioFOpenFile(), lastof, SCENARIO_DIR, and strecpy().
|
inline |
Scan, but only if it's needed.
| rescan | whether to force scanning even when it's not necessary |
Definition at line 686 of file fios.cpp.
References FileScanner::Scan(), and SCENARIO_DIR.
Referenced by FindScenario(), and ScanScenarios().