diff options
author | truebrain <truebrain@openttd.org> | 2011-11-29 23:21:52 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-29 23:21:52 +0000 |
commit | e37149a1def6a0e63dda8e0964abf1b82316761a (patch) | |
tree | d8f80cee8a3b1eb60feb883796e43300fb50cfb1 /src/ai/ai_info.hpp | |
parent | ae8540f5e080adebca3e54c69aa7cd85a87e550b (diff) | |
download | openttd-e37149a1def6a0e63dda8e0964abf1b82316761a.tar.xz |
(svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary
Diffstat (limited to 'src/ai/ai_info.hpp')
-rw-r--r-- | src/ai/ai_info.hpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp index f3833fdac..82ca6f925 100644 --- a/src/ai/ai_info.hpp +++ b/src/ai/ai_info.hpp @@ -49,25 +49,18 @@ extern AIConfigItem _start_date_config; typedef std::list<AIConfigItem> AIConfigItemList; ///< List of AIConfig items. -/** Base class that holds some basic information about AIs and AI libraries. */ -class AIFileInfo : public ScriptFileInfo { -public: - /** - * Process the creation of a FileInfo object. - */ - static SQInteger Constructor(HSQUIRRELVM vm, AIFileInfo *info); - -protected: - class AIScanner *base; ///< AIScanner object that was used to scan this AI (library) info. -}; - /** All static information from an AI like name, version, etc. */ -class AIInfo : public AIFileInfo { +class AIInfo : public ScriptInfo { public: AIInfo(); ~AIInfo(); /** + * Register the functions of this class. + */ + static void RegisterAPI(Squirrel *engine); + + /** * Create an AI, using this AIInfo as start-template. */ static SQInteger Constructor(HSQUIRRELVM vm); @@ -130,12 +123,17 @@ private: }; /** All static information from an AI library like name, version, etc. */ -class AILibrary : public AIFileInfo { +class AILibrary : public ScriptInfo { public: - AILibrary() : AIFileInfo(), category(NULL) {}; + AILibrary() : ScriptInfo(), category(NULL) {}; ~AILibrary(); /** + * Register the functions of this class. + */ + static void RegisterAPI(Squirrel *engine); + + /** * Create an AI, using this AIInfo as start-template. */ static SQInteger Constructor(HSQUIRRELVM vm); |