diff --git a/Projects/SAMufasaGUI/framefunctionlist.lfm b/Projects/SAMufasaGUI/framefunctionlist.lfm index afd316d..c61f06a 100644 --- a/Projects/SAMufasaGUI/framefunctionlist.lfm +++ b/Projects/SAMufasaGUI/framefunctionlist.lfm @@ -12,11 +12,11 @@ object FunctionListFrame: TFunctionListFrame DesignTop = 219 object FunctionList: TTreeView Left = 0 - Height = 479 - Top = 20 + Height = 483 + Top = 18 Width = 182 Align = alClient - DefaultItemHeight = 17 + DefaultItemHeight = 15 ReadOnly = True ScrollBars = ssAutoBoth TabOrder = 0 @@ -28,8 +28,8 @@ object FunctionListFrame: TFunctionListFrame end object editSearchList: TEdit Left = 0 - Height = 23 - Top = 499 + Height = 21 + Top = 501 Width = 182 Align = alBottom OnChange = editSearchListChange @@ -37,7 +37,7 @@ object FunctionListFrame: TFunctionListFrame end object FunctionListLabel: TLabel Left = 2 - Height = 16 + Height = 14 Top = 2 Width = 178 Align = alTop diff --git a/Projects/SAMufasaGUI/framefunctionlist.pas b/Projects/SAMufasaGUI/framefunctionlist.pas index a0fb571..a792301 100644 --- a/Projects/SAMufasaGUI/framefunctionlist.pas +++ b/Projects/SAMufasaGUI/framefunctionlist.pas @@ -474,20 +474,21 @@ procedure TFillThread.execute; if procs = nil then exit; for i := 0 to Procs.Count - 1 do - if (Procs[i] is TciProcedureDeclaration) then + if (Procs[i] <> nil) and (Procs[i] is TciProcedureDeclaration) then with Procs[i] as TciProcedureDeclaration do - begin - tmpNode := FunctionList^.Items.AddChild(Node,name.ShortText); - tmpNode.Data := GetMem(SizeOf(TMethodInfo)); - FillChar(PMethodInfo(tmpNode.Data)^,SizeOf(TMethodInfo),0); - with PMethodInfo(tmpNode.Data)^ do + if name <> nil then begin - MethodStr := strnew(Pchar(CleanDeclaration)); - Filename:= strnew(pchar(path)); - BeginPos:= name.StartPos ; - EndPos := name.StartPos + Length(TrimRight(name.RawText)); + tmpNode := FunctionList^.Items.AddChild(Node,name.ShortText); + tmpNode.Data := GetMem(SizeOf(TMethodInfo)); + FillChar(PMethodInfo(tmpNode.Data)^,SizeOf(TMethodInfo),0); + with PMethodInfo(tmpNode.Data)^ do + begin + MethodStr := strnew(Pchar(CleanDeclaration)); + Filename:= strnew(pchar(path)); + BeginPos:= name.StartPos ; + EndPos := name.StartPos + Length(TrimRight(name.RawText)); + end; end; - end; end; procedure AddIncludes(ParentNode : TTreeNode; Include : TCodeInsight); diff --git a/Units/MMLAddon/mmlpsthread.pas b/Units/MMLAddon/mmlpsthread.pas index 8382318..247cc08 100644 --- a/Units/MMLAddon/mmlpsthread.pas +++ b/Units/MMLAddon/mmlpsthread.pas @@ -675,7 +675,7 @@ begin RegisterMethod('procedure Contrast(TargetBitmap : TMufasaBitmap; co : Extended);'); RegisterMethod('procedure Invert(TargetBitmap : TMufasaBitmap);'); RegisterMethod('procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);'); - RegisterMethod('function Copy: TMufasaBitmap;'); + RegisterMethod('function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap;'); RegisterMethod('function ToString : string;'); RegisterMethod('function CreateTMask : TMask;'); RegisterMethod('constructor create'); @@ -742,6 +742,12 @@ begin; CurrThread.Client.MBitmaps.FreeBMP(Self.Index); end; +function TMufasaBitmapCopy(Self : TMufasaBitmap;const xs,ys,xe,ye : integer) : TMufasaBitmap; +begin + result := Self.Copy(xs,ys,xe,ye); + CurrThread.Client.MBitmaps.AddBMP(result); +end; + type TRegExp = class(SynRegExpr.TRegExpr); procedure MBmp_Index_r(self : TMufasaBitmap; var Index : integer);begin; Index := self.Index; end; @@ -819,7 +825,7 @@ begin; RegisterMethod(@TMufasaBitmap.Contrast,'CONTRAST'); RegisterMethod(@TMufasaBitmap.Invert,'INVERT'); RegisterMethod(@TMufasaBitmap.Posterize,'POSTERIZE'); - RegisterMethod(@TMufasaBitmap.Copy, 'COPY'); + RegisterMethod(@TMufasaBitmapCopy, 'COPY'); RegisterMethod(@TMufasaBitmap.ToString,'TOSTRING'); RegisterMethod(@TMufasaBitmap.CreateTMask,'CREATETMASK'); RegisterPropertyHelper(@MBmp_TransColorSet_r,nil,'TRANSPARENTCOLORSET'); diff --git a/Units/MMLCore/bitmaps.pas b/Units/MMLCore/bitmaps.pas index 52da0b3..53cd624 100644 --- a/Units/MMLCore/bitmaps.pas +++ b/Units/MMLCore/bitmaps.pas @@ -82,8 +82,8 @@ type procedure Invert;overload; procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);overload; procedure Posterize(Po : integer);overload; - function Copy: TMufasaBitmap;overload; function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap; overload; + function Copy: TMufasaBitmap;overload; function ToTBitmap: TBitmap; function ToString : string; procedure LoadFromTBitmap(bmp: TBitmap);