resonance 1.0.1
Loading...
Searching...
No Matches
GameRecorder Class Reference

Recording of a game session that GameManagerImpl::StartRecording() installs. More...

#include <gamerecorder.h>

Public Member Functions

 GameRecorder (GameManagerImpl *pManager)
 ~GameRecorder ()
 Delete the stream, if any.
void BeginRecording (int nGameMode, const GameParams &params)
 Open the recording file and start the watchdog's recording into it.
void FinishUp ()
 Close the watchdog's recording and delete the stream.
void ScheduleEnd ()
 Post an EndRecordingCmd for this recorder on the watchdog timer.

Detailed Description

Recording of a game session that GameManagerImpl::StartRecording() installs.

The class is not polymorphic and emits no RTTI. EndRecordingCmd runs FinishUp() on it. The object is 8 bytes and is allocated with the untagged allocator.

Constructor & Destructor Documentation

◆ GameRecorder()

GameRecorder::GameRecorder ( GameManagerImpl * pManager)
explicit
Parameters
pManagerThe manager that installs the recorder.
Ghidra address:
NTSC-U/C: 0x0010f010
Ghidra address:
PAL: 0x0010f470

◆ ~GameRecorder()

GameRecorder::~GameRecorder ( )

Delete the stream, if any.

Ghidra address:
NTSC-U/C: 0x0010f020
Ghidra address:
PAL: 0x0010f480

Member Function Documentation

◆ BeginRecording()

void GameRecorder::BeginRecording ( int nGameMode,
const GameParams & params )

Open the recording file and start the watchdog's recording into it.

Opens rec.bin through MakeFreqPath() as an OBFileStream and writes three length-prefixed strings: a fixed banner beginning PS2 application..., a description built from the level name, the game mode, the play mode, and GameParams::mDifficulty (0 easy, 1 medium, otherwise hard), and no autoexec. The manager then saves itself into the stream, and the watchdog records from there on. GameManagerImpl::OnBeginGameLocal() is the caller. The title is inferred.

Parameters
nGameModeThe manager's game mode.
paramsThe manager's settings.
Ghidra address:
NTSC-U/C: 0x0010c910
Ghidra address:
PAL: 0x0010cae0

◆ FinishUp()

void GameRecorder::FinishUp ( )

Close the watchdog's recording and delete the stream.

EndRecordingCmd::Execute() is the caller.

Ghidra address:
NTSC-U/C: 0x0010f080
Ghidra address:
PAL: 0x0010f4e0

◆ ScheduleEnd()

void GameRecorder::ScheduleEnd ( )

Post an EndRecordingCmd for this recorder on the watchdog timer.

The command runs as soon as the timer allows, under a fresh handle, and is recorded. GameManagerImpl::EndGame() is the caller. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0010cea0
Ghidra address:
PAL: 0x0010d178

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