Skip to content

Commit

Permalink
Improve user experience and reduce memory usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
hurrican6 committed Mar 18, 2018
1 parent 38127bb commit 22c9aa0
Show file tree
Hide file tree
Showing 12 changed files with 1,359 additions and 696 deletions.
9 changes: 4 additions & 5 deletions PS4_Cheater/CheatList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public static CheatType GetCheatTypeByValueType(ValueType Type)
default:
throw new ArgumentException("Unkown value type.");
}
return CheatType.NONE_TYPE;
}

public virtual void Refresh()
Expand Down Expand Up @@ -97,7 +96,7 @@ public override string Value {
set {
value_ = value;
MemoryHelper memoryHelper = new MemoryHelper();
memoryHelper.InitMemoryHandler(Type, CompareType.NONE);
memoryHelper.InitMemoryHandler(Type, CompareType.NONE, false);
memoryHelper.SetBytesByType(ulong.Parse(Address, NumberStyles.HexNumber), memoryHelper.StringToBytes(value_));
}
}
Expand Down Expand Up @@ -151,7 +150,7 @@ public override bool Load(string[] elements, ProcessManager processManager)

Description = elements[CHEAT_CODE_DATA_TYPE_DESCRIPTION];

Value = elements[CHEAT_CODE_DATA_TYPE_VALUE];
value_ = elements[CHEAT_CODE_DATA_TYPE_VALUE];

return true;
}
Expand All @@ -174,7 +173,7 @@ public override string Save()
public override void Refresh()
{
MemoryHelper memoryHelper = new MemoryHelper();
memoryHelper.InitMemoryHandler(Type, CompareType.NONE);
memoryHelper.InitMemoryHandler(Type, CompareType.NONE, false);

memoryHelper.SetBytesByType(ulong.Parse(Address, NumberStyles.HexNumber), memoryHelper.StringToBytes(value_));
value_ = memoryHelper.BytesToString(memoryHelper.GetBytesByType(ulong.Parse(Address, NumberStyles.HexNumber)));
Expand Down Expand Up @@ -246,7 +245,7 @@ public override bool Load(string[] elements, ProcessManager processManager)
processManager.MappedSectionList[sectionID].Start).ToString("X2");

Type = MemoryHelper.GetValueTypeByString(elements[CHEAT_CODE_HEX_TYPE_VALUE_TYPE]);
Value = elements[CHEAT_CODE_HEX_TYPE_VALUE];
value_ = elements[CHEAT_CODE_HEX_TYPE_VALUE];

ulong flag = ulong.Parse(elements[CHEAT_CODE_HEX_TYPE_FLAG], NumberStyles.HexNumber);

Expand Down
134 changes: 0 additions & 134 deletions PS4_Cheater/HexEdit.Designer.cs

This file was deleted.

170 changes: 170 additions & 0 deletions PS4_Cheater/HexEditor.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 22c9aa0

Please sign in to comment.