PKHeX/PKHeX.Core/Saves/Substructures/Gen8/Situation8.cs

26 lines
1.1 KiB
C#
Raw Normal View History

2019-11-16 01:34:18 +00:00
using System;
namespace PKHeX.Core
{
public sealed class Situation8 : SaveBlock
{
public Situation8(SAV8SWSH sav, SCBlock block) : base(sav, block.Data) { }
// "StartLocation"
public int M { get => BitConverter.ToUInt16(Data, Offset + 0x00); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, Offset + 0x00); }
public float X { get => BitConverter.ToSingle(Data, Offset + 0x08); set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x08); }
public float Z { get => BitConverter.ToSingle(Data, Offset + 0x10); set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x10); }
public float Y { get => (int)BitConverter.ToSingle(Data, Offset + 0x18); set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x18); }
public float R { get => (int)BitConverter.ToSingle(Data, Offset + 0x20); set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x20); }
public void UpdateOverworldCoordinates()
{
//var o = ((SAV8)SAV).Overworld;
//o.M = M;
//o.X = X;
//o.Z = Z;
//o.Y = Y;
//o.R = R;
}
}
}