Primitive 0x0073 - Debug

See Also


SimPe Code

// Decompiled with JetBrains decompiler
// Type: pjse.BhavNameWizards.WizPrim0x0073
// Assembly: pjse.coder.plugin, Version=4.0.3349.37576, Culture=neutral, PublicKeyToken=null

using SimPe.PackedFiles.Wrapper;
using System;

namespace pjse.BhavNameWizards
{
  public class WizPrim0x0073 : BhavWizPrim
  {
    public WizPrim0x0073(Instruction i)
      : base(i)
    {
    }

    protected override string Operands(bool lng)
    {
      byte[] numArray = new byte[16];
      ((byte[]) this.instruction.Operands).CopyTo((Array) numArray, 0);
      ((byte[]) this.instruction.Reserved1).CopyTo((Array) numArray, 8);
      string str1 = "";
      Scope scope = Scope.Private;
      if (((int) numArray[14] & 4) != 0)
        scope = Scope.Global;
      else if (((int) numArray[14] & 2) != 0)
        scope = Scope.SemiGlobal;
      string str2;
      if (numArray[13] == (byte) 0)
      {
        str2 = str1 + this.readStr(scope, GS.GlobalStr.DebugString, (ushort) numArray[12], lng ? -1 : 60, lng ? Detail.Normal : Detail.ErrorNames);
        if (lng)
        {
          string str3 = str2 + " (";
          for (int index = 0; index < 4; ++index)
            str3 = str3 + (index == 0 ? "" : ", ") + this.dataOwner(numArray[index * 3], numArray[index * 3 + 1], numArray[index * 3 + 2]);
          str2 = str3 + ")";
        }
      }
      else
      {
        str2 = str1 + BhavWiz.readStr(GS.BhavStr.DebugType, (ushort) numArray[13]);
        if (numArray[13] == (byte) 6)
          str2 = str2 + ": " + this.readStr(scope, GS.GlobalStr.DebugString, (ushort) numArray[12], lng ? -1 : 60, lng ? Detail.Normal : Detail.ErrorNames);
      }
      return str2;
    }
  }
}