Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy

This commit is contained in:
Simon Robertshaw 2011-07-31 12:20:16 +01:00
commit f51fe2c983
2 changed files with 19 additions and 0 deletions

View File

@ -57,4 +57,6 @@ int luatpt_airheat(lua_State* l);
int luatpt_active_menu(lua_State* l);
int luatpt_decorations_enable(lua_State* l);
int luatpt_cmode_set(lua_State* l);
int luatpt_error(lua_State* l);
int luatpt_heat(lua_State* l);
#endif

View File

@ -42,6 +42,8 @@ void luacon_open(){
{"active_menu", &luatpt_active_menu},
{"decorations_enable", &luatpt_decorations_enable},
{"display_mode", &luatpt_cmode_set},
{"throw_error", &luatpt_error},
{"heat", &luatpt_heat},
{NULL,NULL}
};
@ -138,6 +140,13 @@ int luatpt_test(lua_State* l)
printf("Test successful, got %d\n", testint);
return 0;
}
int luatpt_error(lua_State* l)
{
char *error = "";
error = luaL_optstring(l, 1, 0);
error_ui(vid_buf, 0, error);
return 0;
}
int luatpt_drawtext(lua_State* l)
{
char *string;
@ -853,6 +862,14 @@ int luatpt_decorations_enable(lua_State* l)
decorations_enable = (aheatstate==0?0:1);
return 0;
}
int luatpt_heat(lua_State* l)
{
int heatstate;
heatstate = luaL_optint(l, 1, 0);
legacy_enable = (heatstate==1?0:1);
return 0;
}
int luatpt_cmode_set(lua_State* l)
{
int aheatstate;