diff options
author | chai <chaifix@163.com> | 2018-11-12 22:23:35 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-12 22:23:35 +0800 |
commit | c7e59fb376453e5abad8c862b52eb0f4c7ba829b (patch) | |
tree | caefc559396525f6521ad8ff8c4f7f3f035942c2 /src/lua/modules/graphics/je_lua_graphics.cpp | |
parent | af62f267a24091a16cbafe844d59cdbd4e78f5b1 (diff) |
*修改结构
Diffstat (limited to 'src/lua/modules/graphics/je_lua_graphics.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_graphics.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/lua/modules/graphics/je_lua_graphics.cpp b/src/lua/modules/graphics/je_lua_graphics.cpp index 3ff5710..3155aa0 100644 --- a/src/lua/modules/graphics/je_lua_graphics.cpp +++ b/src/lua/modules/graphics/je_lua_graphics.cpp @@ -738,52 +738,6 @@ namespace JinEngine return 0; } - LUA_IMPLEMENT const luaL_Reg f[] = { - /* window */ - { "init", l_init }, - { "setTitle", l_setTitle }, - { "getSize", l_getSize }, - { "getWidth", l_getWidth }, - { "getHeight", l_getHeight }, - { "destroy", l_destroy }, - { "hideWindow", l_hideWindow }, - { "showWindow", l_showWindow }, - /* creators */ - { "newBitmap", l_newBitmap }, - { "newTexture", l_newTexture }, - { "newShader", l_newShader }, - { "newShaderf", l_newShaderf }, - { "newCanvas", l_newCanvas }, - { "newTTFData", l_newTTFData }, - { "newText", l_newText }, - { "newTextureFont", l_newTextureFont }, - /* render */ - { "setClearColor", l_setClearColor }, - { "clear", l_clear }, - { "draw", l_draw }, - { "print", l_print }, - { "drawq", l_drawq }, - { "setColor", l_setColor }, - { "getColor", l_getColor }, - { "present", l_present }, - /* canvas */ - { "bindCanvas", l_bindCanvas }, - { "unbindCanvas", l_unbindCanvas }, - /* shader */ - { "useShader", l_useShader }, - /* shapes */ - { "point", l_point }, - { "line", l_line }, - { "rect", l_rect }, - { "circle", l_circle }, - { "triangle", l_triangle }, - { "polygon", l_polygon }, - /* font */ - { "setFont", l_setFont }, - { "unsetFont", l_unsetFont }, - { 0, 0 } - }; - LUA_PORT int luaopen_Texture(lua_State* L); LUA_PORT int luaopen_Text(lua_State* L); LUA_PORT int luaopen_TTF(lua_State* L); @@ -806,6 +760,52 @@ namespace JinEngine luaopen_TextureFont(L); luaopen_Page(L); luaopen_JSL(L); + + luaL_Reg f[] = { + /* window */ + { "init", l_init }, + { "setTitle", l_setTitle }, + { "getSize", l_getSize }, + { "getWidth", l_getWidth }, + { "getHeight", l_getHeight }, + { "destroy", l_destroy }, + { "hideWindow", l_hideWindow }, + { "showWindow", l_showWindow }, + /* creators */ + { "newBitmap", l_newBitmap }, + { "newTexture", l_newTexture }, + { "newShader", l_newShader }, + { "newShaderf", l_newShaderf }, + { "newCanvas", l_newCanvas }, + { "newTTFData", l_newTTFData }, + { "newText", l_newText }, + { "newTextureFont", l_newTextureFont }, + /* render */ + { "setClearColor", l_setClearColor }, + { "clear", l_clear }, + { "draw", l_draw }, + { "print", l_print }, + { "drawq", l_drawq }, + { "setColor", l_setColor }, + { "getColor", l_getColor }, + { "present", l_present }, + /* canvas */ + { "bindCanvas", l_bindCanvas }, + { "unbindCanvas", l_unbindCanvas }, + /* shader */ + { "useShader", l_useShader }, + /* shapes */ + { "point", l_point }, + { "line", l_line }, + { "rect", l_rect }, + { "circle", l_circle }, + { "triangle", l_triangle }, + { "polygon", l_polygon }, + /* font */ + { "setFont", l_setFont }, + { "unsetFont", l_unsetFont }, + { 0, 0 } + }; // load whole lib luax_newlib(L, f); |