SRL Archive - SRL Archives

This summer... 18 of July... Double the passion... Triple the excitement... because..


n3ss3s

2007-07-18 06:36:28

FIND BUNCH OF COLORS IIIS HERE!!!
Before the time of autocoloring(or before autocoloring reached your mind)
have you ever thought about that since the essence, ground or anything has few diff colors for example 777552773, 77237774, 73375, 7795680000 and you think could you use FindColor(x, y, 777552773..77956800000, MSX1, MSY1, MSX2, MSY2) Now that is possible.. But instead of '..' you use ',' :)
Behold… FindBunchOfColors


function FindBunchOfColors(var Bx, By: Integer; StartColor, EndColor,
Bx1, By1, Bx2, By2: Integer):Boolean;
// * Finds any color from StartColor to EndColor *//
// By n3ss3s //
var I: Integer;
begin
for I := StartColor to EndColor do
begin
if(FindColor(Bx, By, I, Bx1, By1, Bx2, By2))then
begin
Result := True;
Break;
end;
end;
end;

The code is godlike but I think the idea is good.

Killerdou

2007-07-18 06:42:56

uhm… isnt that just findcolortolerance?( you use 2 colors instead of 1 which has a range)

      For A := 0 to GetArrayLength(Colors) - 1 do
begin
FindColorsSpiralTolerance(259, 144, FoundPoints2, Colors[A], MSX1, MSY1, MSX2, MSY2, 15);
AddTPointArray(FoundPoints, FoundPoints2);
end;
try to use a array of colors(this is from my object finder) for a tree you could use both wood and green that way:)

Pentti

2007-07-18 06:43:57

^Damn you beat me^ :D
You can always use FindColorTolerance… :D

n3ss3s

2007-07-18 08:42:11

Damit when I was making it I had something to say to that in mind but forgot it :D
Well, if I would've made that before FindColorTolerance I'd be a guru :D