2019-06-15 19:31:06 +00:00
|
|
|
|
using System;
|
2019-06-15 21:06:35 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
2019-06-15 19:31:06 +00:00
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.Common
|
|
|
|
|
{
|
2019-06-15 20:19:18 +00:00
|
|
|
|
public interface IStateManager
|
2019-06-15 19:31:06 +00:00
|
|
|
|
{
|
|
|
|
|
// byte[] this[int frame] { get; } // TODO: I had it refactored to this back in the day
|
|
|
|
|
KeyValuePair<int, byte[]> this[int frame] { get; }
|
|
|
|
|
|
|
|
|
|
TasStateManagerSettings Settings { get; set; }
|
|
|
|
|
|
|
|
|
|
Action<int> InvalidateCallback { set; }
|
|
|
|
|
|
|
|
|
|
void Capture(bool force = false);
|
|
|
|
|
|
|
|
|
|
bool HasState(int frame);
|
|
|
|
|
|
|
|
|
|
bool Invalidate(int frame);
|
|
|
|
|
|
2019-06-15 20:19:18 +00:00
|
|
|
|
void Clear();
|
2019-06-15 19:31:06 +00:00
|
|
|
|
|
|
|
|
|
void Save(BinaryWriter bw);
|
|
|
|
|
|
|
|
|
|
void Load(BinaryReader br);
|
|
|
|
|
|
|
|
|
|
KeyValuePair<int, byte[]> GetStateClosestToFrame(int frame);
|
|
|
|
|
|
|
|
|
|
bool Any();
|
|
|
|
|
|
2019-06-15 19:49:43 +00:00
|
|
|
|
int Count { get; }
|
|
|
|
|
|
2019-06-15 20:19:18 +00:00
|
|
|
|
int Last { get; }
|
2019-06-15 19:31:06 +00:00
|
|
|
|
|
2019-06-15 19:40:18 +00:00
|
|
|
|
bool IsMarkerState(int frame);
|
|
|
|
|
|
2019-06-15 20:44:34 +00:00
|
|
|
|
void UpdateStateFrequency();
|
|
|
|
|
|
2019-06-15 20:43:22 +00:00
|
|
|
|
int GetStateIndexByFrame(int frame);
|
2019-06-15 19:31:06 +00:00
|
|
|
|
|
2019-06-15 20:43:22 +00:00
|
|
|
|
int GetStateFrameByIndex(int index);
|
2019-06-15 19:31:06 +00:00
|
|
|
|
|
2019-06-15 20:44:34 +00:00
|
|
|
|
bool Remove(int frame);
|
2019-06-15 19:31:06 +00:00
|
|
|
|
}
|
|
|
|
|
}
|