mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
even more boilerplate code
This commit is contained in:
parent
7792c1a6f4
commit
5c23b4125d
11 changed files with 220 additions and 72 deletions
22
src/logic/scripting/lua/libplayer.h
Normal file
22
src/logic/scripting/lua/libplayer.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef LOGIC_SCRIPTING_LUA_LIBPLAYER_H_
|
||||
#define LOGIC_SCRIPTING_LUA_LIBPLAYER_H_
|
||||
|
||||
#include "lua_commons.h"
|
||||
|
||||
/* == player library ==*/
|
||||
extern int l_player_get_pos(lua_State* L);
|
||||
extern int l_player_get_rot(lua_State* L);
|
||||
extern int l_player_set_rot(lua_State* L);
|
||||
extern int l_player_set_pos(lua_State* L);
|
||||
extern int l_player_get_inv(lua_State* L);
|
||||
|
||||
static const luaL_Reg playerlib [] = {
|
||||
{"get_pos", lua_wrap_errors<l_player_get_pos>},
|
||||
{"set_pos", lua_wrap_errors<l_player_set_pos>},
|
||||
{"get_rot", lua_wrap_errors<l_player_get_rot>},
|
||||
{"set_rot", lua_wrap_errors<l_player_set_rot>},
|
||||
{"get_inventory", lua_wrap_errors<l_player_get_inv>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
#endif // LOGIC_SCRIPTING_LUA_LIBPLAYER_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue