Skip to content

Commit 9cc1279

Browse files
RaymondRaymond
Raymond
authored and
Raymond
committed
Theoretically DTM editor should work now.. There is just some nasty bug left :(. That's making PS not compile it.
1 parent c558f56 commit 9cc1279

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Extensions/dtm_editor.sex

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ begin
609609
if FindColorsTolerance(Points, getColour, 0, 0, bmpBuffer.Width - 1, bmpBuffer.Height - 1, getTolerance) then
610610
bmpOverlay.DrawTPA(Points, MarkCol);
611611

612-
SetImageTarget(h);}
612+
SetImageTarget(h);
613613
UpdateBitmap(True, False);
614614
end;
615615

Includes/mml.simba

+12-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ end;
3838
function FindDTMs(DTM: Integer; var p: TPointArray; xs, ys, xe, ye: Integer): Boolean;
3939
begin
4040
with Client do
41-
result := MFinder.FindDTMs(MDTMs[DTM], p, xs, ys, xe, ye);
41+
result := MFinder.FindDTMs(MDTMs.GetDTM(DTM), p, xs, ys, xe, ye,0);
4242
end;
4343

4444
procedure FreeDTM(DTM: Integer);
@@ -53,5 +53,15 @@ end;
5353

5454
function AddDTM(const d: TMDTM): Integer;
5555
begin
56-
Result := Client.MDTMs.AddDTM(d);
56+
Result := Client.MDTMs.AddMDTM(d);
57+
end;
58+
59+
function GetDTM(const index : integer) : TMDTM;
60+
begin
61+
result := Client.MDTMs.GetDTM(index);
62+
end;
63+
64+
function FindColorsTolerance(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean;
65+
begin;
66+
result := Client.MFinder.FindColorsTolerance(points,color,xs,ys,xe,ye,tolerance);
5767
end;

0 commit comments

Comments
 (0)