SRL Archive - SRL Archives

FindColors SCAR 3.15b


Quickmarch

2009-05-15 18:59:13

I've seen in Overwrite.scar that there were some SCAR Divi 3.20 up functions so i thought it would be good to have this one.


{$IFNDEF SCAR320_UP}
function FindColors(var TPA: TPointArray; Color, x1, y1, x2, y2: Integer): Boolean;
begin
FindColorsTolerance(TPA, Color, x1, y1, x2, y2, 0);
Result := Length(TPA) > 0;
end;
{$ENDIF}

Rich

2009-05-15 19:02:51

I personally find this pointless.

1) Always use randomness - well nearly always
2) If you wanted no randomness, then just set it to 0 - no hardship there

Sorry,
Richard

Quickmarch

2009-05-15 19:13:22

From: R1ch
I personally find this pointless.

1) Always use randomness - well nearly always
2) If you wanted no randomness, then just set it to 0 - no hardship there

Sorry,
Richard


What are you talking about, it doesn't use randomness?

Sir R. M8gic1an

2009-05-15 19:13:32

From: R1ch
I personally find this pointless.

1) Always use randomness - well nearly always
2) If you wanted no randomness, then just set it to 0 - no hardship there

Sorry,
Richard

you totally missed the point…

~RM

Naum

2009-05-15 19:22:22

I agree to an extent, sometimes I wonder about a FindColors, it fits in with FindColor, FindColorSpiralTolerance, e.t.c.
Also you might have to ask Freddy to get the hints for the overwrites sorted out ;) if using SRL

mixster

2009-05-15 20:33:02

With a good majority sticking with Scar 3.15, it would limit the scope of the include. As none of the new functions are so ground breakingly amazing that SRL must update to them right now, sticking with 3.15 compatible functions until most users use a later version of Scar. Unless you were planning to write an in-Scar version of the function and have it use that for Scar 3.15 clients, then it would be worth doing as it gives scripters a larger range of tools to use.

senrath

2009-05-15 20:45:04

From: mixster
With a good majority sticking with Scar 3.15, it would limit the scope of the include. As none of the new functions are so ground breakingly amazing that SRL must update to them right now, sticking with 3.15 compatible functions until most users use a later version of Scar. Unless you were planning to write an in-Scar version of the function and have it use that for Scar 3.15 clients, then it would be worth doing as it gives scripters a larger range of tools to use.


Um, this is for 3.15. The $IFNDEF says if it's NOT 3.20+ then use this.

mixster

2009-05-15 20:51:05

I thought it was implied for several of the functions/procedures that were added to 3.20, ie recreate the range? If not, then there aren't really any problems except that people would have to define whether or not they were using Scar 3.15 or 3.20, unless there were a method to do this via scripting.

senrath

2009-05-15 20:52:56

SCAR 3.20 contains a predefined variable called SCAR320_UP

Quickmarch

2009-05-15 20:59:31

Yeah, i made it so if someone was to use FindColors in 3.20 it would still be compatible with 3.15. If people fully convert to 3.20 then this isn't needed.

Nava2

2009-05-18 09:52:06

Added. Thanks quickmarch.