From 164690e28af872950d8136b53453df7984189449 Mon Sep 17 00:00:00 2001 From: zueuk Date: Mon, 20 Apr 2009 07:48:06 +0000 Subject: [PATCH] added builtin variation counter --- 2.10/Source/XFormMan.pas | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/2.10/Source/XFormMan.pas b/2.10/Source/XFormMan.pas index 3ffb4de..93abdb6 100644 --- a/2.10/Source/XFormMan.pas +++ b/2.10/Source/XFormMan.pas @@ -9,7 +9,8 @@ const NRLOCVAR = 30; var - NumBuiltinVars: integer; + NumBuiltinVariations: integer; + NumBuiltinVariables: integer; function NrVar: integer; function Varnames(const index: integer): String; @@ -92,11 +93,19 @@ end; procedure RegisterVariation(Variation: TVariationLoader); var i: integer; + newvars: integer; begin VariationList.Add(Variation); - for i := 0 to Variation.GetNrVariables - 1 do - VariableNames.Add(Variation.GetVariableNameAt(i)) + newvars := Variation.GetNrVariables; + if newvars > 0 then begin + Variation.firstVariableIndex := VariableNames.Count; + + for i := 0 to newvars-1 do + VariableNames.Add(Variation.GetVariableNameAt(i)); + end + else + Variation.firstVariableIndex := -1; end; ///////////////////////////////////////////////////////////////////////////////