FindRoadColor does not work when used in Seers bank.
It instead returns the color of the floor.
Now I have tried to create my own function specific for Seers bank but I cannot seem to get it right.
I have tried bitmaps, color comparison, dtms, ddtms none of which seem to hold out in the long run.
Does anyone have any suggestions for how I could get this to work?
Edit: Using my newly found interest in TPAs I have created a function specific for Seers Bank...
Here it is for anyone wondering... and also for me to show off
SCAR Code:
function MyFindRoadColor : Integer;
var
BaseC, Tol, BigArray, i, HighColor, Color : Integer;
ColorTPA : TPointArray;
ColorTPAs : T2DPointArray;
ColorPt : TPoint;
begin
BaseC := 7171445;
Tol := 20;
FindColorsPie(ColorTPA, BaseC, Tol, 85, 95, 35, MMX2-MMCX, MMX1, MMCY, MMX2, MMY2, MMCX, MMCY);
ColorTPAs := SplitTPA(ColorTPA, 3);
BigArray := 0;
HighColor := High(ColorTPAs);
WriteLn(InttoStr(HighColor));
if (HighColor > 0) then
begin
for i := 1 to HighColor do
begin
if (High(ColorTPAs[i]) > High(ColorTPAs[BigArray])) then
BigArray := i;
end;
end;
ColorPt := MiddleTPA(ColorTPAs[BigArray]);
Color := GetColor(ColorPt.x, ColorPt.y);
WriteLn('The color is ' + InttoStr(Color));
result := Color;
end;
I prolly messed up the Bounds with HighColor... if any problems come up ill edit them later.