mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-27 04:19:36 -05:00
Add generic RAM read/write form
accessible once a save is loaded, same as item injecting untested, but should be fine
This commit is contained in:
26
NHSE.WinForms/Subforms/SysBot/SimpleHexEditor.cs
Normal file
26
NHSE.WinForms/Subforms/SysBot/SimpleHexEditor.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using NHSE.Injection;
|
||||
|
||||
namespace NHSE.WinForms
|
||||
{
|
||||
public partial class SimpleHexEditor : Form
|
||||
{
|
||||
public byte[] Bytes;
|
||||
|
||||
public SimpleHexEditor(byte[] originalBytes)
|
||||
{
|
||||
InitializeComponent();
|
||||
RTB_RAM.Text = string.Join(" ", originalBytes.Select(z => $"{z:X2}"));
|
||||
Bytes = originalBytes;
|
||||
}
|
||||
|
||||
private void Update_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
var bytestring = RTB_RAM.Text.Replace("\t", "").Replace(" ", "").Trim();
|
||||
Bytes = Decoder.StringToByteArray(bytestring);
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user