hedgewars/uConsole.pas
changeset 2599 c7153d2348f3
parent 2578 ec8e69b23097
child 2630 079ef82eac75
equal deleted inserted replaced
2598:e118329666ff 2599:c7153d2348f3
    17  *)
    17  *)
    18 
    18 
    19 unit uConsole;
    19 unit uConsole;
    20 interface
    20 interface
    21 uses uFloat;
    21 uses uFloat;
    22 {$INCLUDE options.inc}
    22 {$INCLUDE "options.inc"}
    23 const isDeveloperMode: boolean = true;
    23 const isDeveloperMode: boolean = true;
    24 type TVariableType = (vtCommand, vtLongInt, vthwFloat, vtBoolean);
    24 type TVariableType = (vtCommand, vtLongInt, vthwFloat, vtBoolean);
    25      TCommandHandler = procedure (var params: shortstring);
    25      TCommandHandler = procedure (var params: shortstring);
    26 
    26 
    27 procedure WriteToConsole(s: shortstring);
    27 procedure WriteToConsole(s: shortstring);
    32 procedure SplitBySpace(var a, b: shortstring);
    32 procedure SplitBySpace(var a, b: shortstring);
    33 
    33 
    34 procedure doPut(putX, putY: LongInt; fromAI: boolean);
    34 procedure doPut(putX, putY: LongInt; fromAI: boolean);
    35 
    35 
    36 implementation
    36 implementation
    37 {$J+}
       
    38 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, uLand,
    37 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, uLand,
    39      uRandom, uAmmos, uTriggers, uStats, uGame, uChat, SDLh, uSound, uVisualGears;
    38      uRandom, uAmmos, uTriggers, uStats, uGame, uChat, SDLh, uSound, uVisualGears;
    40 
    39 
    41 const cLineWidth: LongInt = 0;
    40 const cLineWidth: LongInt = 0;
    42       cLinesCount = 256;
    41       cLinesCount = 256;
   221 if (Message and gm_Up) <> 0 then ParseCommand('/-up', true) else
   220 if (Message and gm_Up) <> 0 then ParseCommand('/-up', true) else
   222 if (Message and gm_Down) <> 0 then ParseCommand('/-down', true) else
   221 if (Message and gm_Down) <> 0 then ParseCommand('/-down', true) else
   223 if (Message and gm_Attack) <> 0 then ParseCommand('/-attack', true)
   222 if (Message and gm_Attack) <> 0 then ParseCommand('/-attack', true)
   224 end;
   223 end;
   225 
   224 
   226 {$INCLUDE CCHandlers.inc}
   225 {$INCLUDE "CCHandlers.inc"}
   227 
   226 
   228 initialization
   227 initialization
   229 InitConsole;
   228 InitConsole;
   230 RegisterVariable('proto'   , vtCommand, @chCheckProto   , true );
   229 RegisterVariable('proto'   , vtCommand, @chCheckProto   , true );
   231 RegisterVariable('spectate', vtBoolean, @fastUntilLag   , false);
   230 RegisterVariable('spectate', vtBoolean, @fastUntilLag   , false);