hedgewars/uInputHandler.pas
changeset 7202 2d78dc517c91
parent 7199 f329fbf1ffb4
child 7231 f484455dd055
child 7403 e8d0b21efa82
equal deleted inserted replaced
7200:744c8a5546c6 7202:2d78dc517c91
    82 end;
    82 end;
    83 
    83 
    84 procedure MaskModifier(Modifier: shortstring; var code: LongInt);
    84 procedure MaskModifier(Modifier: shortstring; var code: LongInt);
    85 var mod_ : shortstring;
    85 var mod_ : shortstring;
    86     ModifierCount, i: LongInt;
    86     ModifierCount, i: LongInt;
    87     c : char;
       
    88 begin
    87 begin
    89 if Modifier = '' then exit;
    88 if Modifier = '' then exit;
    90 ModifierCount:= 0;
    89 ModifierCount:= 0;
    91 for c in Modifier do
    90 
    92     if(c = ':') then inc(ModifierCount);
    91 for i:= 1 to Length(Modifier) do
       
    92     if(Modifier[i] = ':') then inc(ModifierCount);
    93 
    93 
    94 SplitByChar(Modifier, mod_, ':');//remove the first mod: part
    94 SplitByChar(Modifier, mod_, ':');//remove the first mod: part
    95 Modifier:= mod_;
    95 Modifier:= mod_;
    96 for i:= 0 to ModifierCount do
    96 for i:= 0 to ModifierCount do
    97     begin 
    97     begin