diff options
author | truebrain <truebrain@openttd.org> | 2009-01-15 18:15:12 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2009-01-15 18:15:12 +0000 |
commit | ef62688522218c50bed25bd8383e82365d91cdb0 (patch) | |
tree | fe14c05c0a3bd9c3c4546610ab53a830dc6bab9b /src/ai/ai_scanner.hpp | |
parent | a039ec0d21008668b79509d097b9a6f59ea64977 (diff) | |
download | openttd-ef62688522218c50bed25bd8383e82365d91cdb0.tar.xz |
(svn r15095) -Add [NoAI]: allow AI Libraries to be in .tar files (subdir required, as with AIs
-Add [NoAI]: allow multiple versions of the same AI co-exist
-Change [NoAI]: updated the whole method of AI (Library) finding and loading; it is now much more clear and transparent
-Change [NoAI]: the name of the AI is now the name used by CreateInstance()
-Change [NoAI]: make the AI finder a bit more clever, mostly related to version finding
Diffstat (limited to 'src/ai/ai_scanner.hpp')
-rw-r--r-- | src/ai/ai_scanner.hpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp index 672e5102e..c974e14f7 100644 --- a/src/ai/ai_scanner.hpp +++ b/src/ai/ai_scanner.hpp @@ -60,14 +60,9 @@ public: class Squirrel *GetEngine() { return this->engine; } /** - * Get the current script the ScanDir is looking at. + * Get the current main script the ScanDir is currently tracking. */ - const char *GetCurrentScript() { return this->current_script; } - - /** - * Get the directory of the current script the ScanDir is looking at. - */ - const char *GetCurrentDirName() { return this->current_dir; } + const char *GetMainScript() { return this->main_script; } /** * Rescan the AI dir for scripts. @@ -89,14 +84,13 @@ private: * For library-scan, if a library is found, AILibrary is created, and the * library is registered to the central system. */ - void ScanDir(const char *dirname, bool library_dir, char *library_depth = NULL); + void ScanDir(const char *dirname, bool library_dir, bool library_recursive = false); - AIInfoList info_list; AIInfo *info_dummy; + AIInfoList info_list; AILibraryList library_list; class Squirrel *engine; - char *current_script; - char *current_dir; + char main_script[1024]; }; #endif /* AI_SCANNER_HPP */ |