9794
|
1 |
#include "ai_tunnel.hpp"
|
|
2 |
|
|
3 |
namespace SQConvert {
|
|
4 |
/* Allow AITunnel to be used as Squirrel parameter */
|
|
5 |
template <> AITunnel *GetParam(ForceType<AITunnel *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITunnel *)instance; }
|
|
6 |
template <> AITunnel &GetParam(ForceType<AITunnel &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITunnel *)instance; }
|
|
7 |
template <> const AITunnel *GetParam(ForceType<const AITunnel *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITunnel *)instance; }
|
|
8 |
template <> const AITunnel &GetParam(ForceType<const AITunnel &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITunnel *)instance; }
|
|
9 |
template <> int Return<AITunnel *>(HSQUIRRELVM vm, AITunnel *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITunnel", res, NULL, DefSQDestructorCallback<AITunnel>); return 1; }
|
|
10 |
}; // namespace SQConvert
|
|
11 |
|
|
12 |
void SQAITunnel_Register(Squirrel *engine) {
|
|
13 |
DefSQClass <AITunnel> SQAITunnel("AITunnel");
|
|
14 |
SQAITunnel.PreRegister(engine);
|
|
15 |
SQAITunnel.AddConstructor<void (AITunnel::*)(), 1>(engine, "x");
|
|
16 |
|
|
17 |
SQAITunnel.DefSQStaticMethod(engine, &AITunnel::GetClassName, "GetClassName", 1, "x");
|
|
18 |
SQAITunnel.DefSQStaticMethod(engine, &AITunnel::IsTunnelTile, "IsTunnelTile", 2, "xi");
|
|
19 |
SQAITunnel.DefSQStaticMethod(engine, &AITunnel::GetOtherTunnelEnd, "GetOtherTunnelEnd", 2, "xi");
|
|
20 |
SQAITunnel.DefSQStaticMethod(engine, &AITunnel::BuildTunnel, "BuildTunnel", 3, "xii");
|
|
21 |
SQAITunnel.DefSQStaticMethod(engine, &AITunnel::RemoveTunnel, "RemoveTunnel", 2, "xi");
|
|
22 |
|
|
23 |
SQAITunnel.PostRegister(engine);
|
|
24 |
}
|