From: footballjds
can i just put a snippet in here about how easy auto-coloring is?
for example this auto-colors white walls of buildings, etc:
function WallColor: Integer;
var
whteClrs: TIntegerArray;
clrs: TPointArray;
i, h, cnt: integer;
whtCount: TPoint;
begin
result := -1;
if not(FindColorsTolerance(clrs, 15595512, MMX1, MMY1, MMX2, MMY2, 30)) then EXIT;
FilterPointsPie(clrs, 0, 360, 10, 70, MMCX, MMCY);
whteClrs := GetColors(clrs);
ClearSameIntegers(whteClrs);
h := high(whteClrs);
for i:= 0 to h do
begin
cnt := CountColor(whteClrs[i], MMX1, MMY1, MMX2, MMY2);
if cnt > whtCount.x then
begin
whtCount.x := cnt;
whtCount.y := whteClrs[i];
end;
end;
result := whtCount.y;
end;
It's easy for me since I don't Know how to use TPA from scratch. I would like to see tutorials for "neowb" < (noob + newb :D) as I don't it, and tutorials for "newbs" are very detailed, has explanation about each variable, each syntax detail etc.. :)
Also if someone is able to. Create tutorial for TPA (ATPA)
It should contain images from rs (easier to get things straight), and code explainded what searches what . :D
Or video tutorial would be best options (have to ask JoHoYo, though), but first would works as well.