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

34 lines
736 B
C#
Raw Normal View History

2024-08-29 17:20:01 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VirtualNes.Core
{
public struct SNDSTAT : IStateBufferObject
{
public byte[] snddata;
public static SNDSTAT GetDefault()
{
return new SNDSTAT() { snddata = new byte[0x800] };
}
2024-09-13 17:39:48 +08:00
public readonly uint GetSize()
2024-08-29 17:20:01 +08:00
{
return (uint)snddata.Length;
}
2024-09-13 17:39:48 +08:00
public readonly void SaveState(StateBuffer buffer)
2024-08-29 17:20:01 +08:00
{
buffer.Write(snddata);
}
2024-09-13 17:39:48 +08:00
public void LoadState(StateReader buffer)
{
snddata = buffer.Read_bytes(0x800);
}
2024-08-29 17:20:01 +08:00
}
}