AxibugEmuOnline/AxibugEmuOnline.Client/Assets/VirtualNes.Core/State/CTRSTAT.cs

35 lines
916 B
C#
Raw Normal View History

2024-11-21 17:18:15 +08:00
namespace VirtualNes.Core
2024-08-29 17:20:01 +08:00
{
public struct CTRSTAT : IStateBufferObject
{
public uint pad1bit;
public uint pad2bit;
public uint pad3bit;
public uint pad4bit;
public byte strobe;
public readonly uint GetSize()
{
return sizeof(uint) * 4 + sizeof(byte);
}
public readonly void SaveState(StateBuffer buffer)
{
buffer.Write(pad1bit);
buffer.Write(pad2bit);
buffer.Write(pad3bit);
buffer.Write(pad4bit);
buffer.Write(strobe);
}
2024-09-13 17:39:48 +08:00
public void LoadState(StateReader buffer)
{
pad1bit = buffer.Read_uint();
pad2bit = buffer.Read_uint();
pad3bit = buffer.Read_uint();
pad4bit = buffer.Read_uint();
strobe = buffer.Read_byte();
}
2024-08-29 17:20:01 +08:00
}
}