mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-20 15:37:24 -05:00
Add reaction list get/set
pls gib ui soon :) need to translate these values (byte) -> reaction names (enum)
This commit is contained in:
parent
230257d4d1
commit
f9d9103039
|
|
@ -20,6 +20,7 @@ public abstract class PersonalOffsets
|
|||
public abstract int ItemChest { get; }
|
||||
public abstract int ItemCollectBit { get; }
|
||||
public abstract int ItemRemakeCollectBit { get; }
|
||||
public abstract int Manpu { get; } // reactions
|
||||
|
||||
public abstract int Bank { get; }
|
||||
public abstract int Recipes { get; }
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public sealed class PersonalOffsets10 : PersonalOffsets
|
|||
public override int ItemChest => PlayerOther + 0x18C;
|
||||
public override int ItemCollectBit => PlayerOther + 0xA04C;
|
||||
public override int ItemRemakeCollectBit => PlayerOther + 0xA7A0;
|
||||
public override int Manpu => PlayerOther + 0xAF70;
|
||||
public override int Bank => PlayerOther + 0x33014;
|
||||
public override int Recipes => Bank + 0x10;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public sealed class PersonalOffsets11 : PersonalOffsets
|
|||
public override int ItemChest => PlayerOther + 0x18C;
|
||||
public override int ItemCollectBit => PlayerOther + 0xA058;
|
||||
public override int ItemRemakeCollectBit => PlayerOther + 0xA7AC;
|
||||
public override int Manpu => PlayerOther + 0xAF7C;
|
||||
public override int Bank => PlayerOther + 0x33024;
|
||||
public override int Recipes => Bank + 0x10;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public sealed class PersonalOffsets12 : PersonalOffsets
|
|||
public override int ItemChest => PlayerOther + 0x18C;
|
||||
public override int ItemCollectBit => PlayerOther + 0xA058;
|
||||
public override int ItemRemakeCollectBit => PlayerOther + 0xA7AC;
|
||||
public override int Manpu => PlayerOther + 0xAF7C;
|
||||
public override int Bank => PlayerOther + 0x345E4;
|
||||
public override int Recipes => Bank + 0x10;
|
||||
|
||||
|
|
|
|||
31
NHSE.Core/Structures/Misc/GSavePlayerManpu.cs
Normal file
31
NHSE.Core/Structures/Misc/GSavePlayerManpu.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
#pragma warning disable CS8618, CA1815, CA1819, IDE1006
|
||||
namespace NHSE.Core
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct GSavePlayerManpu
|
||||
{
|
||||
public const int SIZE = 0x88;
|
||||
private const int MaxCount = 64;
|
||||
private const int WheelCount = 8;
|
||||
|
||||
/// <summary>
|
||||
/// List of known Reaction IDs
|
||||
/// </summary>
|
||||
[field: MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxCount)]
|
||||
public byte[] ManpuBit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Emotions that are currently bound to the Reaction Wheel.
|
||||
/// </summary>
|
||||
[field: MarshalAs(UnmanagedType.ByValArray, SizeConst = WheelCount)]
|
||||
public byte[] UIList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Flags indicating if an Reaction (at the same index?) is newly learned or not.
|
||||
/// </summary>
|
||||
[field: MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.I1, SizeConst = MaxCount)]
|
||||
public bool[] NewFlag { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,8 @@ public class FancyMarshalTests
|
|||
|
||||
[Fact] public void MarshalGSaveRoomFloorWall() => MarshalBytesTestS<GSaveRoomFloorWall>(GSaveRoomFloorWall.SIZE);
|
||||
|
||||
[Fact] public void MarshalGSaveManpu() => MarshalBytesTestS<GSavePlayerManpu>(GSavePlayerManpu.SIZE);
|
||||
|
||||
private static void MarshalBytesTestS<T>(int size) where T : struct
|
||||
{
|
||||
var bytes = new byte[size];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user