Skip to content

Commit a9a6da4

Browse files
committed
fix: Update Recorder.h to match Recorder.cpp after PR #1703 merge
PR #1703 (replay archive feature) added new methods to Recorder.cpp but we kept Recorder.h/cpp in Generals/MD (not unified). Need to sync the header with the implementation.
1 parent efe54bd commit a9a6da4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Generals/Code/GameEngine/Include/Common/Recorder.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ class RecorderClass : public SubsystemInterface {
117117
Bool isPlaybackMode() const { return m_mode == RECORDERMODETYPE_PLAYBACK || m_mode == RECORDERMODETYPE_SIMULATION_PLAYBACK; }
118118
void initControls(); ///< Show or Hide the Replay controls
119119

120-
AsciiString getReplayDir(); ///< Returns the directory that holds the replay files.
121-
static AsciiString getReplayExtention(); ///< Returns the file extention for replay files.
122-
AsciiString getLastReplayFileName(); ///< Returns the filename used for the default replay.
120+
static AsciiString getReplayDir(); ///< Returns the directory that holds the replay files.
121+
static AsciiString getReplayArchiveDir(); ///< Returns the directory that holds the archived replay files.
122+
static AsciiString getReplayExtention(); ///< Returns the file extention for replay files.
123+
static AsciiString getLastReplayFileName(); ///< Returns the filename used for the default replay.
123124

124125
GameInfo *getGameInfo( void ) { return &m_gameInfo; } ///< Returns the slot list for playback game start
125126

@@ -132,10 +133,12 @@ class RecorderClass : public SubsystemInterface {
132133
Bool sawCRCMismatch() const;
133134
void cleanUpReplayFile( void ); ///< after a crash, send replay/debug info to a central repository
134135

136+
void setArchiveEnabled(Bool enable) { m_archiveReplays = enable; } ///< Enable or disable replay archiving.
135137
void stopRecording(); ///< Stop recording and close m_file.
136138
protected:
137139
void startRecording(GameDifficulty diff, Int originalGameMode, Int rankPoints, Int maxFPS); ///< Start recording to m_file.
138140
void writeToFile(GameMessage *msg); ///< Write this GameMessage to m_file.
141+
void archiveReplay(AsciiString fileName); ///< Move the specified replay file to the archive directory.
139142

140143
void logGameStart(AsciiString options);
141144
void logGameEnd( void );
@@ -166,6 +169,7 @@ class RecorderClass : public SubsystemInterface {
166169
Bool m_wasDesync;
167170

168171
Bool m_doingAnalysis;
172+
Bool m_archiveReplays; ///< if true, each replay is archived to the replay archive folder after recording
169173

170174
Int m_originalGameMode; // valid in replays
171175

0 commit comments

Comments
 (0)