--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs 2012/06/19 11:59:13 388 +++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs 2012/06/19 12:47:26 389 @@ -1,4 +1,4 @@ -//#define USE_AUTOMATIC_MEMORY_SEARCH_RANGE // when defined will automatically choose the best starting address and size for memory search otherwise it will use the constants defined in MemorySizeConstants +#define USE_AUTOMATIC_MEMORY_SEARCH_RANGE // when defined will automatically choose the best starting address and size for memory search otherwise it will use the constants defined in MemorySizeConstants #if !USE_AUTOMATIC_MEMORY_SEARCH_RANGE #define FORCE_USE_OF_MEMORYSIZECONSTANTS // when defined wil force the use of the constants defined in MemorySizeConstants for memory search range #endif @@ -63,6 +63,11 @@ namespace RomCheater.Docking { this.lstResults.AcceptedPlugin = config; this.lstPatchList.AcceptedPlugin = config; + if (config != null) + { + MemoryRangeStart = AcceptedPlugin.MemoryRangeStart; + MemoryRangeSize = AcceptedPlugin.MemoryRangeStart + AcceptedPlugin.MemoryRangeSize; + } } private void UpdateAcceptedProcess(Process process) { @@ -88,9 +93,15 @@ namespace RomCheater.Docking //} //else //{ - txtMemoryRangeStart.Value = MemorySizeConstants.MinimumSearchAddress; - txtMemoryRangeSize.Value = (MemorySizeConstants.MinimumSearchAddress > 0) ? (uint)(MemorySizeConstants.MaximumSearchAddress - MemorySizeConstants.MinimumSearchAddress) : MemorySizeConstants.MaximumSearchAddress; + //txtMemoryRangeStart.Value = MemorySizeConstants.MinimumSearchAddress; + //txtMemoryRangeSize.Value = MemorySizeConstants.MinimumSearchAddress + MemorySizeConstants.MaximumSearchSize; //} + if (AcceptedPlugin != null) + { + MemoryRangeStart = AcceptedPlugin.MemoryRangeStart; + MemoryRangeSize = AcceptedPlugin.MemoryRangeStart + AcceptedPlugin.MemoryRangeSize; + } + #endif } @@ -100,7 +111,7 @@ namespace RomCheater.Docking #region IAcceptsMemoryRange #if !FORCE_USE_OF_MEMORYSIZECONSTANTS - private int _MemoryRangeStart; + private uint _MemoryRangeStart; private uint _MemoryRangeSize; #endif public uint MemoryRangeStart @@ -117,6 +128,7 @@ namespace RomCheater.Docking { #if !FORCE_USE_OF_MEMORYSIZECONSTANTS _MemoryRangeStart = value; + txtMemoryRangeStart.Value = value; #endif } } @@ -134,6 +146,7 @@ namespace RomCheater.Docking { #if !FORCE_USE_OF_MEMORYSIZECONSTANTS _MemoryRangeSize = value; + txtMemoryRangeSize.Value = value; #endif } } |