添加 模拟器核心接口IEmuCore各个方法的注释

This commit is contained in:
ALIENJACK\alien 2025-01-07 14:11:35 +08:00
parent 0628c4439d
commit 7eaa208c78
3 changed files with 15 additions and 8 deletions

View File

@ -7,18 +7,30 @@ namespace AxibugEmuOnline.Client
{
GameObject gameObject { get; }
/// <summary> 获得模拟器核心中的状态快照对象 </summary>
object GetState();
/// <summary> 获得模拟器核心中的状态快照字节数据 </summary>
byte[] GetStateBytes();
/// <summary> 加载状态快照 </summary>
/// <param name="state">该对象应该来自核心的<see cref="GetState"/>方法的返回值,或是从<see cref="GetStateBytes"/>返回的byte数组构建</param>
void LoadState(object state);
/// <summary> 加载状态快照 </summary>
/// <param name="data">该对象应该来自核心的<see cref="GetStateBytes"/>返回的byte数组</param>
void LoadStateFromBytes(byte[] data);
/// <summary> 暂停核心推帧 </summary>
void Pause();
/// <summary> 恢复核心推帧(从Pause状态恢复) </summary>
void Resume();
void SetupScheme();
/// <summary> 启动模拟器逻辑 </summary>
MsgBool StartGame(RomFile romFile);
/// <summary> 重置核心,通常由模拟器核心提供的功能 </summary>
void DoReset();
/// <summary> 获得模拟器核心的控制器设置器 </summary>
/// <returns></returns>
IControllerSetuper GetControllerSetuper();
/// <summary> 核心所属平台 </summary>
RomPlatformType Platform { get; }
/// <summary> 获取当前模拟器帧序号,在加载快照和Reset后,应当重置为0 </summary>
uint Frame { get; }
}

View File

@ -63,7 +63,7 @@ namespace AxibugEmuOnline.Client.Manager
LaunchUI.Instance.HideMainMenu();
InGameUI.Instance.Show(romFile, m_emuCore);
m_emuCore.SetupScheme();
CommandDispatcher.Instance.Current = CommandDispatcher.Instance.Gaming;
m_controllerSetuper = m_emuCore.GetControllerSetuper();

View File

@ -103,11 +103,6 @@ namespace AxibugEmuOnline.Client
NesCore.Reset();
}
public void SetupScheme()
{
CommandDispatcher.Instance.Current = CommandDispatcher.Instance.Gaming;
}
public void LoadState(object state)
{
NesCore.LoadState((State)state);