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

Annotation of /trunk/RomCheater/Docking/MemorySearch/_32bit_unsigned_comparer_.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (hide annotations) (download)
Tue Jun 5 00:13:29 2012 UTC (8 years, 11 months ago) by william
File size: 1434 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 william 280 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 _32bit_unsigned_comparer_ : MemComparer<uint>, IMemComparer<uint>
9     {
10     public _32bit_unsigned_comparer_(SearchType search_settings, int FoundAddress)
11     : base(search_settings, FoundAddress, 0)
12     {
13     }
14    
15     #region IMemComparer<T> Members
16     public bool Compare(uint CompareToValue, uint CompareFromValue)
17     {
18     this.Value = CompareToValue;
19     switch (base.SearchSettings.CompareType)
20     {
21     case SearchCompareTypes.Equal:
22     return (CompareToValue == CompareFromValue);
23     case SearchCompareTypes.GreaterThan:
24     return (CompareToValue > CompareFromValue);
25     case SearchCompareTypes.GreaterThanOrEqual:
26     return (CompareToValue >= CompareFromValue);
27     case SearchCompareTypes.LessThan:
28     return (CompareToValue < CompareFromValue);
29     case SearchCompareTypes.LessThanOrEqual:
30     return (CompareToValue <= CompareFromValue);
31     case SearchCompareTypes.NotEqual:
32     return (CompareToValue != CompareFromValue);
33     }
34     return false;
35     }
36     #endregion
37     }
38     }

  ViewVC Help
Powered by ViewVC 1.1.22