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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 378 - (hide annotations) (download)
Tue Jun 19 07:56:36 2012 UTC (9 years, 3 months ago) by william
File size: 1433 byte(s)
use uint instead of int for memory addresses

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