Exemplo n.º 1
0
        public bool Equals(RunningScript other)
        {
            if (other == null)
            {
                return(false);
            }

            return(NextScriptPointer.Equals(other.NextScriptPointer) &&
                   PrevScriptPointer.Equals(other.PrevScriptPointer) &&
                   Id.Equals(other.Id) &&
                   Field10h.Equals(other.Field10h) &&
                   InstructionPointer.Equals(other.InstructionPointer) &&
                   Stack.SequenceEqual(other.Stack) &&
                   StackPointer.Equals(other.StackPointer) &&
                   Locals.SequenceEqual(other.Locals) &&
                   TimerA.Equals(other.TimerA) &&
                   TimerB.Equals(other.TimerB) &&
                   Field1FCh.Equals(other.Field1FCh) &&
                   WakeTime.Equals(other.WakeTime) &&
                   Field204h.Equals(other.Field204h) &&
                   Field208h.Equals(other.Field208h) &&
                   Field20Ch.Equals(other.Field20Ch) &&
                   Field20Dh.Equals(other.Field20Dh) &&
                   Field20Eh.Equals(other.Field20Eh) &&
                   Name.Equals(other.Name) &&
                   Field217h.Equals(other.Field217h));
        }
Exemplo n.º 2
0
        public bool Equals(RunningScript other)
        {
            if (other == null)
            {
                return(false);
            }

            return(NextScriptPointer.Equals(other.NextScriptPointer) &&
                   PrevScriptPointer.Equals(other.PrevScriptPointer) &&
                   Name.Equals(other.Name) &&
                   InstructionPointer.Equals(other.InstructionPointer) &&
                   Stack.SequenceEqual(other.Stack) &&
                   StackPointer.Equals(other.StackPointer) &&
                   Locals.SequenceEqual(other.Locals) &&
                   TimerA.Equals(other.TimerA) &&
                   TimerB.Equals(other.TimerB) &&
                   ConditionResult.Equals(other.ConditionResult) &&
                   IsMissionScript.Equals(other.IsMissionScript) &&
                   ClearMessages.Equals(other.ClearMessages) &&
                   WakeTime.Equals(other.WakeTime) &&
                   AndOrState.Equals(other.AndOrState) &&
                   NotFlag.Equals(other.NotFlag) &&
                   WastedBustedCheckEnabled.Equals(other.WastedBustedCheckEnabled) &&
                   WastedBustedCheckResult.Equals(other.WastedBustedCheckResult) &&
                   MissionFlag.Equals(other.MissionFlag));
        }
Exemplo n.º 3
0
 /// <summary>
 ///     Compares to.
 /// </summary>
 /// <param name="other">The other.</param>
 /// <returns>System.Int32.</returns>
 /// <inheritdoc />
 public int CompareTo(DumpStackFrame other)
 {
     if (ReferenceEquals(this, other))
     {
         return(0);
     }
     if (ReferenceEquals(null, other))
     {
         return(1);
     }
     return(StackPointer.CompareTo(other.StackPointer));
 }
Exemplo n.º 4
0
 /// <summary>
 ///     Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = StackPointer.GetHashCode();
         hashCode = (hashCode * 397) ^ ReturnAddress.GetHashCode();
         hashCode = (hashCode * 397) ^ (Module != null ? Module.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FunctionName != null ? FunctionName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Offset;
         return(hashCode);
     }
 }
Exemplo n.º 5
0
        public Processor(Dictionary <byte, AssemblerInstruction> instructions)
        {
            this.Context       = null;
            RegistersContainer = new Dictionary <byte, IRegister>(RegistersCount);
            InstructionSet     = instructions;

            flags = 0;
            abort = false;

            for (byte r = 0; r < RegistersCount; r++)
            {
                RegistersContainer.Add(r, new Register <T>());
            }

            StackPointer   = new StackPointer(this, new Register <uint>(), 0, 0);
            ProgramCounter = new ProgramCounter <uint>(this, new Register <uint>());
        }
Exemplo n.º 6
0
 /// <summary>
 ///     Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 /// <inheritdoc />
 public override int GetHashCode() => StackPointer.GetHashCode();