--- a/hedgewars/uCommandHandlers.pas Mon Aug 27 16:52:50 2012 -0400
+++ b/hedgewars/uCommandHandlers.pas Tue Aug 28 20:30:57 2012 +0400
@@ -26,7 +26,8 @@
procedure freeModule;
implementation
-uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uRandom, uCaptions;
+uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uRandom, uCaptions
+ {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF};
var prevGState: TGameState = gsConfirm;
@@ -530,6 +531,17 @@
flagMakeCapture:= true
end;
+procedure chRecord(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+{$IFDEF USE_VIDEO_RECORDING}
+if flagPrerecording then
+ StopPreRecording()
+else
+ BeginPreRecording();
+{$ENDIF}
+end;
+
procedure chSetMap(var s: shortstring);
begin
if isDeveloperMode then
@@ -868,6 +880,7 @@
RegisterVariable('-cur_l' , @chCurL_m , true );
RegisterVariable('+cur_r' , @chCurR_p , true );
RegisterVariable('-cur_r' , @chCurR_m , true );
+ RegisterVariable('record' , @chRecord , true );
end;
procedure freeModule;