--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ai/api/ai_list.hpp.sq Sat Apr 14 21:57:44 2007 +0000
@@ -0,0 +1,22 @@
+#include "ai_list.hpp"
+
+namespace SQConvert {
+ /* Allow AIList to be used as Squirrel parameter */
+ template <> AIList *GetParam(ForceType<AIList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIList *)instance; }
+ template <> AIList &GetParam(ForceType<AIList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIList *)instance; }
+ template <> const AIList *GetParam(ForceType<const AIList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIList *)instance; }
+ template <> const AIList &GetParam(ForceType<const AIList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIList *)instance; }
+}; // namespace SQConvert
+
+void SQAIListRegister(Squirrel *engine) {
+ DefSQClass <AIList> SQAIList("AIList");
+ SQAIList.PreRegister(engine, "AIAbstractList");
+ SQAIList.AddConstructor(engine);
+
+ SQAIList.DefSQStaticMethod(engine, &AIList::GetClassName, "GetClassName", 1, "x");
+
+ SQAIList.DefSQMethod(engine, &AIList::AddItem, "AddItem", 2, "xi");
+ SQAIList.DefSQMethod(engine, &AIList::RemoveItem, "RemoveItem", 2, "xi");
+
+ SQAIList.PostRegister(engine);
+}