Esempio n. 1
0
        /// <summary>
        /// PR_PrintStatement
        /// </summary>
        private static void PrintStatement(ref dstatement_t s)
        {
            if (s.op < OpNames.Length)
            {
                Con.Print("{0,10} ", OpNames[s.op]);
            }

            OP op = (OP)s.op;

            if (op == OP.OP_IF || op == OP.OP_IFNOT)
            {
                Con.Print("{0}branch {1}", GlobalString(s.a), s.b);
            }
            else if (op == OP.OP_GOTO)
            {
                Con.Print("branch {0}", s.a);
            }
            else if ((uint)(s.op - OP.OP_STORE_F) < 6)
            {
                Con.Print(GlobalString(s.a));
                Con.Print(GlobalStringNoContents(s.b));
            }
            else
            {
                if (s.a != 0)
                {
                    Con.Print(GlobalString(s.a));
                }
                if (s.b != 0)
                {
                    Con.Print(GlobalString(s.b));
                }
                if (s.c != 0)
                {
                    Con.Print(GlobalStringNoContents(s.c));
                }
            }
            Con.Print("\n");
        }
Esempio n. 2
0
        /// <summary>
        /// PR_PrintStatement
        /// </summary>
        static void PrintStatement(ref dstatement_t s)
        {
            if (s.op < OpNames.Length)
            {
                Con.Print("{0,10} ", OpNames[s.op]);
            }

            OP op = (OP)s.op;
            if (op == OP.OP_IF || op == OP.OP_IFNOT)
                Con.Print("{0}branch {1}", GlobalString(s.a), s.b);
            else if (op == OP.OP_GOTO)
            {
                Con.Print("branch {0}", s.a);
            }
            else if ((uint)(s.op - OP.OP_STORE_F) < 6)
            {
                Con.Print(GlobalString(s.a));
                Con.Print(GlobalStringNoContents(s.b));
            }
            else
            {
                if (s.a != 0)
                    Con.Print(GlobalString(s.a));
                if (s.b != 0)
                    Con.Print(GlobalString(s.b));
                if (s.c != 0)
                    Con.Print(GlobalStringNoContents(s.c));
            }
            Con.Print("\n");
        }