From 9cc127914306e97ceb6867327a0a70f3de506de7 Mon Sep 17 00:00:00 2001 From: Raymond Date: Tue, 15 Jun 2010 18:38:16 +0200 Subject: [PATCH] Theoretically DTM editor should work now.. There is just some nasty bug left :(. That's making PS not compile it. --- Extensions/dtm_editor.sex | 2 +- Includes/mml.simba | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Extensions/dtm_editor.sex b/Extensions/dtm_editor.sex index 54df28d..945c9b5 100644 --- a/Extensions/dtm_editor.sex +++ b/Extensions/dtm_editor.sex @@ -609,7 +609,7 @@ begin if FindColorsTolerance(Points, getColour, 0, 0, bmpBuffer.Width - 1, bmpBuffer.Height - 1, getTolerance) then bmpOverlay.DrawTPA(Points, MarkCol); - SetImageTarget(h);} + SetImageTarget(h); UpdateBitmap(True, False); end; diff --git a/Includes/mml.simba b/Includes/mml.simba index 39c0b57..3ea328d 100644 --- a/Includes/mml.simba +++ b/Includes/mml.simba @@ -38,7 +38,7 @@ end; function FindDTMs(DTM: Integer; var p: TPointArray; xs, ys, xe, ye: Integer): Boolean; begin with Client do - result := MFinder.FindDTMs(MDTMs[DTM], p, xs, ys, xe, ye); + result := MFinder.FindDTMs(MDTMs.GetDTM(DTM), p, xs, ys, xe, ye,0); end; procedure FreeDTM(DTM: Integer); @@ -53,5 +53,15 @@ end; function AddDTM(const d: TMDTM): Integer; begin - Result := Client.MDTMs.AddDTM(d); + Result := Client.MDTMs.AddMDTM(d); +end; + +function GetDTM(const index : integer) : TMDTM; +begin + result := Client.MDTMs.GetDTM(index); +end; + +function FindColorsTolerance(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; +begin; + result := Client.MFinder.FindColorsTolerance(points,color,xs,ys,xe,ye,tolerance); end;