hedgewars/uConsole.pas
changeset 53 0e27949850e3
parent 51 b6e3ae05857f
child 55 e09f7c952a40
equal deleted inserted replaced
52:ae2950c5465c 53:0e27949850e3
    42 procedure DrawConsole(Surface: PSDL_Surface);
    42 procedure DrawConsole(Surface: PSDL_Surface);
    43 procedure WriteToConsole(s: shortstring);
    43 procedure WriteToConsole(s: shortstring);
    44 procedure WriteLnToConsole(s: shortstring);
    44 procedure WriteLnToConsole(s: shortstring);
    45 procedure KeyPressConsole(Key: Longword);
    45 procedure KeyPressConsole(Key: Longword);
    46 procedure ParseCommand(CmdStr: shortstring);
    46 procedure ParseCommand(CmdStr: shortstring);
       
    47 function  GetLastConsoleLine: shortstring;
    47 
    48 
    48 implementation
    49 implementation
    49 {$J+}
    50 {$J+}
    50 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uSound, uWorld, uLand;
    51 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uSound, uWorld, uLand;
    51 const cLineWidth: integer = 0;
    52 const cLineWidth: integer = 0;
   258          end;
   259          end;
   259      else InputStr:= InputStr + char(Key)
   260      else InputStr:= InputStr + char(Key)
   260      end
   261      end
   261 end;
   262 end;
   262 
   263 
       
   264 function GetLastConsoleLine: shortstring;
       
   265 begin
       
   266 if CurrLine = 0 then Result:= ConsoleLines[Pred(cLinesCount)]
       
   267                 else Result:= ConsoleLines[Pred(CurrLine)]
       
   268 end;
       
   269 
   263 {$INCLUDE CCHandlers.inc}
   270 {$INCLUDE CCHandlers.inc}
   264 
   271 
   265 initialization
   272 initialization
   266 InitConsole;
   273 InitConsole;
   267 RegisterVariable('quit'    , vtCommand, @chQuit         );
   274 RegisterVariable('quit'    , vtCommand, @chQuit         );