|
resonance 1.0.1
|
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 ¶ms) |
| 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. | |
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.
|
explicit |
| pManager | The manager that installs the recorder. |
| GameRecorder::~GameRecorder | ( | ) |
Delete the stream, if any.
| 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.
| nGameMode | The manager's game mode. |
| params | The manager's settings. |
| void GameRecorder::FinishUp | ( | ) |
Close the watchdog's recording and delete the stream.
EndRecordingCmd::Execute() is the caller.
| 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.