Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVENTRECORDER: Fix synchronisation, add 'update' mode #3342

Merged
merged 12 commits into from Sep 9, 2021

Conversation

@moralrecordings
Copy link
Contributor

@moralrecordings moralrecordings commented Sep 4, 2021

  • Screenshot frequency can now be specified from the command line.
  • Screen redraws are now tracked, and all events and screenshots are force-aligned with a screen redraw.
  • A few cases of recursion in the event processing stream have been removed.
  • Compatibility with the previous version of Event Recorder file format has been dropped, on the advice that no testing efforts use this feature yet.
  • A new 'update' mode has been added to the EventRecorder. This new mode is functionally identical to playback mode, however
    a new recording file is used to track the actual output of ScummVM. This feature can be used to update a suite of existing recordings after a renderer or a timing change.
This is required for Director to allow testing arbitrary files that
aren't part a game, e.g. Lingo Dictionary.
This fixes a stack overflow when EventRecorder is used and debug logging is switched on.
Screen update boundaries are now used as sync points.
Screenshots are now processed on a screen update boundary.

This change increments the version of the Event Recorder
file format to 2; version 1 files will still play back as
before, without synchronising to screen updates.
This new mode is functionally identical to playback mode, however
a new recording file is used to track the actual output of ScummVM.
This feature can be used to update a suite of existing recordings after
a renderer or a timing change.
Copy link
Contributor

@mgerhardy mgerhardy left a comment

Awesome work - next step to automate engine tests.

gui/EventRecorder.h Outdated Show resolved Hide resolved
gui/EventRecorder.h Show resolved Hide resolved
common/recorderfile.h Outdated Show resolved Hide resolved
common/recorderfile.cpp Show resolved Hide resolved
Previously the file format had all chunks, offsets and values stored in
little-endian format. The one exception was screenshots, which used the
existing THMB code in graphics/thumbnail.cpp, that is entirely
big-endian. Any tooling which attempts to parse the Event Recorder file
format must make a special exception for THMB chunks, and read the chunk
size and contents as big-endian.

In the interests of making the file format more consistant
to parse, and given that backwards compatibility is not required for
this iteration of Event Recorder, this patch changes everything to
big-endian.
@moralrecordings moralrecordings requested a review from mgerhardy Sep 7, 2021
@mgerhardy mgerhardy merged commit 666f241 into scummvm:master Sep 9, 2021
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants