Introduce CharacterSave and rudimentary Clipboard buttons.

This commit is contained in:
Ottermandias 2021-08-07 12:41:17 +02:00
parent d582c83152
commit f71b800b2e
3 changed files with 137 additions and 11 deletions

View file

@ -250,14 +250,18 @@ namespace Glamourer.Customization
}
}
public unsafe byte[] ToBytes()
public unsafe void WriteBytes(byte[] array, int offset = 0)
{
var ret = new byte[CustomizationBytes];
fixed (byte* ptr = &_race)
{
Marshal.Copy(new IntPtr(ptr), ret, 0, CustomizationBytes);
Marshal.Copy(new IntPtr(ptr), array, offset, CustomizationBytes);
}
}
public byte[] ToBytes()
{
var ret = new byte[CustomizationBytes];
WriteBytes(ret);
return ret;
}
}