示例#1
0
        } // return_6

        //=========== Stack Manipulation ===========//
        private string Decompile_0A(MSCCommand cmd)
        {
            if (cmd.Returns)
            {
                return($"0x{cmd.Parameters[0]:X}");
            }
            else
            {
                return(cmd.ToString());
            }
        } // pushInt
示例#2
0
        private string DecompileCMD(MSCCommand cmd)
        {
            var sb = new StringBuilder();

            // Do current indent
            if (!cmd.Returns)
            {
                foreach (int i in INDENT_STACK)
                {
                    sb.Append("   ");
                }
            }

            switch (cmd.Ident)
            {
            case 0x06:
                sb.Append(Decompile_06(cmd));
                break;

            case 0x0A:
                sb.Append(Decompile_0A(cmd));
                break;

            case 0x0B:
                sb.Append(Decompile_0B(cmd));
                break;

            case 0x0D:
                sb.Append(Decompile_0D(cmd));
                break;

            case 0x13:
                sb.Append(Decompile_13(cmd));
                break;

            case 0x14:
                sb.Append(Decompile_14(cmd));
                break;

            case 0x15:
                sb.Append(Decompile_15(cmd));
                break;

            case 0x16:
                sb.Append(Decompile_16(cmd));
                break;

            case 0x1C:
                sb.Append(Decompile_1C(cmd));
                break;

            case 0x1D:
                sb.Append(Decompile_1D(cmd));
                break;

            case 0x1E:
                sb.Append(Decompile_1E(cmd));
                break;

            case 0x1F:
                sb.Append(Decompile_1F(cmd));
                break;

            case 0x20:
                sb.Append(Decompile_20(cmd));
                break;

            case 0x21:
                sb.Append(Decompile_21(cmd));
                break;

            case 0x22:
                sb.Append(Decompile_22(cmd));
                break;

            case 0x23:
                sb.Append(Decompile_23(cmd));
                break;

            case 0x24:
                sb.Append(Decompile_24(cmd));
                break;

            case 0x25:
                sb.Append(Decompile_25(cmd));
                break;

            case 0x26:
                sb.Append(Decompile_26(cmd));
                break;

            case 0x27:
                sb.Append(Decompile_27(cmd));
                break;

            case 0x28:
                sb.Append(Decompile_28(cmd));
                break;

            case 0x29:
                sb.Append(Decompile_29(cmd));
                break;

            case 0x2A:
                sb.Append(Decompile_2A(cmd));
                break;

            case 0x2B:
                sb.Append(Decompile_2B(cmd));
                break;

            case 0x2C:
                sb.Append(Decompile_2C(cmd));
                break;

            case 0x2D:
                sb.Append(Decompile_2D(cmd));
                break;

            case 0x2E:
                sb.Append(Decompile_2E(cmd));
                break;

            case 0x2F:
                sb.Append(Decompile_2F(cmd));
                break;

            case 0x30:
                sb.Append(Decompile_30(cmd));
                break;

            case 0x31:
                sb.Append(Decompile_31(cmd));
                break;

            case 0x34:
                sb.Append(Decompile_34(cmd));
                break;

            case 0x36:
                sb.Append(Decompile_36(cmd));
                break;

            case 0x41:
                sb.Append(Decompile_41(cmd));
                break;

            case 0x42:
                sb.Append(Decompile_42(cmd));
                break;

            case 0x43:
                sb.Append(Decompile_43(cmd));
                break;

            case 0x44:
                sb.Append(Decompile_44(cmd));
                break;

            case 0x45:
                sb.Append(Decompile_45(cmd));
                break;

            case 0x46:
                sb.Append(Decompile_46(cmd));
                break;

            case 0x47:
                sb.Append(Decompile_47(cmd));
                break;

            case 0x48:
                sb.Append(Decompile_48(cmd));
                break;

            case 0x49:
                sb.Append(Decompile_49(cmd));
                break;

            case 0x4a:
                sb.Append(Decompile_4a(cmd));
                break;

            case 0x4b:
                sb.Append(Decompile_4b(cmd));
                break;

            default:
                sb.Append(cmd.ToString());
                break;
            }
            return(sb.ToString());
        }