forked from mirror/OpenTTD
(svn r23217) -Codechange: introduce the concept of scanning only in a limited set of sub directories
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#ifndef FILEIO_FUNC_H
|
||||
#define FILEIO_FUNC_H
|
||||
|
||||
#include "core/enum_type.hpp"
|
||||
#include "fileio_type.h"
|
||||
|
||||
void FioSeekTo(size_t pos, int mode);
|
||||
@@ -92,12 +93,24 @@ public:
|
||||
class TarScanner : FileScanner {
|
||||
uint DoScan(Subdirectory sd);
|
||||
public:
|
||||
/** The mode of tar scanning. */
|
||||
enum Mode {
|
||||
NONE = 0, ///< Scan nothing.
|
||||
BASESET = 1 << 0, ///< Scan for base sets.
|
||||
NEWGRF = 1 << 1, ///< Scan for non-base sets.
|
||||
AI = 1 << 2, ///< Scan for AIs and its libraries.
|
||||
SCENARIO = 1 << 3, ///< Scan for scenarios and heightmaps.
|
||||
ALL = BASESET | NEWGRF | AI | SCENARIO ///< Scan for everything.
|
||||
};
|
||||
|
||||
/* virtual */ bool AddFile(const char *filename, size_t basepath_length, const char *tar_filename = NULL);
|
||||
|
||||
/** Do the scan for Tars. */
|
||||
static uint DoScan();
|
||||
static uint DoScan(TarScanner::Mode mode);
|
||||
};
|
||||
|
||||
DECLARE_ENUM_AS_BIT_SET(TarScanner::Mode)
|
||||
|
||||
/* Implementation of opendir/readdir/closedir for Windows */
|
||||
#if defined(WIN32)
|
||||
#include <windows.h>
|
||||
|
Reference in New Issue
Block a user