public GBLSerialized(GambatteLink linkcore) { if (linkcore == null) { return; } NumCores = linkcore._numCores; LinkedStates = new TextState <Gameboy.TextStateData> [NumCores]; LinkedOverflow = new int[NumCores]; LinkedLatches = new int[NumCores]; for (int i = 0; i < NumCores; i++) { LinkedStates[i] = linkcore._linkedCores[i].SaveState(); LinkedOverflow[i] = linkcore._linkedOverflow[i]; LinkedLatches[i] = linkcore._linkedLatches[i]; } IsLagFrame = linkcore.IsLagFrame; LagCount = linkcore.LagCount; Frame = linkcore.Frame; LinkConnected = linkcore._linkConnected; LinkDiscoSignal = linkcore._linkDiscoSignal; LinkShifted = linkcore._linkShifted; LinkShiftSignal = linkcore._linkShiftSignal; LinkSpaced = linkcore._linkSpaced; LinkSpaceSignal = linkcore._linkSpaceSignal; }
void GetSettings(out GambatteLink.GambatteLinkSettings s, out GambatteLink.GambatteLinkSyncSettings ss) { Gameboy.GambatteSettings sl; Gameboy.GambatteSyncSettings ssl; Gameboy.GambatteSettings sr; Gameboy.GambatteSyncSettings ssr; gbPrefControl1.GetSettings(out sl, out ssl); gbPrefControl2.GetSettings(out sr, out ssr); s = new GambatteLink.GambatteLinkSettings(sl, sr); ss = new GambatteLink.GambatteLinkSyncSettings(ssl, ssr); }
void PutSettings(GambatteLink.GambatteLinkSettings s, GambatteLink.GambatteLinkSyncSettings ss) { gbPrefControl1.PutSettings(s.L, ss.L); gbPrefControl2.PutSettings(s.R, ss.R); }