Documentation ¶
Overview ¶
Package recorder handles recording and playback of user input. The Recorder type implements the riot.input.EventRecorder() interface. Once added as a transcriber to the VCS port, it will record all user input to the specified file.
To keep things simple, recording gameplay will use the VCS in it's default state. Future versions of the recorder fileformat will support localised preferences.
Index ¶
Constants ¶
const ( NotAPlaybackFile = "playback file: %v" UnsupportedVersion = "playback file: unsupported version (%v)" )
Sentinal errors from IsPlaybackFile().
const (
PlaybackHashError = "playback: unexpected input at line %d (frame %d)"
)
Sentinal error returned by GetPlayback if a hash error is encountered.
Variables ¶
This section is empty.
Functions ¶
func IsPlaybackFile ¶
IsPlaybackFile return nil if file is a playback file and is a supported version. If file is not a playback file then the sentinal error NotAPlaybackFile is returned.
Recognised playback files but where the version is unspported will result in an UnsupportedVersion error.
Types ¶
type Playback ¶
type Playback struct { CartLoad cartridgeloader.Loader TVSpec string // contains filtered or unexported fields }
Playback is used to reperform the user input recorded in a previously recorded file. It implements the ports.Playback interface.
func NewPlayback ¶
NewPlayback is the preferred method of implementation for the Playback type.
func (*Playback) AttachToVCS ¶
AttachToVCS attaches the playback instance (an implementation of the playback interface) to all the ports of the VCS, including the panel.
Note that this will reset the VCS.
func (Playback) EndFrame ¶
EndFrame returns true if emulation has gone past the last frame of the playback.
func (*Playback) GetPlayback ¶ added in v0.7.1
GetPlayback returns an event and source PortID for an event occurring at the current TV frame/scanline/clock.
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder transcribes user input to a file. The recorded file is intended for future playback. The Recorder type implements the ports.EventRecorder interface.
func NewRecorder ¶
NewRecorder is the preferred method of implementation for the FileRecorder type. Note that attaching of the Recorder to all the ports of the VCS (including the panel) is implicit in this function call.
Note that this will reset the VCS.