Example #1
0
        private static void DecompileOp51(DecompilerContext context, DecompilerTableEntry entry, ref List <object> operands, ref List <int> branchTargets)
        {
            var oprs = context.DecompileOperands("WB");

            operands.AddRange(oprs);
            var exp = context.DecompileExpression();

            operands.Add(exp);
        }
Example #2
0
        private static void DecompileOp16(DecompilerContext context, DecompilerTableEntry entry, ref List <object> operands, ref List <int> branchTargets)
        {
            var b = context.ReadByte();

            operands.Add(b);
            if (b == 2)
            {
                operands.AddRange(context.DecompileOperands("LLLL"));
            }
        }
Example #3
0
 private static void DecompileOp2a(DecompilerContext context, DecompilerTableEntry entry, ref List <object> operands, ref List <int> branchTargets)
 {
     for (var i = 0; i < 0xc; ++i)
     {
         var opr = context.ReadUInt16();
         operands.Add(opr);
         if (opr == 0xffff)
         {
             break;
         }
     }
 }
Example #4
0
        private static void DecompileOp41(DecompilerContext context, DecompilerTableEntry entry, ref List <object> operands, ref List <int> branchTargets)
        {
            var oprs = context.DecompileOperands("BW");

            operands.AddRange(oprs);

            var op = (int)oprs[1];

            if (Op41Values.Contains(op))
            {
                operands.Add(context.DecompileOperand('B'));
            }
        }
Example #5
0
        private static void DecompileOp29(DecompilerContext context, DecompilerTableEntry entry, ref List <object> operands, ref List <int> branchTargets)
        {
            var oprs = context.DecompileOperands("WB");

            operands.AddRange(oprs);

            var op = (int)oprs[1];

            if (op == 1)
            {
                operands.Add(context.DecompileOperand('W'));
            }
            else
            {
                operands.Add(context.DecompileOperand('B'));
            }
        }
Example #6
0
        internal static void DecompileDefault(DecompilerContext context, DecompilerTableEntry entry, ref List <object> operands, ref List <int> branchTargets)
        {
            if (string.IsNullOrEmpty(entry.Operand))
            {
                return;
            }

            for (var i = 0; i < entry.Operand.Length; ++i)
            {
                char c  = entry.Operand[i];
                var  op = context.DecompileOperand(c);
                if (char.ToLower(c) == 'o')
                {
                    branchTargets.Add((int)op);
                }

                operands.Add(op);
            }
        }
Example #7
0
 private static void DecompileOp4f(DecompilerContext context, DecompilerTableEntry entry, ref List <object> operands, ref List <int> branchTargets)
 {
     operands.Add(context.ReadByte());
     operands.Add(context.DecompileExpression());
 }