hedgewars/uScript.pas
changeset 12460 2660611f8b22
parent 12459 a675a94b5cc1
child 12462 19e7838bedad
equal deleted inserted replaced
12459:a675a94b5cc1 12460:2660611f8b22
  3009                 begin
  3009                 begin
  3010                     if (lastChar = '-') and (mybuf[i] = '-') then
  3010                     if (lastChar = '-') and (mybuf[i] = '-') then
  3011                         inComment := true
  3011                         inComment := true
  3012                     // gonna add any non-magic whitespace and skip - just to make comment avoidance easier
  3012                     // gonna add any non-magic whitespace and skip - just to make comment avoidance easier
  3013                     else if not inComment and (byte(mybuf[i]) > $20) and (byte(mybuf[i]) < $7F) and (mybuf[i]<>'-') then
  3013                     else if not inComment and (byte(mybuf[i]) > $20) and (byte(mybuf[i]) < $7F) and (mybuf[i]<>'-') then
  3014                        AddRandomness(byte(mybuf[i]));
  3014                        CheckSum := CheckSum xor (byte(mybuf[i]) shl (i mod 4));
  3015                     lastChar := mybuf[i];
  3015                     lastChar := mybuf[i];
  3016                     if inComment and ((byte(mybuf[i]) = $0D) or (byte(mybuf[i]) = $0A)) then
  3016                     if (byte(mybuf[i]) = $0D) or (byte(mybuf[i]) = $0A) then
  3017                         inComment := false 
  3017                         inComment := false 
  3018                 end;
  3018                 end;
  3019         end;
  3019         end;
  3020     ScriptReader:= mybuf
  3020     ScriptReader:= mybuf
  3021 end;
  3021 end;