1 |
using System; |
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
|
6 |
namespace RomCheater.Docking.MemorySearch |
7 |
{ |
8 |
public class _8bit_signed_comparer_ : MemComparer<sbyte>, IMemComparer<sbyte> |
9 |
{ |
10 |
public _8bit_signed_comparer_(SearchType search_settings, int FoundAddress) |
11 |
: base(search_settings, FoundAddress, 0) |
12 |
{ |
13 |
} |
14 |
#region IMemComparer<T> Members |
15 |
public bool Compare(sbyte CompareToValue, sbyte CompareFromValue) |
16 |
{ |
17 |
this.Value = CompareToValue; |
18 |
switch (base.SearchSettings.CompareType) |
19 |
{ |
20 |
case SearchCompareTypes.Equal: |
21 |
return (CompareToValue == CompareFromValue); |
22 |
case SearchCompareTypes.GreaterThan: |
23 |
return (CompareToValue > CompareFromValue); |
24 |
case SearchCompareTypes.GreaterThanOrEqual: |
25 |
return (CompareToValue >= CompareFromValue); |
26 |
case SearchCompareTypes.LessThan: |
27 |
return (CompareToValue < CompareFromValue); |
28 |
case SearchCompareTypes.LessThanOrEqual: |
29 |
return (CompareToValue <= CompareFromValue); |
30 |
case SearchCompareTypes.NotEqual: |
31 |
return (CompareToValue != CompareFromValue); |
32 |
} |
33 |
return false; |
34 |
} |
35 |
#endregion |
36 |
} |
37 |
} |