hedgewars/uInputHandler.pas
changeset 9981 94f5e5cd151b
parent 9714 54d756b6dbb1
child 9998 736015b847e3
equal deleted inserted replaced
9979:710e0f92c2ab 9981:94f5e5cd151b
   484 
   484 
   485             p:= '';
   485             p:= '';
   486             i:= 1;
   486             i:= 1;
   487             while (i <= length(l)) and (l[i] <> '=') do
   487             while (i <= length(l)) and (l[i] <> '=') do
   488                 begin
   488                 begin
   489                 if l[i] <> '%' then
   489                 if l[i] = '%' then
   490                     begin
       
   491                     p:= p + l[i];
       
   492                     inc(i)
       
   493                     end else
       
   494                     begin
   490                     begin
   495                     l[i]:= '$';
   491                     l[i]:= '$';
   496                     val(copy(l, i, 3), b);
   492                     val(copy(l, i, 3), b);
   497                     p:= p + char(b);
   493                     p:= p + char(b);
   498                     inc(i, 3)
   494                     inc(i, 3)
       
   495                     end 
       
   496                 else
       
   497                     begin
       
   498                     p:= p + l[i];
       
   499                     inc(i)
   499                     end;
   500                     end;
   500                 end;
   501                 end;
   501 
   502 
   502             if i < length(l) then
   503             if i < length(l) then
   503                 begin
   504                 begin
   504                 l:= copy(l, i + 1, length(l) - i);
   505                 l:= copy(l, i + 1, length(l) - i);
   505                 if l <> 'default' then
   506                 if l <> 'default' then
   506                     begin
   507                     begin
       
   508                     if (length(l) = 2) and (l[1] = '\') then 
       
   509                         l:= l[1]
       
   510                     else if (l[1] = '"') and (l[length(l)] = '"') then
       
   511                         l:= copy(l, 2, length(l) - 2);
       
   512 
   507                     p:= cmd + ' ' + l + ' ' + p;
   513                     p:= cmd + ' ' + l + ' ' + p;
   508                     ParseCommand(p, true)
   514                     ParseCommand(p, true)
   509                     end
   515                     end
   510                 end
   516                 end
   511             end;
   517             end;