Exemplo n.º 1
0
        public static void PushLightUserData <T>(LuaStatePtr l, T p)
        {
            IntPtr ptr = new IntPtr();

            Marshal.StructureToPtr(p, ptr, false);
            LuaDelegates.lua_pushlightuserdata(l, ptr);
        }
Exemplo n.º 2
0
        public static int ToIntegerx(LuaStatePtr l, int idx, out bool isnum)
        {
            int *i      = stackalloc int[1];
            int  result = LuaDelegates.lua_tointegerx(l, idx, i);

            isnum = (*i == 1);
            return(result);
        }
Exemplo n.º 3
0
        public static int GetCtx(LuaStatePtr l, out int ctx)
        {
            int *i      = stackalloc int[1];
            int  result = LuaDelegates.lua_getctx(l, i);

            ctx = *i;
            return(result);
        }
Exemplo n.º 4
0
        public static uint ToUnsignedx(LuaStatePtr l, int idx, out bool isnum)
        {
            int *i      = stackalloc int[1];
            uint result = LuaDelegates.lua_tounsignedx(l, idx, i);

            isnum = (*i == 1);
            return(result);
        }
Exemplo n.º 5
0
        public static double ToNumberx(LuaStatePtr l, int idx, out bool isnum)
        {
            int *  i      = stackalloc int[1];
            double result = LuaDelegates.lua_tonumberx(l, idx, i);

            isnum = (*i == 1);
            return(result);
        }
Exemplo n.º 6
0
        public static string ToLString(LuaStatePtr l, int idx, out int len)
        {
            fixed(int *i = &len)
            {
                sbyte *ptr = LuaDelegates.lua_tolstring(l, idx, i);

                char[] arr = new char[*i];
                for (int j = 0; j < *i; ++j)
                {
                    arr[j] = (char)ptr[j];
                }
                return(new string(arr));
            }
        }
Exemplo n.º 7
0
 public static int ToInteger(LuaStatePtr l, int i)
 {
     return(LuaDelegates.lua_tointegerx(l, i, null));
 }
Exemplo n.º 8
0
 public static string ToString(LuaStatePtr l, int i)
 {
     return(new string(LuaDelegates.lua_tolstring(l, i, null)));
 }
Exemplo n.º 9
0
 public static void Copy(LuaStatePtr l, int fromidx, int toidx)
 {
     LuaDelegates.lua_copy(l, fromidx, toidx);
 }
Exemplo n.º 10
0
 public static void Insert(LuaStatePtr l, int idx)
 {
     LuaDelegates.lua_insert(l, idx);
 }
Exemplo n.º 11
0
 public static void SetTop(LuaStatePtr l, int idx)
 {
     LuaDelegates.lua_settop(l, idx);
 }
Exemplo n.º 12
0
 public static int AbsIndex(LuaStatePtr l, int idx)
 {
     return(LuaDelegates.lua_absindex(l, idx));
 }
Exemplo n.º 13
0
 public static string SetLocal(LuaStatePtr l, LuaDebugPtr ar, int n)
 {
     return(new string(LuaDelegates.lua_setlocal(l, ar, n)));
 }
Exemplo n.º 14
0
 public static int GetInfo(LuaStatePtr l, string what, LuaDebugPtr ar)
 {
     return(LuaDelegates.lua_getinfo(l, what, ar));
 }
Exemplo n.º 15
0
 public static int GetStack(LuaStatePtr l, int level, LuaDebugPtr ar)
 {
     return(LuaDelegates.lua_getstack(l, level, ar));
 }
Exemplo n.º 16
0
 public static int GetHookCount(LuaStatePtr l)
 {
     return(LuaDelegates.lua_gethookcount(l));
 }
Exemplo n.º 17
0
 public static double[] Version(LuaStatePtr l)
 {
     return(LuaDelegates.lua_version(l));
 }
Exemplo n.º 18
0
 public static string SetUpValue(LuaStatePtr l, int funcindex, int n)
 {
     return(new string(LuaDelegates.lua_setupvalue(l, funcindex, n)));
 }
Exemplo n.º 19
0
 public static int GetTop(LuaStatePtr l)
 {
     return(LuaDelegates.lua_gettop(l));
 }
Exemplo n.º 20
0
 public static IntPtr UpValueID(LuaStatePtr l, int fidx, int n)
 {
     return(LuaDelegates.lua_upvalueid(l, fidx, n));
 }
Exemplo n.º 21
0
 public static void PushValue(LuaStatePtr l, int idx)
 {
     LuaDelegates.lua_pushvalue(l, idx);
 }
Exemplo n.º 22
0
 public static LuaCFunction AtPanic(LuaStatePtr l, LuaCFunction panicf)
 {
     System.GC.KeepAlive(panicf);
     return(LuaDelegates.lua_atpanic(l, panicf));
 }
Exemplo n.º 23
0
 public static void Replace(LuaStatePtr l, int idx)
 {
     LuaDelegates.lua_replace(l, idx);
 }
Exemplo n.º 24
0
 public static void UpValueJoin(LuaStatePtr l, int fidx1, int n1, int fidx2, int n2)
 {
     LuaDelegates.lua_upvaluejoin(l, fidx1, n1, fidx2, n2);
 }
Exemplo n.º 25
0
 public static int CheckStack(LuaStatePtr l, int sz)
 {
     return(LuaDelegates.lua_checkstack(l, sz));
 }
Exemplo n.º 26
0
 public static int SetHook(LuaStatePtr l, LuaHook func, int mask, int count)
 {
     return(LuaDelegates.lua_sethook(l, func, mask, count));
 }
Exemplo n.º 27
0
 public static double ToNumber(LuaStatePtr l, int i)
 {
     return(LuaDelegates.lua_tonumberx(l, i, null));
 }
Exemplo n.º 28
0
 public static LuaHook GetHook(LuaStatePtr l)
 {
     return(LuaDelegates.lua_gethook(l));
 }
Exemplo n.º 29
0
 public static uint ToUnsigned(LuaStatePtr l, int i)
 {
     return(LuaDelegates.lua_tounsignedx(l, i, null));
 }
Exemplo n.º 30
0
 public static int GetHookMask(LuaStatePtr l)
 {
     return(LuaDelegates.lua_gethookmask(l));
 }