(svn r12221) [NoAI] -Fix: Register functions are no _Register functions, and always on top of the sort list
#include "ai_pathfinder_stupid.hpp"
namespace SQConvert {
/* Allow AIPathFinderStupid to be used as Squirrel parameter */
template <> AIPathFinderStupid *GetParam(ForceType<AIPathFinderStupid *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIPathFinderStupid *)instance; }
template <> AIPathFinderStupid &GetParam(ForceType<AIPathFinderStupid &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIPathFinderStupid *)instance; }
template <> const AIPathFinderStupid *GetParam(ForceType<const AIPathFinderStupid *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIPathFinderStupid *)instance; }
template <> const AIPathFinderStupid &GetParam(ForceType<const AIPathFinderStupid &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIPathFinderStupid *)instance; }
template <> int Return<AIPathFinderStupid *>(HSQUIRRELVM vm, AIPathFinderStupid *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIPathFinderStupid", res, NULL, DefSQDestructorCallback<AIPathFinderStupid>); return 1; }
}; // namespace SQConvert
void SQAIPathFinderStupid_Register(Squirrel *engine) {
DefSQClass <AIPathFinderStupid> SQAIPathFinderStupid("AIPathFinderStupid");
SQAIPathFinderStupid.PreRegister(engine, "AIPathFinder");
SQAIPathFinderStupid.AddConstructor<void (AIPathFinderStupid::*)(AIPathFinder::PathFinderType type), 2>(engine, "xi");
SQAIPathFinderStupid.DefSQStaticMethod(engine, &AIPathFinderStupid::GetClassName, "GetClassName", 1, "x");
SQAIPathFinderStupid.DefSQMethod(engine, &AIPathFinderStupid::FindRoute, "FindRoute", 3, "xxx");
SQAIPathFinderStupid.DefSQMethod(engine, &AIPathFinderStupid::BuildRoute, "BuildRoute", 2, "xp");
SQAIPathFinderStupid.DefSQMethod(engine, &AIPathFinderStupid::FreeRoute, "FreeRoute", 2, "xp");
SQAIPathFinderStupid.PostRegister(engine);
}