mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-13 06:02:36 +00:00
58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
|
using System;
|
|||
|
|
|||
|
namespace PKHeX.Core
|
|||
|
{
|
|||
|
public class PokeFinder7 : SaveBlock
|
|||
|
{
|
|||
|
public PokeFinder7(SAV7 sav, int offset) : base(sav) => Offset = offset;
|
|||
|
|
|||
|
public ushort CameraVersion
|
|||
|
{
|
|||
|
get => BitConverter.ToUInt16(Data, Offset + 0x00);
|
|||
|
set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x00);
|
|||
|
}
|
|||
|
|
|||
|
public bool GyroFlag
|
|||
|
{
|
|||
|
get => BitConverter.ToUInt16(Data, Offset + 0x02) == 1;
|
|||
|
set => BitConverter.GetBytes((ushort)(value ? 1 : 0)).CopyTo(Data, Offset + 0x02);
|
|||
|
}
|
|||
|
|
|||
|
public uint SnapCount
|
|||
|
{
|
|||
|
get => BitConverter.ToUInt32(Data, Offset + 0x04);
|
|||
|
set
|
|||
|
{
|
|||
|
if (value > 9999999) // Top bound is unchecked, check anyway
|
|||
|
value = 9999999;
|
|||
|
BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x04);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public uint ThumbsTotalValue
|
|||
|
{
|
|||
|
get => BitConverter.ToUInt32(Data, Offset + 0x0C);
|
|||
|
set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x0C);
|
|||
|
}
|
|||
|
|
|||
|
public uint ThumbsHighValue
|
|||
|
{
|
|||
|
get => BitConverter.ToUInt32(Data, Offset + 0x10);
|
|||
|
set
|
|||
|
{
|
|||
|
if (value > 9_999_999)
|
|||
|
value = 9_999_999;
|
|||
|
BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x10);
|
|||
|
|
|||
|
if (value > ThumbsTotalValue)
|
|||
|
ThumbsTotalValue = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public ushort TutorialFlags
|
|||
|
{
|
|||
|
get => BitConverter.ToUInt16(Data, Offset + 0x14);
|
|||
|
set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x14);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|