hedgewars/uWorld.pas
changeset 5855 74c621e12baa
parent 5852 fe010d3a4330
child 5856 ed97138dc414
equal deleted inserted replaced
5854:2f52e422ce9e 5855:74c621e12baa
  1313 end;
  1313 end;
  1314 
  1314 
  1315 procedure ShakeCamera(amount: LongWord);
  1315 procedure ShakeCamera(amount: LongWord);
  1316 begin
  1316 begin
  1317     if isCursorVisible then exit;
  1317     if isCursorVisible then exit;
  1318     amount:= Max(1, amount);
  1318     amount:= Max(1, round(amount*zoom/2));
  1319     //WorldDx:= WorldDx - amount + LongInt(getRandom(1 + amount * 2));
  1319     WorldDx:= WorldDx - amount + LongInt(random(1 + amount * 2));
  1320     //WorldDy:= WorldDy - amount + LongInt(getRandom(1 + amount * 2));
  1320     WorldDy:= WorldDy - amount + LongInt(random(1 + amount * 2));
  1321     CursorPoint.X:= CursorPoint.X - amount + LongInt(getRandom(1 + amount * 2));
  1321     //CursorPoint.X:= CursorPoint.X - amount + LongInt(random(1 + amount * 2));
  1322     CursorPoint.Y:= CursorPoint.Y - amount + LongInt(getRandom(1 + amount * 2))
  1322     //CursorPoint.Y:= CursorPoint.Y - amount + LongInt(random(1 + amount * 2))
  1323 end;
  1323 end;
  1324 
  1324 
  1325 
  1325 
  1326 procedure onFocusStateChanged;
  1326 procedure onFocusStateChanged;
  1327 begin
  1327 begin