# HG changeset patch # User unc0rr # Date 1196616560 0 # Node ID a30171dbcd19d81a9c91c3b93f7af1d2e0ac54dd # Parent 373353eaa742d9beee6252a1a238226ca72984b6 's' key to speed up demo playing diff -r 373353eaa742 -r a30171dbcd19 hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Sat Dec 01 12:38:15 2007 +0000 +++ b/hedgewars/CCHandlers.inc Sun Dec 02 17:29:20 2007 +0000 @@ -501,3 +501,13 @@ end; end end; + +procedure chSpeedup_p(var s: shortstring); +begin +isSpeed:= true +end; + +procedure chSpeedup_m(var s: shortstring); +begin +isSpeed:= false +end; diff -r 373353eaa742 -r a30171dbcd19 hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Sat Dec 01 12:38:15 2007 +0000 +++ b/hedgewars/uConsole.pas Sun Dec 02 17:29:20 2007 +0000 @@ -299,6 +299,8 @@ RegisterVariable('addhh' , vtCommand, @chAddHH , false); RegisterVariable('hhcoords', vtCommand, @chSetHHCoords , false); RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , false); +RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true ); +RegisterVariable('-speedup', vtCommand, @chSpeedup_m , true ); RegisterVariable('skip' , vtCommand, @chSkip , false); RegisterVariable('say' , vtCommand, @chSay , true ); RegisterVariable('ammomenu', vtCommand, @chAmmoMenu , false); diff -r 373353eaa742 -r a30171dbcd19 hedgewars/uGame.pas --- a/hedgewars/uGame.pas Sat Dec 01 12:38:15 2007 +0000 +++ b/hedgewars/uGame.pas Sun Dec 02 17:29:20 2007 +0000 @@ -46,6 +46,7 @@ end; if Lag > 100 then Lag:= 100 else if GameType = gmtSave then Lag:= 2500; +if (GameType = gmtDemo) and isSpeed then Lag:= Lag * 10; i:= 1; while (GameState <> gsExit) and (i <= Lag) do diff -r 373353eaa742 -r a30171dbcd19 hedgewars/uKeys.pas --- a/hedgewars/uKeys.pas Sat Dec 01 12:38:15 2007 +0000 +++ b/hedgewars/uKeys.pas Sun Dec 02 17:29:20 2007 +0000 @@ -120,6 +120,7 @@ DefaultBinds[102]:= 'fullscr'; DefaultBinds[104]:= 'findhh'; DefaultBinds[112]:= 'pause'; +DefaultBinds[115]:= '+speedup'; DefaultBinds[127]:= 'rotmask'; SetDefaultBinds end; diff -r 373353eaa742 -r a30171dbcd19 hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Sat Dec 01 12:38:15 2007 +0000 +++ b/hedgewars/uMisc.pas Sun Dec 02 17:29:20 2007 +0000 @@ -27,6 +27,7 @@ isSoundEnabled : boolean = true; isSEBackup : boolean = true; isInMultiShoot : boolean = false; + isSpeed : boolean = false; GameState : TGameState = Low(TGameState); GameType : TGameType = gmtLocal;