resonance 1.0.1
Loading...
Searching...
No Matches
Sch::Playbacker Class Reference

Replay of a recorded command stream that Sch::Scheduler::StartPlayback() installs. More...

#include <playbacker.h>

Public Member Functions

 Playbacker (Scheduler *pWatchdog)
 ~Playbacker ()
 Release every loaded wrapper through Attachment::ReleaseIfSet() and empty mCommands.
void Load (IBStream &stream)
 Read the recorded wrappers from a stream.
void Play ()
 Rewind the scheduler's clock and queue every loaded wrapper.

Detailed Description

Replay of a recorded command stream that Sch::Scheduler::StartPlayback() installs.

The class is not polymorphic and emits no RTTI. Its name comes from the debugging symbols of the North American demo release. The object is 0x14 bytes and is allocated with the untagged allocator. Load() reads the recorded wrappers into mCommands, stopping at the EndRecordingCmd that ends a recording, and Play() rewinds the scheduler's clock and queues every wrapper on the scheduler.

Constructor & Destructor Documentation

◆ Playbacker()

Sch::Playbacker::Playbacker ( Scheduler * pWatchdog)
explicit
Parameters
pWatchdogThe scheduler the commands are replayed on.
Ghidra address:
NTSC-U/C: 0x00594968
Ghidra address:
PAL: 0x005d7d00

◆ ~Playbacker()

Sch::Playbacker::~Playbacker ( )

Release every loaded wrapper through Attachment::ReleaseIfSet() and empty mCommands.

Ghidra address:
NTSC-U/C: 0x00594988
Ghidra address:
PAL: 0x005d7d20

Member Function Documentation

◆ Load()

void Sch::Playbacker::Load ( IBStream & stream)

Read the recorded wrappers from a stream.

Empties mCommands, then reads one Sch::TimedCommand after another until the stream reaches its end or a wrapper holds a command whose CmdID() is 6, the identifier of EndRecordingCmd. The wrapper that stops the loop is deleted. Each wrapper kept has its handle reserved through Sch::CmdID::ReserveID(). mCursor is left at the first wrapper. The title is inferred.

Parameters
streamThe recording.
Ghidra address:
NTSC-U/C: 0x00594a78
Ghidra address:
PAL: 0x005d7e10

◆ Play()

void Sch::Playbacker::Play ( )

Rewind the scheduler's clock and queue every loaded wrapper.

Pauses the clock, restarts it at zero, queues each wrapper from mCursor on, and resumes the clock.

Ghidra address:
NTSC-U/C: 0x005962e8
Ghidra address:
PAL: 0x005d96f0

The documentation for this class was generated from the following file: