SRL Archive - SRL Bugs

Fix for findrockcolor


Wanted

2009-12-23 00:52:10

change that one line to this

if (TestColor - GetColor(P[A].X + 1,P[A].Y) = 1382166) then

new function

{*******************************************************************************
function FindRockColor: Integer;
By: Tarajunky, fixed by Shuttleu and again by IceFire908
Description: Autodetecs Rock (Gray) Color on Minimap
*******************************************************************************}

function FindRockColor: Integer;
var
A, L, TestColor: Integer;
P: TPointArray;
begin
Flag;
if FindMMColorsSpiralTolerance(P, 5591394, 80) then
begin
L := High(P);
for A := 0 to L do
begin
TestColor := GetColor(P[a].x,P[a].y);
if (TestColor - GetColor(P[A].X + 1,P[A].Y) = 1382166) then
begin
Result := TestColor;
srl_Warn('FindRockColor', 'RockColor = ' + IntToStr(TestColor), warn_Debug);
Exit;
end;
end;
end;
srl_Warn('FindRockColor', 'Could''t find RockColor', warn_Debug);
Result := 0;
end;

noidea

2009-12-23 01:00:19

Want to fix the others while you're at it xD ?

Wanted

2009-12-23 01:21:37

From: noidea
Want to fix the others while you're at it xD ?


Tommorw, I needed this for my rcer.. it was pretty simple once I figured out it was just the differnce between the color and its border… pretty weird idea but it works

noidea

2009-12-23 01:33:41

From: IceFire908
Tommorw, I needed this for my rcer.. it was pretty simple once I figured out it was just the differnce between the color and its border… pretty weird idea but it works


I experimented with that idea when I first started autocolouring. It doesn't work for many ;)