hedgewars/uIO.pas
changeset 37 2b7f2a43b999
parent 22 517be8dc5b76
child 48 0f396d0c429d
equal deleted inserted replaced
36:a803a00a3272 37:2b7f2a43b999
   169 
   169 
   170 tmpflag:= true;
   170 tmpflag:= true;
   171 while (cmdcurpos <= cmdendpos)and(GameTicks = extcmd[cmdcurpos].Time) do
   171 while (cmdcurpos <= cmdendpos)and(GameTicks = extcmd[cmdcurpos].Time) do
   172    begin
   172    begin
   173    case extcmd[cmdcurpos].cmd of
   173    case extcmd[cmdcurpos].cmd of
   174         'L': ParseCommand('/+left');
   174         'L': ParseCommand('+left');
   175         'l': ParseCommand('/-left');
   175         'l': ParseCommand('-left');
   176         'R': ParseCommand('/+right');
   176         'R': ParseCommand('+right');
   177         'r': ParseCommand('/-right');
   177         'r': ParseCommand('-right');
   178         'U': ParseCommand('/+up');
   178         'U': ParseCommand('+up');
   179         'u': ParseCommand('/-up');
   179         'u': ParseCommand('-up');
   180         'D': ParseCommand('/+down');
   180         'D': ParseCommand('+down');
   181         'd': ParseCommand('/-down');
   181         'd': ParseCommand('-down');
   182         'A': ParseCommand('/+attack');
   182         'A': ParseCommand('+attack');
   183         'a': ParseCommand('/-attack');
   183         'a': ParseCommand('-attack');
   184         'S': ParseCommand('/switch');
   184         'S': ParseCommand('switch');
   185         'j': ParseCommand('/ljump');
   185         'j': ParseCommand('ljump');
   186         'J': ParseCommand('/hjump');
   186         'J': ParseCommand('hjump');
   187         'N': begin
   187         'N': begin
   188              tmpflag:= false;
   188              tmpflag:= false;
   189              {$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(extcmd[cmdcurpos].Time)){$ENDIF}
   189              {$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(extcmd[cmdcurpos].Time)){$ENDIF}
   190              end;
   190              end;
   191         'p': begin
   191         'p': begin
   192              TargetPoint.X:= extcmd[cmdcurpos].X;
   192              TargetPoint.X:= extcmd[cmdcurpos].X;
   193              TargetPoint.Y:= extcmd[cmdcurpos].Y;
   193              TargetPoint.Y:= extcmd[cmdcurpos].Y;
   194              ParseCommand('/put')
   194              ParseCommand('put')
   195              end;
   195              end;
   196         'P': begin
   196         'P': begin
   197              CursorPoint.X:= extcmd[cmdcurpos].X + WorldDx;
   197              CursorPoint.X:= extcmd[cmdcurpos].X + WorldDx;
   198              CursorPoint.Y:= extcmd[cmdcurpos].Y + WorldDy;
   198              CursorPoint.Y:= extcmd[cmdcurpos].Y + WorldDy;
   199              end;
   199              end;
   200         '1'..'5': ParseCommand('/timer ' + extcmd[cmdcurpos].cmd);
   200         '1'..'5': ParseCommand('timer ' + extcmd[cmdcurpos].cmd);
   201         #128..#134: ParseCommand('/slot ' + char(byte(extcmd[cmdcurpos].cmd) - 79))
   201         #128..#134: ParseCommand('slot ' + char(byte(extcmd[cmdcurpos].cmd) - 79))
   202         end;
   202         end;
   203    inc(cmdcurpos)
   203    inc(cmdcurpos)
   204    end;
   204    end;
   205 isInLag:= (cmdcurpos > cmdendpos) and tmpflag
   205 isInLag:= (cmdcurpos > cmdendpos) and tmpflag
   206 end;
   206 end;