/[RomCheater]/trunk/RomCheater/Docking/MemorySearch/_64bit_signed_comparer_.cs
ViewVC logotype

Contents of /trunk/RomCheater/Docking/MemorySearch/_64bit_signed_comparer_.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Tue Jun 5 00:13:29 2012 UTC (8 years, 3 months ago) by william
File size: 1428 byte(s)
+ import search code from PCSX2 Ram Dump (no need to re-invent the wheel...plus it cuts down on code refactoring time)

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 _64bit_signed_comparer_ : MemComparer<long>, IMemComparer<long>
9 {
10 public _64bit_signed_comparer_(SearchType search_settings, int FoundAddress)
11 : base(search_settings, FoundAddress, 0)
12 {
13 }
14 #region IMemComparer<T> Members
15 public bool Compare(long CompareToValue, long 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 }

  ViewVC Help
Powered by ViewVC 1.1.22