Janilabo

Untitled

Oct 4th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.71 KB | None | 0 0
  1. function FindBitmaps(var x, y: Integer; bmps: array of TSCARBitmap; XS, YS, XE, YE: Integer): Boolean;
  2. var
  3.   h, i: Integer;
  4. begin
  5.   h := High(bmps);
  6.   Result := (h > -1);
  7.   for i := 0 to h do
  8.     if FindBitmap(x, y, bmps[i], XS, YS, XE, YE) then
  9.       Exit;
  10.   Result := False;
  11. end;
  12.  
  13. var
  14.   bitmaps: array of TSCARBitmap;
  15.   x, y: Integer;              
  16.  
  17. begin
  18.   SetLength(bitmaps, 2);
  19.   bitmaps[0] := TSCARBitmap.Create('deNrjZuBg+D8KwAAAODQHGw=='); // full white...
  20.   bitmaps[1] := TSCARBitmap.Create('deNpjZmBiuD3BigEM/oMBkAsAR9oJSg=='); // random pixels...
  21.   if FindBitmaps(x, y, bitmaps, 0, 0, 1199, 799) then
  22.     WriteLn('Found some bitmap from bitmaps at ' + IntToStr(x) + ', ' + IntToStr(y));
  23. end.
Advertisement
Add Comment
Please, Sign In to add comment