From 0a2ec3af1239e5f6443c3694da6cfc28c9beb958 Mon Sep 17 00:00:00 2001 From: Raymond Date: Wed, 19 May 2010 22:47:12 +0200 Subject: [PATCH] Added MDTM.Index + rev number --- Projects/Simba/simbaunit.pas | 2 +- Units/MMLAddon/PSInc/uPSC_mml.pas | 1 + Units/MMLAddon/PSInc/uPSR_mml.pas | 2 ++ Units/MMLCore/mufasatypes.pas | 6 +++--- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Projects/Simba/simbaunit.pas b/Projects/Simba/simbaunit.pas index 22727a4..c88123c 100644 --- a/Projects/Simba/simbaunit.pas +++ b/Projects/Simba/simbaunit.pas @@ -46,7 +46,7 @@ uses CastaliaSimplePasPar, v_AutoCompleteForm, PSDump; const - SimbaVersion = 676; + SimbaVersion = 685; type diff --git a/Units/MMLAddon/PSInc/uPSC_mml.pas b/Units/MMLAddon/PSInc/uPSC_mml.pas index 932a5a6..c8073d6 100644 --- a/Units/MMLAddon/PSInc/uPSC_mml.pas +++ b/Units/MMLAddon/PSInc/uPSC_mml.pas @@ -109,6 +109,7 @@ begin RegisterMethod('procedure MovePoint(fromIndex,toIndex : integer);'); RegisterMethod('procedure AddPoint( Point : TMDTMPoint);'); RegisterProperty('Count','Integer',iptrw); + RegisterProperty('Index','Integer',iptr); RegisterProperty('Points','TMDTMPointArray',iptr); end; end; diff --git a/Units/MMLAddon/PSInc/uPSR_mml.pas b/Units/MMLAddon/PSInc/uPSR_mml.pas index c483d3c..2df6ecb 100644 --- a/Units/MMLAddon/PSInc/uPSR_mml.pas +++ b/Units/MMLAddon/PSInc/uPSR_mml.pas @@ -61,6 +61,7 @@ procedure TRegExprExpression_R(Self: TRegExp; var T: RegExprString);begin T := S procedure TMDTMCount_W(Self: TMDTM; const T: Integer);begin Self.Count := T; end; procedure TMDTMCount_R(Self: TMDTM; var T: Integer);begin T := Self.Count; end; procedure TMDTMPoints_R(Self : TMDTM; var T : TMDTMPointArray); begin t := self.Points; end; +procedure TMDTMIndex_R(Self : TMDTM; var T : integer); begin t := self.Index; end; procedure SettingsPrefix(self : TMMLSettingsSandbox; var Prefix : String);begin; Prefix := self.Prefix; end; @@ -163,6 +164,7 @@ begin RegisterMethod(@TMDTM.AddPoint,'AddPoint'); RegisterPropertyHelper(@TMDTMCount_R,@TMDTMCount_W,'Count'); RegisterPropertyHelper(@TMDTMPoints_R,nil,'Points'); + RegisterPropertyHelper(@TMDTMIndex_r,nil,'Index'); end; end; procedure RIRegister_TMMLSettingsSandbox(cl : TPSRuntimeClassImporter); diff --git a/Units/MMLCore/mufasatypes.pas b/Units/MMLCore/mufasatypes.pas index 93f6d28..7ebc25d 100644 --- a/Units/MMLCore/mufasatypes.pas +++ b/Units/MMLCore/mufasatypes.pas @@ -103,6 +103,9 @@ type x1, y1, x2, y2: Integer; end; +const + TMDTMPointSize = 5*SizeOf(integer)+Sizeof(boolean); +type { TODO: add cts per colour/tolerance? } // TODO DTM-Not points. Not very hard really. @@ -117,9 +120,6 @@ type Asz: Area size; bp: Bad Point; } -const - TMDTMPointSize = 5*SizeOf(integer)+Sizeof(boolean); -type TMDTMPoint = record //TMufasaDTMPoint x,y,c,t,asz : integer; bp : boolean;