src/ai/api/ai_tilelist_valuator.hpp.sq
branchnoai
changeset 9657 f2c6e332d8bc
parent 9655 e8e43f333832
child 9658 e7675771bca4
--- a/src/ai/api/ai_tilelist_valuator.hpp.sq	Sat Jul 14 14:56:26 2007 +0000
+++ b/src/ai/api/ai_tilelist_valuator.hpp.sq	Sat Jul 14 21:15:49 2007 +0000
@@ -19,6 +19,24 @@
 }
 
 namespace SQConvert {
+	/* Allow AITileListBuildableRectangle to be used as Squirrel parameter */
+	template <> AITileListBuildableRectangle *GetParam(ForceType<AITileListBuildableRectangle *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileListBuildableRectangle *)instance; }
+	template <> AITileListBuildableRectangle &GetParam(ForceType<AITileListBuildableRectangle &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileListBuildableRectangle *)instance; }
+	template <> const AITileListBuildableRectangle *GetParam(ForceType<const AITileListBuildableRectangle *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileListBuildableRectangle *)instance; }
+	template <> const AITileListBuildableRectangle &GetParam(ForceType<const AITileListBuildableRectangle &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileListBuildableRectangle *)instance; }
+}; // namespace SQConvert
+
+void SQAITileListBuildableRectangleRegister(Squirrel *engine) {
+	DefSQClass <AITileListBuildableRectangle> SQAITileListBuildableRectangle("AITileListBuildableRectangle");
+	SQAITileListBuildableRectangle.PreRegister(engine);
+	SQAITileListBuildableRectangle.AddConstructor<void (AITileListBuildableRectangle::*)(uint width, uint height), 3>(engine, "xii");
+
+	SQAITileListBuildableRectangle.DefSQStaticMethod(engine, &AITileListBuildableRectangle::GetClassName, "GetClassName", 1, "x");
+
+	SQAITileListBuildableRectangle.PostRegister(engine);
+}
+
+namespace SQConvert {
 	/* Allow AITileListSlope to be used as Squirrel parameter */
 	template <> AITileListSlope *GetParam(ForceType<AITileListSlope *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileListSlope *)instance; }
 	template <> AITileListSlope &GetParam(ForceType<AITileListSlope &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileListSlope *)instance; }