mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Added the 3D effect
Works nice, but can burn your eyes. Warning: the example can actually burn your eyes.
This commit is contained in:
parent
1c92eb22c3
commit
58309b39c2
2 changed files with 26 additions and 2 deletions
11
source/gfx.c
11
source/gfx.c
|
|
@ -39,6 +39,16 @@ static int gfx_getFPS(lua_State *L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int gfx_set3D(lua_State *L) {
|
||||
bool enable = false;
|
||||
if (lua_isboolean(L, 1))
|
||||
enable = lua_toboolean(L, 1);
|
||||
|
||||
gfxSet3D(enable);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int gfx_line(lua_State *L) {
|
||||
int x1 = luaL_checkinteger(L, 1);
|
||||
int y1 = luaL_checkinteger(L, 2);
|
||||
|
|
@ -112,6 +122,7 @@ static const struct luaL_Reg gfx_lib[] = {
|
|||
{ "endFrame", gfx_endFrame },
|
||||
{ "render", gfx_render },
|
||||
{ "getFPS", gfx_getFPS },
|
||||
{ "set3D", gfx_set3D },
|
||||
{ "line", gfx_line },
|
||||
{ "point", gfx_point },
|
||||
{ "rectangle", gfx_rectangle },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue