79 }; |
79 }; |
80 |
80 |
81 #ifdef DEFINE_SQUIRREL_CLASS |
81 #ifdef DEFINE_SQUIRREL_CLASS |
82 namespace SQConvert { |
82 namespace SQConvert { |
83 /* Allow AISign to be used as Squirrel parameter */ |
83 /* Allow AISign to be used as Squirrel parameter */ |
84 template <> AISign *GetParam(ForceType<AISign *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AISign *)instance; } |
84 template <> AISign *GetParam(ForceType<AISign *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AISign *)instance; } |
|
85 template <> AISign &GetParam(ForceType<AISign &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AISign *)instance; } |
|
86 template <> const AISign *GetParam(ForceType<const AISign *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AISign *)instance; } |
|
87 template <> const AISign &GetParam(ForceType<const AISign &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AISign *)instance; } |
85 }; // namespace SQConvert |
88 }; // namespace SQConvert |
86 |
89 |
87 void SQAISignRegister(Squirrel *engine) { |
90 void SQAISignRegister(Squirrel *engine) { |
88 DefSQClass <AISign> SQAISign("AISign"); |
91 DefSQClass <AISign> SQAISign("AISign"); |
89 SQAISign.PreRegister(engine); |
92 SQAISign.PreRegister(engine); |