Petr Mrázek 2012-01-08 16:21:23 +01:00
commit f31d7c792a
2 changed files with 15 additions and 1 deletions

@ -20,7 +20,7 @@ if mypos then
engine.poked(modpos+0x1c,count) --max size for div
else
modpos,modsize=engine.loadmod("dfusion/migrants/migrants.o","Migrants")
modpos,modsize=engine.loadmod("dfusion/migrants/migrants.o","Migrants",400)
print(string.format("Loaded module @:%x",modpos))
count=0
for _,v in pairs(names) do

@ -183,6 +183,18 @@ static int Call_Df(lua_State *L)
st.push(f.CallFunction(ptr,conv,args));
return 1;
}
static int Suspend_Df(lua_State *L)
{
lua::state st(L);
DFHack::Core::getInstance().Suspend();
return 0;
}
static int Resume_Df(lua_State *L)
{
lua::state st(L);
DFHack::Core::getInstance().Resume();
return 0;
}
const luaL_Reg lua_misc_func[]=
{
{"loadmod",LoadMod},
@ -193,6 +205,8 @@ const luaL_Reg lua_misc_func[]=
{"newmod",NewMod},
{"getpushvalue",Get_PushValue},
{"calldf",Call_Df},
{"suspend",Suspend_Df},
{"resume",Resume_Df},
{NULL,NULL}
};
void lua::RegisterMisc(lua::state &st)