huh26010
2006-03-05 21:13:39
(EDIT)stopped workin on it for now (EDIT)
2006-03-05 21:13:39
2006-03-05 21:19:10
2006-03-05 21:51:29
2006-03-07 21:03:55
2006-03-07 21:27:31
2006-03-10 22:40:21
2006-03-10 23:24:46
2006-03-11 00:17:29
From: huh26010
is there a command to freeze the game screen like color finder does when you color pick?
2006-03-11 00:42:15
From: huh26010
is there a command to freeze the game screen like color finder does when you color pick?
2006-03-11 07:16:45
From: masquerader
er… theres a procedure pickcolor
and then you can also copy the client to a canvas, and set that as your handle for doing stuff, but i dont think you would understand it (i barely do right now)
2006-03-11 07:51:13
2006-03-12 00:28:05
From: RenaxHe means take a screenshot and set it as the target for color/ bitmap / dtm searching procedures. Which in itself is a really good idea…
yah, just make a canvas/bmp of the screen and work on that.
function FindColorEllipse(var x, y: integer; Color, Tol, X1, Y1, X2, Y2: integer): boolean;
var
Temp: TCanvas;
Cx, Cy, H, W, ScreenBmp, TempBmp, Handle: Integer;
begin
W:= Max(X1, X2) - Min(X1, X2);
H:= Max(Y1, Y2) - Min(Y1, Y2);
Handle:= GetClientWindowHandle;
TempBmp:= BitmapFromString(W, H, '');
Temp:= GetBitmapCanvas(TempBmp);
ScreenBmp:= BitmapFromString(W, H, '');
FastDrawClear(TempBmp, -1);
CopyClientToBitmap(ScreenBmp, X1, Y1, X2, Y2);
CopyCanvas(GetBitmapCanvas(TempBmp), Temp, 0, 0, W, H, 0, 0, W, H);
Temp.Ellipse(0,0,W,H);
CopyCanvas(Temp, GetBitmapCanvas(TempBmp), 0, 0, W, H, 0, 0, W, H);
SetTransparentColor(TempBmp, 16777215);
FastDrawTransparent(0, 0, TempBmp, ScreenBmp);
SetTargetBitmap(ScreenBmp);
X:= -1;
Y:= -1;
Cx:= W div 2;
Cy:= H div 2;
if FindColorSpiralTolerance(Cx, Cy, Color, 0, 0, W, H, Tol) then
begin
X:= Cx;
Y:= Cy;
Result:= true;
end;
SetClientWindowHandle(Handle);
end;
2006-03-20 18:22:26