From c7e59fb376453e5abad8c862b52eb0f4c7ba829b Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 12 Nov 2018 22:23:35 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/graphics/je_lua_graphics.cpp | 92 ++++++++++++++-------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'src/lua/modules/graphics/je_lua_graphics.cpp') 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); -- cgit v1.1-26-g67d0