SRL Archive - SRL Suggestions

Symbol.scar couple thing's


NCDS

2010-07-12 14:40:35

First thing, Wouldn't this:

{*******************************************************************************
function IsPointInTPA(Point:TPoint; TPA:TPointArray): Boolean;
By: IceFire908
*******************************************************************************}
function IsPointInTPA(Point: TPoint; TPA: TPointArray): Boolean;
var
I: LongInt;
begin
for I := High(TPA) downto 0 do
if (TPA[I].X = Point.X) then
if (TPA[I].Y = Point.Y) then
begin
Result:= True;
Exit;
end;
end;
Fit better in WizzyPlugin or something?


Second, implement FindSymbolsMultiIn();

The current FindSymbolsMulti :

{*******************************************************************************
procedure FindSymbolsMulti(var aTPA: TPointArray; Symbols: TStringArray);
By: Nava2
Description: Finds multiple symbols in multiple places. Results true if at least
1 symbol is found.
*******************************************************************************}
function FindSymbolsMulti(var aTPA: TPointArray; Symbols: TStringArray): Boolean;
var
gTPA: TPointArray;
I, H: Integer;
begin
H := High(Symbols);
for I := 0 to H do
begin
if FindSymbols(gTPA, Symbols[i]) then
Result := True;
aTPA := CombineTPA(gTPA, aTPA);
end;
end;

FindSymbolsMultiIn:

function FindSymbolsMultiIn(var aTPA: TPointArray; Symbols: TStringArray; x1, y1, x2, y2: integer): Boolean;
var
gTPA: TPointArray;
I, H: Integer;
begin
H := High(Symbols);
for I := 0 to H do
begin
if FindSymbolsIn(gTPA, Symbols[i], x1, y1, x2, y2) then
Result := True;
aTPA := CombineTPA(gTPA, aTPA);
end;
end;

New FindSymbolsMulti:

function FindSymbolsMulti(var aTPA: TPointArray; Symbols: TStringArray): Boolean
begin
Result := FindSymbolsMultiIn(aTPA, Symbols, MMx1, MMy1, MMx2, MMy2);
end;

Thought's on this?

Sir R. M8gic1an

2010-07-12 14:59:42

Makes sense.

~RM

Wanted

2010-07-13 00:50:39

That is already in wizzyplugin, however there is a problem with it.

NCDS

2010-07-13 00:55:24

From: IceFire908
That is already in wizzyplugin, however there is a problem with it.


Why is it in Symbol.scar too?

Also, is there a reason for this not being committed? Just curious, I would like to know.

Coh3n

2010-07-14 00:01:33

From: NCDS
Why is it in Symbol.scar too?

Also, is there a reason for this not being committed? Just curious, I would like to know.

It has been. ;)

Wanted

2010-07-14 01:06:59

From: NCDS
Why is it in Symbol.scar too?

Also, is there a reason for this not being committed? Just curious, I would like to know.


Because there is a problem with it.

Also, this is more or less a trivial matter, but I guess it is still a good change