Ejemplo n.º 1
0
        public Context CreateSubContext(ObjLuaFunction fkt, out string paramlist)
        {
            Context c = new Context(globals, indent + "\t");

            paramlist = "";
            if (fkt != null)
            {
                int lc = 0;
                for (int i = 0; i < fkt.ArgumentCount; i++)
                {
                    if (i > 0)
                    {
                        paramlist += ", ";
                    }
                    paramlist += "param" + i;

                    c.ForceDefineLocal((ushort)lc, "param" + i);
                    c.SetLocal((ushort)lc, 0.0);
                    lc++;
                }

                /*for (int i=0; i<fkt.StackSize; i++)
                 * {
                 *      c.ForceDefineLocal((ushort)lc, "stack"+i);
                 *      c.SetLocal((ushort)lc, 0.0);
                 *      lc++;
                 * }*/
            }

            return(c);
        }
Ejemplo n.º 2
0
 public void Run(Context cx)
 {
     cx.SetLocal(A, cx.Kst(BX));
     cx.SetSReg(A, cx.SKst(BX));
 }
Ejemplo n.º 3
0
 public void Run(Context cx)
 {
     cx.SetLocal(A, cx.Bool(B));
     cx.SetSReg(A, cx.Bool(B).ToString());
 }