Example #1
0
        //=============================================================================

        /*
         * =================
         * PR_PrintStatement
         * =================
         */
        static void PR_PrintStatement(dstatement_t s)
        {
            int i;

            if (s.op < pr_opnames.Length)
            {
                console.Con_Printf(pr_opnames[s.op] + " ");
                i = pr_opnames[s.op].Length;
                for ( ; i < 10; i++)
                {
                    console.Con_Printf(" ");
                }
            }

            if (s.op == (ushort)opcode_t.OP_IF || s.op == (ushort)opcode_t.OP_IFNOT)
            {
                console.Con_Printf(PR_GlobalString(s.a) + "branch " + s.b);
            }
            else if (s.op == (ushort)opcode_t.OP_GOTO)
            {
                console.Con_Printf("branch " + s.a);
            }
            else if ((uint)(s.op - (ushort)opcode_t.OP_STORE_F) < 6)
            {
                console.Con_Printf(PR_GlobalString(s.a));
                console.Con_Printf(PR_GlobalStringNoContents(s.b));
            }
            else
            {
                if (s.a != 0)
                {
                    console.Con_Printf(PR_GlobalString(s.a));
                }
                if (s.b != 0)
                {
                    console.Con_Printf(PR_GlobalString(s.b));
                }
                if (s.c != 0)
                {
                    console.Con_Printf(PR_GlobalStringNoContents(s.c));
                }
            }
            console.Con_Printf("\n");
        }
Example #2
0
    public static void PR_PrintStatement(ref dstatement_t s)
    {
        if (s.op < OpNames.Length)
        {
            Con_Printf("{0,10} ", OpNames[s.op]);
        }

        OP op = (OP)s.op;

        if (op == OP.OP_IF || op == OP.OP_IFNOT)
        {
            Con_Printf("{0}branch {1}", PR_GlobalString(s.a), s.b);
        }
        else if (op == OP.OP_GOTO)
        {
            Con_Printf("branch {0}", s.a);
        }
        else if ((uint)(s.op - OP.OP_STORE_F) < 6)
        {
            Con_Printf(PR_GlobalString(s.a));
            Con_Printf(PR_GlobalStringNoContents(s.b));
        }
        else
        {
            if (s.a != 0)
            {
                Con_Printf(PR_GlobalString(s.a));
            }
            if (s.b != 0)
            {
                Con_Printf(PR_GlobalString(s.b));
            }
            if (s.c != 0)
            {
                Con_Printf(PR_GlobalStringNoContents(s.c));
            }
        }
        Con_Printf("\n");
    }
Example #3
0
        //=============================================================================
        /*
        =================
        PR_PrintStatement
        =================
        */
        static void PR_PrintStatement(dstatement_t s)
        {
            int		i;

            if (s.op < pr_opnames.Length)
            {
                console.Con_Printf (pr_opnames[s.op] + " ");
                i = pr_opnames[s.op].Length;
                for ( ; i<10 ; i++)
                    console.Con_Printf (" ");
            }

            if (s.op == (ushort)opcode_t.OP_IF || s.op == (ushort)opcode_t.OP_IFNOT)
                console.Con_Printf (PR_GlobalString(s.a) + "branch " + s.b);
            else if (s.op == (ushort)opcode_t.OP_GOTO)
            {
                console.Con_Printf ("branch " + s.a);
            }
            else if ( (uint)(s.op - (ushort)opcode_t.OP_STORE_F) < 6)
            {
                console.Con_Printf (PR_GlobalString(s.a));
                console.Con_Printf(PR_GlobalStringNoContents(s.b));
            }
            else
            {
                if (s.a != 0)
                    console.Con_Printf(PR_GlobalString(s.a));
                if (s.b != 0)
                    console.Con_Printf(PR_GlobalString(s.b));
                if (s.c != 0)
                    console.Con_Printf(PR_GlobalStringNoContents(s.c));
            }
            console.Con_Printf ("\n");
        }
Example #4
0
        private static void PR_PrintStatement(dstatement_t s)
        {
            int i;

            //if ((prNum >= 0 && prNum % 100 == 0) || prNum > 21900)
            if (prNum >= 0)
            {
                //Debug.WriteLine(prog.ED_PrintNum(1));
                string output = "";
                //if (prNum % 1000 == 0)
                //    Debug.WriteLine(ED_Count_str());

                PR_StackTraceStr();
                output += (prNum) + " ********************************************************************\n";

                if (s.op < pr_opnames.Length)
                {
                    output += (pr_opnames[s.op] + " ");
                    i = pr_opnames[s.op].Length;
                    for (; i < 10; i++)
                        output += (" ");
                }

                if (s.op == (ushort)opcode_t.OP_IF || s.op == (ushort)opcode_t.OP_IFNOT)
                {
                    output += (PR_GlobalString(s.a) + "branch " + s.b);
                }
                else if (s.op == (ushort)opcode_t.OP_GOTO)
                {
                    output += ("branch " + s.a);
                }
                else if (CastHelpers.ToUint32(s.op - (ushort)opcode_t.OP_STORE_F) < 6)
                {
                    output += (PR_GlobalString(s.a));
                    output += (PR_GlobalStringNoContents(s.b));
                }
                else
                {
                    if (s.a != 0) output += (PR_GlobalString(s.a));
                    if (s.b != 0) output += (PR_GlobalString(s.b));
                    if (s.c != 0) output += (PR_GlobalStringNoContents(s.c));
                }

                //console.Con_Printf(output + "\n");//todo: fix up like proper quake cmd
                Debug.WriteLine(output);

                //if (prNum % 1000 == 0)
                //if (prNum >= 69366)
                //prog.PF_coredump();
            }
        }
Example #5
0
 public dstatement_t_alt(dstatement_t dstatement_t)
 {
     a = new eval_t(dstatement_t.a);
     b = new eval_t(dstatement_t.b);
     c = new eval_t(dstatement_t.c);
 }