mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Added the hid.pos3d() function.
hid.3d() was not possible. Sorry.
This commit is contained in:
parent
fd688d0569
commit
ff6aa8e497
1 changed files with 9 additions and 0 deletions
|
|
@ -130,6 +130,14 @@ static int hid_volume(lua_State *L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int hid_3d(lua_State *L) {
|
||||||
|
float slider = (*(float*)0x1FF81080);
|
||||||
|
|
||||||
|
lua_pushnumber(L, slider);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct luaL_Reg hid_lib[] = {
|
static const struct luaL_Reg hid_lib[] = {
|
||||||
{ "read", hid_read },
|
{ "read", hid_read },
|
||||||
{ "keys", hid_keys },
|
{ "keys", hid_keys },
|
||||||
|
|
@ -138,6 +146,7 @@ static const struct luaL_Reg hid_lib[] = {
|
||||||
{ "accel", hid_accel },
|
{ "accel", hid_accel },
|
||||||
{ "gyro", hid_gyro },
|
{ "gyro", hid_gyro },
|
||||||
{ "volume", hid_volume },
|
{ "volume", hid_volume },
|
||||||
|
{ "pos3d", hid_3d },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue