/// <exception cref="InvalidOperationException">loaded core does not implement <see cref="IStatable"/></exception> internal TasMovie(IMovieSession session, string path, IQuickBmpFile quickBmpFile) : base(session, path) { Branches = new TasBranchCollection(this, quickBmpFile); ChangeLog = new TasMovieChangeLog(this); Header[HeaderKeys.MovieVersion] = $"BizHawk v2.0 Tasproj v{CurrentVersion.ToString(CultureInfo.InvariantCulture)}"; Markers = new TasMovieMarkerList(this); Markers.CollectionChanged += Markers_CollectionChanged; Markers.Add(0, "Power on"); TasStateManager = new ZwinderStateManager( session.Settings.DefaultTasStateManagerSettings, IsReserved); }
public MovieSession( IMovieConfig settings, string backDirectory, IDialogParent dialogParent, IQuickBmpFile quickBmpFile, Action pauseCallback, Action modeChangedCallback) { Settings = settings; BackupDirectory = backDirectory; _dialogParent = dialogParent; _quickBmpFile = quickBmpFile; _pauseCallback = pauseCallback ?? throw new ArgumentNullException($"{nameof(pauseCallback)} cannot be null."); _modeChangedCallback = modeChangedCallback ?? throw new ArgumentNullException($"{nameof(modeChangedCallback)} CannotUnloadAppDomainException be null."); }
public SavestateFile( IEmulator emulator, IMovieSession movieSession, IQuickBmpFile quickBmpFile, IDictionary <string, object> userBag) { if (!emulator.HasSavestates()) { throw new InvalidOperationException("The provided core must have savestates"); } _emulator = emulator; _statable = emulator.AsStatable(); if (emulator.HasVideoProvider()) { _videoProvider = emulator.AsVideoProvider(); } _movieSession = movieSession; _quickBmpFile = quickBmpFile; _userBag = userBag; }
private static void PopulateFramebuffer(BinaryReader br, IVideoProvider videoProvider, IQuickBmpFile quickBmpFile) { try { using (new SimpleTime("Load Framebuffer")) { quickBmpFile.Load(videoProvider, br.BaseStream); } } catch { var buff = videoProvider.GetVideoBuffer(); try { for (int i = 0; i < buff.Length; i++) { int j = br.ReadInt32(); buff[i] = j; } } catch (EndOfStreamException) { } } }
public TasBranchCollection(ITasMovie movie, IQuickBmpFile quickBmpFile) { _movie = movie; _quickBmpFile = quickBmpFile; }