diff options
author | rubidium <rubidium@openttd.org> | 2010-02-10 16:24:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-10 16:24:05 +0000 |
commit | 21bd2722cd89995370523385c213da32c8d47100 (patch) | |
tree | e7f3bb43657b1f8a59f89899dfc582d480bedad0 /src/ai/ai.hpp | |
parent | 78ce2858fc2704a5aafbc0b76cdb636338122f63 (diff) | |
download | openttd-21bd2722cd89995370523385c213da32c8d47100.tar.xz |
(svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel
Diffstat (limited to 'src/ai/ai.hpp')
-rw-r--r-- | src/ai/ai.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp index 65ad7705f..495a030a1 100644 --- a/src/ai/ai.hpp +++ b/src/ai/ai.hpp @@ -12,6 +12,7 @@ #ifndef AI_HPP #define AI_HPP +#ifdef ENABLE_AI #include "api/ai_event_types.hpp" #include "../date_type.h" #include "../core/string_compare_type.hpp" @@ -125,4 +126,26 @@ private: static class AIScanner *ai_scanner; }; +#else /* ENABLE_AI */ + +#include "../company_type.h" + +#define NewEvent(cid, event) nop() +#define BroadcastNewEvent(...) nop() + +class AI { +public: + static void StartNew(CompanyID company, bool rerandomise_ai = true) {} + static void Stop(CompanyID company) {} + static void Initialize() {} + static void Uninitialize(bool keepConfig) {} + static void KillAll() {} + static void GameLoop() {} + static bool HasAI(const struct ContentInfo *ci, bool md5sum) { return false; } + static void Rescan() {} + static char *GetConsoleList(char *p, const char *last) { return p; } + static void nop() { } +}; + +#endif /* ENABLE_AI */ #endif /* AI_HPP */ |