示例#1
0
    internal static void Not(Instruction i, ILuaVM vm)
    {
        var(a, b, _) = i.ABC();
        a           += 1;
        b           += 1;

        vm.PushBoolean(!vm.ToBoolean(b));
        vm.Replace(a);
    }
示例#2
0
 internal static void LoadBool(Instruction i, ILuaVM vm)
 {
     var(a, b, c) = i.ABC();
     a           += 1;
     vm.PushBoolean(b != 0);
     vm.Replace(a);
     if (c != 0)
     {
         vm.AddPC(1);
     }
 }
示例#3
0
        /// <summary>
        /// R(A) = (bool) B
        /// if (C) pc++
        /// </summary>
        public static void LoadBool(Instruction ins, ILuaVM vm)
        {
            ins.ABC(out var a, out var b, out var c);
            a += 1;

            vm.PushBoolean(b != 0);
            vm.Replace(a);

            if (c != 0)
            {
                vm.AddPC(1);
            }
        }