From 8e694396141d3a7a9c6ab60f1b49893978ee4979 Mon Sep 17 00:00:00 2001 From: Raymond Date: Sat, 23 Jan 2010 17:51:04 +0000 Subject: [PATCH] (18:01:16) @BenLand100: but having the boolean variable, like i say, is borderline (18:01:45) @BenLand100: its cool and all. but it you should probably implement another constructor that is false by default (18:01:51) @BenLand100: just saying Here you go ;-). git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@454 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- trunk/Units/MMLCore/iomanager.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/Units/MMLCore/iomanager.pas b/trunk/Units/MMLCore/iomanager.pas index e822908..e6ca520 100644 --- a/trunk/Units/MMLCore/iomanager.pas +++ b/trunk/Units/MMLCore/iomanager.pas @@ -65,7 +65,7 @@ interface | Currently this uses the pointer as-is, but it might be needed to make a local copy... } TRawTarget = class(TTarget) public - constructor Create(rgb: prgb32; w,h: integer; CopyData : boolean); + constructor Create(rgb: prgb32; w,h: integer; CopyData : boolean = false); destructor Destroy; override; procedure GetTargetDimensions(var w, h: integer); override; @@ -344,8 +344,8 @@ function TIOManager_Abstract.GetColor(x,y : integer) : TColor; begin result:= im function TIOManager_Abstract.ReturnData(xs,ys,width,height: integer): TRetData; begin result:= image.ReturnData(xs,ys,width,height); end; procedure TIOManager_Abstract.FreeReturnData; begin image.freeReturnData(); end; -function TIOManager_Abstract.SetTarget(ArrPtr: PRGB32; Size: TPoint): integer; begin SetImageTarget(TRawTarget.Create(ArrPtr,Size.X,Size.Y,false)); end; -function TIOManager_Abstract.SetTarget(bmp : TMufasaBitmap) : integer; begin SetImageTarget(TRawTarget.Create(bmp.FData,bmp.width,bmp.height,false)); end; +function TIOManager_Abstract.SetTarget(ArrPtr: PRGB32; Size: TPoint): integer; begin SetImageTarget(TRawTarget.Create(ArrPtr,Size.X,Size.Y)); end; +function TIOManager_Abstract.SetTarget(bmp : TMufasaBitmap) : integer; begin SetImageTarget(TRawTarget.Create(bmp.FData,bmp.width,bmp.height)); end; function TIOManager_Abstract.SetTarget(name: string; initargs: pointer): integer; var client: TEIOS_Client; @@ -521,7 +521,7 @@ end; //***implementation*** TRawTarget -constructor TRawTarget.Create(rgb: prgb32; w,h: integer; CopyData : boolean); +constructor TRawTarget.Create(rgb: prgb32; w,h: integer; CopyData : boolean = false); begin inherited Create; self.w:= w;