diff options
author | chai <chaifix@163.com> | 2018-05-17 18:45:24 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-05-17 18:45:24 +0800 |
commit | df4b054b8e8d00f7817daaa4cbf6961712cd0b75 (patch) | |
tree | 03fae2233f3c17a91d22e61a139fcc62d6a50bf3 /src/lua/graphics/luaopen_JSL.cpp | |
parent | 34947d066b994c2ef9121a83497da344982d28e2 (diff) |
v0.1.0
Diffstat (limited to 'src/lua/graphics/luaopen_JSL.cpp')
-rw-r--r-- | src/lua/graphics/luaopen_JSL.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lua/graphics/luaopen_JSL.cpp b/src/lua/graphics/luaopen_JSL.cpp index 19fa285..d1d3bac 100644 --- a/src/lua/graphics/luaopen_JSL.cpp +++ b/src/lua/graphics/luaopen_JSL.cpp @@ -5,9 +5,15 @@ namespace jin { namespace lua { + using namespace render; - enum VARIABLE_TYPE + static inline JSLProgram* checkJSLProgram(lua_State* L) + { + return (JSLProgram*)luax_checktype(L, 1, TYPE_JSL); + } + + static enum VARIABLE_TYPE { INVALID = 0, NUMBER , @@ -29,7 +35,7 @@ namespace lua */ static int l_send(lua_State* L) { - JSLProgram* jsl = (JSLProgram*)luax_checktype(L, 1, TYPE_JSL); + JSLProgram* jsl = checkJSLProgram(L); // number Image Texel const char* typestr = luax_checkstring(L, 2); // variable name |