Lua Binding update

- Added range check on various casts (ranged_cast routine needs to be
moved somewhere else)
- Added Nz::Vector3ui type to auto-bind system


Former-commit-id: 3ec773b26d9cc85e40879c011cad0fb2a3d05571
This commit is contained in:
GigAnon
2016-01-21 18:54:01 +01:00
parent 6b0c750e54
commit 69a1be70ba
2 changed files with 37 additions and 12 deletions

View File

@@ -48,6 +48,16 @@ namespace Nz
return ret;
}
inline unsigned int LuaImplQueryArg(const LuaInstance& lua, int index, Vector3ui* vec, TypeTag<Vector3ui>)
{
Vector3d vecDouble;
unsigned int ret = LuaImplQueryArg(lua, index, &vecDouble, TypeTag<Vector3d>());
vec->Set(vecDouble);
return ret;
}
inline int LuaImplReplyVal(const LuaInstance& instance, const SoundBuffer* val, TypeTag<const SoundBuffer*>)
{
instance.PushInstance<SoundBufferConstRef>("SoundBuffer", val);
@@ -65,4 +75,10 @@ namespace Nz
instance.PushInstance<Vector3d>("Vector3", val);
return 1;
}
inline int LuaImplReplyVal(const LuaInstance& instance, Vector3ui val, TypeTag<Vector3ui>)
{
instance.PushInstance<Vector3d>("Vector3", val);
return 1;
}
}