truelight@9614: #include "ai_vehiclelist.hpp" truelight@9614: truelight@9614: namespace SQConvert { truelight@9614: /* Allow AIVehicleList to be used as Squirrel parameter */ truelight@9614: template <> AIVehicleList *GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } truelight@9614: template <> AIVehicleList &GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; } truelight@9614: template <> const AIVehicleList *GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } truelight@9614: template <> const AIVehicleList &GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; } truelight@9680: template <> int Return(HSQUIRRELVM vm, AIVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList", res, NULL, DefSQDestructorCallback); return 1; } truelight@9614: }; // namespace SQConvert truelight@9614: truebrain@9741: void SQAIVehicleList_Register(Squirrel *engine) { truelight@9614: DefSQClass SQAIVehicleList("AIVehicleList"); truelight@9614: SQAIVehicleList.PreRegister(engine, "AIAbstractList"); truelight@9635: SQAIVehicleList.AddConstructor(engine, "x"); truelight@9614: truelight@9614: SQAIVehicleList.DefSQStaticMethod(engine, &AIVehicleList::GetClassName, "GetClassName", 1, "x"); truelight@9614: truelight@9614: SQAIVehicleList.PostRegister(engine); truelight@9614: } truelight@9647: truelight@9647: namespace SQConvert { truebrain@9745: /* Allow AIVehicleList_Station to be used as Squirrel parameter */ truebrain@9745: template <> AIVehicleList_Station *GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } truebrain@9745: template <> AIVehicleList_Station &GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } truebrain@9745: template <> const AIVehicleList_Station *GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } truebrain@9745: template <> const AIVehicleList_Station &GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } truebrain@9745: template <> int Return(HSQUIRRELVM vm, AIVehicleList_Station *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Station", res, NULL, DefSQDestructorCallback); return 1; } truelight@9647: }; // namespace SQConvert truelight@9647: truebrain@9745: void SQAIVehicleList_Station_Register(Squirrel *engine) { truebrain@9745: DefSQClass SQAIVehicleList_Station("AIVehicleList_Station"); truebrain@9746: SQAIVehicleList_Station.PreRegister(engine, "AIAbstractList"); truebrain@9745: SQAIVehicleList_Station.AddConstructor(engine, "xi"); truelight@9647: truebrain@9745: SQAIVehicleList_Station.DefSQStaticMethod(engine, &AIVehicleList_Station::GetClassName, "GetClassName", 1, "x"); truelight@9647: truebrain@9745: SQAIVehicleList_Station.PostRegister(engine); truelight@9647: }