mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-06 09:43:58 -05:00
Code now compiles, but will need to test and bugfix extensively. Need to pre-fill the pixel buffers with sea first unless the acre fill actually works (maybe?) Items need to be relative'd to apply 1 row lower, and skip the bottom row. Need to check that terrain is the same as well. Note to self: For Map - probably better to get a starting x,y,width and iterate off that, fetching tile from relative, converting to absolute... idk. For View - need to check if tile is in layer.
27 lines
702 B
C#
27 lines
702 B
C#
using System;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
using NHSE.Core;
|
|
|
|
namespace NHSE.WinForms;
|
|
|
|
public partial class SimpleHexEditor : Form
|
|
{
|
|
public byte[] Bytes;
|
|
|
|
public SimpleHexEditor(byte[] originalBytes)
|
|
{
|
|
InitializeComponent();
|
|
this.TranslateInterface(GameInfo.CurrentLanguage);
|
|
RTB_RAM.Text = string.Join(" ", originalBytes.Select(z => $"{z:X2}"));
|
|
Bytes = originalBytes;
|
|
}
|
|
|
|
private void Update_Click(object sender, EventArgs e)
|
|
{
|
|
var bytestring = RTB_RAM.Text.Replace("\t", "").Replace(" ", "").Trim();
|
|
Bytes = Convert.FromHexString(bytestring);
|
|
DialogResult = DialogResult.OK;
|
|
Close();
|
|
}
|
|
} |