diff options
author | rubidium <rubidium@openttd.org> | 2011-08-25 10:37:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-08-25 10:37:28 +0000 |
commit | d839aa04755094827f1aa978707daeb25f8f02dc (patch) | |
tree | 2d4f2dc54877783bff08e822c451a7ca1240ff55 /src/script/script_scanner.hpp | |
parent | 672df52e0c2e2192f7b63acfdbcd6e4f0fa457bf (diff) | |
download | openttd-d839aa04755094827f1aa978707daeb25f8f02dc.tar.xz |
(svn r22836) -Codechange: simplify the scanning of (AI) scripts
Diffstat (limited to 'src/script/script_scanner.hpp')
-rw-r--r-- | src/script/script_scanner.hpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/script/script_scanner.hpp b/src/script/script_scanner.hpp index 415b7f6db..2fba6ef5a 100644 --- a/src/script/script_scanner.hpp +++ b/src/script/script_scanner.hpp @@ -12,10 +12,10 @@ #ifndef SCRIPT_SCANNER_HPP #define SCRIPT_SCANNER_HPP -#include "../fileio_type.h" +#include "../fileio_func.h" /** Scanner to help finding scripts. */ -class ScriptScanner { +class ScriptScanner : public FileScanner { public: ScriptScanner(); ~ScriptScanner(); @@ -30,22 +30,11 @@ public: */ const char *GetMainScript() { return this->main_script; } - /** - * Rescan for scripts. - * @param info_file_name The name of the 'info.nut' file. - * @param search_dir The subdirecotry to search for scripts. - */ - void ScanScriptDir(const char *info_file_name, Subdirectory search_dir); - -private: - /** - * Scan a dir for scripts. - */ - void ScanDir(const char *dirname, const char *info_file_name); + /* virtual */ bool AddFile(const char *filename, size_t basepath_length); protected: class Squirrel *engine; ///< The engine we're scanning with. - char main_script[1024]; ///< The name of the current main script. + char *main_script; ///< The name of the current main script. }; #endif /* SCRIPT_SCANNER_HPP */ |