summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ai/api/ai_types.hpp9
-rw-r--r--src/script/fake_squirrel_types.hpp16
2 files changed, 17 insertions, 8 deletions
diff --git a/src/ai/api/ai_types.hpp b/src/ai/api/ai_types.hpp
index 2ccd1d27d..45db6b324 100644
--- a/src/ai/api/ai_types.hpp
+++ b/src/ai/api/ai_types.hpp
@@ -7,6 +7,7 @@
#include "../../core/overflowsafe_type.hpp"
#include "../../company_type.h"
+#include "../../script/fake_squirrel_types.hpp"
/* Define all types here, so we don't have to include the whole _type.h maze */
typedef uint BridgeType; //!< Internal name, not of any use for you.
@@ -30,12 +31,4 @@ typedef uint AIErrorType; //!< The types of errors inside the NoAI framework.
typedef BridgeType BridgeID; //!< The ID of a bridge.
typedef uint16 SubsidyID; //!< The ID of a subsidy.
-#ifndef _SQUIRREL_H_
-/* Life becomes easier when we can tell about a function it needs the VM, but
- * without really including 'squirrel.h'. */
-typedef struct SQVM *HSQUIRRELVM; //!< Pointer to Squirrel Virtual Machine.
-typedef int SQInteger; //!< Squirrel Integer.
-typedef struct SQObject HSQOBJECT; //!< Squirrel Object (fake declare)
-#endif
-
#endif /* AI_TYPES_HPP */
diff --git a/src/script/fake_squirrel_types.hpp b/src/script/fake_squirrel_types.hpp
new file mode 100644
index 000000000..ef25008f1
--- /dev/null
+++ b/src/script/fake_squirrel_types.hpp
@@ -0,0 +1,16 @@
+/* $Id$ */
+
+/** @file fake_squirrel_types.hpp Provides definitions for some squirrel types to prevent including squirrel.h in header files.*/
+
+#ifndef FAKE_SQUIRREL_TYPES_HPP
+#define FAKE_SQUIRREL_TYPES_HPP
+
+#ifndef _SQUIRREL_H_
+/* Life becomes easier when we can tell about a function it needs the VM, but
+ * without really including 'squirrel.h'. */
+typedef struct SQVM *HSQUIRRELVM; //!< Pointer to Squirrel Virtual Machine.
+typedef int SQInteger; //!< Squirrel Integer.
+typedef struct SQObject HSQOBJECT; //!< Squirrel Object (fake declare)
+#endif
+
+#endif /* FAKE_SQUIRREL_TYPES_HPP */