summaryrefslogtreecommitdiff
path: root/ai/ai.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-11-22 22:32:42 +0000
committertruelight <truelight@openttd.org>2005-11-22 22:32:42 +0000
commit492723691260bd2a79c7aa28d8c487198236333b (patch)
treec108cff1d6d6c569160b15fee5831f21f05596ef /ai/ai.h
parentf6ddaf6a23c4218f5ab7c61a30288d78d5073484 (diff)
downloadopenttd-492723691260bd2a79c7aa28d8c487198236333b.tar.xz
(svn r3229) -Add: add more GPMI support. Now GPMI-based AIs can be loaded (doesn't change a thing if you didn't enable GPMI)
Diffstat (limited to 'ai/ai.h')
-rw-r--r--ai/ai.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ai/ai.h b/ai/ai.h
index 910e050b1..97747aa7b 100644
--- a/ai/ai.h
+++ b/ai/ai.h
@@ -3,6 +3,9 @@
#include "../functions.h"
#include "../network.h"
+#ifdef GPMI
+#include <gpmi.h>
+#endif /* GPMI */
/* How DoCommands look like for an AI */
typedef struct AICommand {
@@ -21,6 +24,9 @@ typedef struct AIPlayer {
bool active; //! Is this AI active?
AICommand *queue; //! The commands that he has in his queue
AICommand *queue_tail; //! The tail of this queue
+#ifdef GPMI
+ gpmi_module *module; //! The link to the GPMI module
+#endif /* GPMI */
} AIPlayer;
/* The struct to keep some data about the AI in general */
@@ -32,6 +38,10 @@ typedef struct AIStruct {
/* For network-clients (a OpenTTD client who acts as an AI connected to a server) */
bool network_client; //! Are we a network_client?
uint8 network_playas; //! The current network player we are connected as
+
+#ifdef GPMI
+ bool gpmi; //! True if we want GPMI AIs
+#endif /* GPMI */
} AIStruct;
VARDEF AIStruct _ai;