Sir R. M8gic1an
2010-06-11 08:35:31
Function MSI_FindObjectsTPA(Var Objs: TPointArray; Width, Height: Integer;
Colors: TIntegerArray; Accuracy, Tolerance: Integer; HueMod, SatMod: Extended;
FindAllColors: Boolean;
X1, Y1, X2, Y2: Integer;
ExcludeSelf, CheckAnimation: Boolean;
BadColors: TIntegerArray; BadColorTolerance: Integer): Boolean;
Can't we just do:
Function MSI_FindObjectsTPA(Var Objs: TPointArray; Where: TBox; Obj: TMSObject): boolean;
//eg
MSI_FindObjectsTPA(TPA, MSBox, MSI_GetObject(FISHING_SPOT));
And I think these should probably be added to SRL:
function MSBox: TBox;
begin
with Result do
begin
x1 := MSX1;
y1 := MSY1;
x2 := MSX2;
y2 := MSY2;
end;
end;
function MMBox: TBox;
begin
with Result do
begin
x1 := MMX1;
y1 := MMY1;
x2 := MMX2;
y2 := MMY2;
end;
end;
function MIBox: TBox;
begin
with Result do
begin
x1 := MIX1;
y1 := MIY1;
x2 := MIX2;
y2 := MIY2;
end;
end;
function MCBox: TBox;
begin
with Result do
begin
x1 := MCX1;
y1 := MCY1;
x2 := MCX2;
y2 := MCY2;
end;
end;
ps: this ^ is a way of having a constant array or type ;)
~RM