View Full Version : DebugATPABounds
Bobzilla69
09-09-2010, 08:28 PM
hey,
not sure if this is the right place but yeh.
i am trying to use DebugATPABounds(); in my script but it doesnt seem to work right any more, it use to make a square box with different colours for a ATPA, but it doesnt do that anymore, well at least not in Simba.
DebugATPA(); work like it did in scar in Simba but i dont find it as good as DebugATPABounds(), is it possible to have it fixed?
thanks
edit: forgot to say what its doing, its simply putting a number in black text in the relevant area, its not easy to read.
Wanted
09-09-2010, 08:36 PM
DebugATPABounds hasn't changed in quite some time.
I'm not familiar enough with SCAR's canvases as it is, maybe someone else can take a look at this.
Bobzilla69
09-09-2010, 09:02 PM
hmmm, must just be the way Simba is written that somehow makes it handle it differently.
anyone els have any ideas or solutions it would be greatly appreciated
Bobzilla69
09-10-2010, 09:44 AM
finally got round to making a comparison of the two and there differences in case people didnt really understand what i meant.
This is what DebugATPABounds looks like when run in Scar with S.M.A.R.T
http://i213.photobucket.com/albums/cc51/ngfireball/srl/debugatpaboundsscar.jpg
This is what DebugATPABounds looks like when run in Simba with S.M.A.R.T
http://i213.photobucket.com/albums/cc51/ngfireball/srl/debugatpabounds-1.jpg
edit: sorry for bump, added larger Simba DebugATPABound image
Freddy1990
09-10-2010, 02:34 PM
If this were SCAR, I'm sure someone would tell you to just use Simba...
Bobzilla69
09-10-2010, 02:38 PM
If this were SCAR, I'm sure someone would tell you to just use Simba...
ok..... it aint a life or death situation i just found it weird that they worked differently in the two programs, it would be nice to have it working the same in both.
also if i simply use DebugTPA it works the same in both programs
Freddy1990
09-10-2010, 02:40 PM
ok..... it aint a life or death situation i just found it weird that they worked differently in the two programs, it would be nice to have it working the same in both.
also if i simply use DebugTPA it works the same in both programs
I'm not entirely sure, but while SRL uses mostly canvases for this kind of method in SCAR, it uses FastDraw functions to achieve the same thing in Simba, maybe something went wrong with the conversion there...
Bobzilla69
09-10-2010, 02:42 PM
hmmmm, interesting, thanks for the info Freddy1990, on a side note looking forward to the next Scar release.
Freddy1990
09-10-2010, 02:44 PM
hmmmm, interesting, thanks for the info Freddy1990, on a side note looking forward to the next Scar release.
I've taken a look for you, and it looks like I was right, Simba draws the boxes using the FastSetPixel function and such, though I'm not sure why it wouldn't work, while debugging SCAR's core I had an issue with canvases in SRL and I rewrote that function so it would use the same code for SCAR as it does for Simba right now and it worked fine back then.
Bobzilla69
09-10-2010, 02:52 PM
ok, so essentially its the same code, but its being interpreted differently for some reason.
is there another way to draw the boxes in Simba?
the DebugATPABounds cant be the only function that is being affected (even if it isnt that critical)
Freddy1990
09-10-2010, 02:58 PM
ok, so essentially its the same code, but its being interpreted differently for some reason.
is there another way to draw the boxes in Simba?
the DebugATPABounds cant be the only function that is being affected (even if it isnt that critical)
I'm not sure, if Simba supports canvases, you could use those like they're used for SCAR I suppose, though I'm not sure if Simba has the required routines to draw the canvas to it's debug window...
EDIT: Another solution would possibly be to move the function into a plugin and have it generate a bitmap in there, then get the bitmap from a DC inside of SCAR/Simba, it would speed up the function in the process.
Zyt3x
09-10-2010, 03:11 PM
If this were SCAR, I'm sure someone would tell you to just use Simba...Well.. yeah... of course.. SCAR 3.22 had so many bugs in it that you couldn't even open it without getting an error, so switching to Simba would erase a lot of bugs.
The newest SCAR looks fabulous though. Great job! :)
Freddy1990
09-10-2010, 03:18 PM
Well.. yeah... of course.. SCAR 3.22 had so many bugs in it that you couldn't even open it without getting an error, so switching to Simba would erase a lot of bugs.
The newest SCAR looks fabulous though. Great job! :)
Yea that's true, that's why I put so much effort into SCAR 3.25, I rewrote tons and tons of code for it to ensure as many bugs as possible were eliminated :)
But to get back on topic, as I said, it could be resolved by moving the function into a plugin, it may not be a bad idea to move all of these tpa debugging functions into WizzyPlugin, they seem to execute fairly slowly, I guess they aren't used as much in scripts, but it might be a good idea anyway, also with the plugin it will certainly let you use canvases for the Simba version on the FPC side.
Wizzup?
09-10-2010, 04:42 PM
You can use the FastDrawTPA function if you create a TPA from the bounds. It was added with all the WizzyPlugin functions to Simba.
Also, can you file a bug for this? (Preferably use SRL as project) I'm quite confident it's a coding error in the debug code rather than an error in Simba, but I'll have a look at it anyway.
Freddy1990
09-10-2010, 04:46 PM
You can use the FastDrawTPA function if you create a TPA from the bounds. Can you file a bug for this? I'm quite confident it's a coding error in the debug code rather than an error in Simba, but I'll have a look at it anyway.
I'm not quite sure what the problem could be either, DebugATPA uses pretty much the same functions, so I doubt the problem is in Simba as well, but I tested the simba code for DebugATPABounds with SCAR a while back and it worked for SCAR back then so most of the code should be correct, maybe one of the functions that's really Simba specific is called incorrectly somewhere in there.
Wanted
09-10-2010, 07:50 PM
I believe this can be coded to worked in simba, but I have no idea how. The problem can be fixed include side or simba-side. You just have to work around things.
Edit: The original version of DebugATPABounds didn't work either
{$include SRL\SRL.scar}
{************************************************* ******************************
function DebugATPABounds2(aPoints: T2DPointArray; BmpName: string): Boolean;
By: Wizzup? & lordsaturn
Description: Shows an image of the client, plotting each TPA's bounds as a box
of different colour per TPA. If a name is specified, an image
will be saved.
************************************************** *****************************}
function DebugATPABounds2(aPoints: T2DPointArray; BmpName: string): Boolean;
Var
Width, Height, ClientBMP, I, L, Col, x2, y2, h, hh : Integer;
ClientBox : tbox;
Box : tbox;
p: TPointArray;
Colours: TIntegerArray;
Begin
Try
begin
h := High(aPoints);
for i := 0 to h do
begin
clientbox := GetTPABounds(APoints[i]);
x2 := max(x2, clientbox.x2);
y2 := max(y2, clientbox.y2);
end;
width := x2 + 5;
height := y2 + 5;
DisplayDebugImgWindow(Width, Height);
ClientBMP := BitmapFromString(Width, Height, '');
CopyClientToBitmap(ClientBMP, 0, 0, width, height)
For I := 0 To h Do
Begin
Colours := [clRed, clBlue, clBlack, clGreen, clYellow];
col := Colours[Random(Length(Colours))];
box := GetTPABounds(APoints[i]);
box.x1 := box.x1 - 3;
box.y1 := box.y1 - 3;
box.x2 := box.x2 + 3;
box.y2 := box.y2 + 3;
p := LoadTextTPA(IntToStr(i), UpChars, hh);
hh := High(p);
for L := 0 to hh do
FastSetPixel(ClientBmp, p[L].x + box.x1 + 3, p[L].y + box.y1 + 3, col);
//For L := box.x1 To box.x2 Do
for L := 0 to box.x2- box.x1 do
begin
FastSetPixel(ClientBMP, L, box.y1 - box.y1, Col);
FastSetPixel(ClientBMP, L, box.y2 - box.y1, Col);
end;
//For L := box.y1 To box.y2 Do
for L := 0 to box.y2- box.y1 do
begin
FastSetPixel(ClientBMP, box.x1 - box.x1, L, Col);
FastSetPixel(ClientBMP, box.x2 - box.x1, L, Col);
end;
End;
DisplayDebugImgWindow(Width, Height);
{$ifdef Simba}
DrawBitmapDebugImg(ClientBMP);
{$else}
SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
{$endif}
If BmpName <> '' Then
SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
FreeBitmap(ClientBMP);
End;
Except
FreeBitmap(ClientBMP);
Writeln('Error in DebugATPABounds');
End;
Result := True;
End;
var
TPA: TPointArray;
ATPA: T2DPointArray;
begin
SetUpSRL;
TPA := TPAFromBox(IntToBox(0, 0, 500, 500));
ATPA := TPAToATPAEx(TPA, 10, 10);
DebugATPABounds2(ATPA, '');
end.
mastaraymond
09-10-2010, 10:48 PM
Fixed it.. (It worked when I created it, no doubt)
Bonfield
09-10-2010, 11:44 PM
I know it works if you set a name for the image to be saved to
Just wondering how you fixed it ray?
Wanted
09-11-2010, 06:00 AM
Fixed it.. (It worked when I created it, no doubt)
What caused it to break? I tried the original code and it didn't work either :confused:
mastaraymond
09-11-2010, 11:01 AM
What caused it to break? I tried the original code and it didn't work either :confused:
procedure DebugATPABounds(aPoints: array Of TPointArray);
var
Width, Height, ClientBMP, I: Integer;
B: TBox;
BoxColors : Array Of Integer;
SelColor: Integer;
{$IFDEF SIMBA}
x,y : integer;
BMP : Integer;
{$ENDIF}
begin
GetClientDimensions(width,height);
DisplayDebugImgWindow(Width, Height);
BoxColors := [clRed, clBlue, clBlack, clGreen, clYellow];
{$IFDEF Simba}
ClientBMP := BitmapFromClient(0,0,width-1,height-1);
{$ELSE}
ClientBMP := BitmapFromString(Width, Height, '');
CopyClientToBitmap(ClientBMP, 0, 0, width, height);
SafeDrawBitmap(ClientBmp, GetDebugCanvas, 0, 0);
GetDebugCanvas.Font.Style := [fsBold];
GetDebugCanvas.Brush.Style := bsClear;
{$ENDIF}
for i:= 0 to high(aPoints) do
begin
SelColor := BoxColors[Random(length(Boxcolors))];
B := GetTPABounds(aPoints[i]);
{$IFDEF Simba}
for x := B.X1 to B.X2 do
begin
FastSetPixel(ClientBMP,x,B.y1,SelColor);
FastSetPixel(ClientBMP,x,B.y2,SelColor);
end;
for y := B.y1 to B.y2 do
begin
FastSetPixel(ClientBMP,B.X1,y,SelColor);
FastSetPixel(ClientBMP,B.X2,y,SelColor);
end;
BMP := BitmapFromText(inttostr(i),StatChars);
FastReplaceColor(bmp,clblack,clyellow);
FastReplaceColor(bmp,clwhite,clblack);
SetTransparentColor(bmp,clYellow);
FastDrawTransparent(B.x1 + 2,b.y1 + 2,bmp,clientbmp);
FreeBitmap(BMP);
{$ELSE}
GetDebugCanvas.Pen.Color := SelColor;
GetDebugCanvas.Font.Color := SelColor;
GetDebugCanvas.Rectangle(B.x1,B.y1,B.x2,B.y2);
GetDebugCanvas.TextOut(B.x1,B.y1,inttostr(i));
{$ENDIF}
end;
{$IFDEF Simba}
DrawBitmapDebugImg(clientBMP);
{$ENDIF}
FreeBitmap(ClientBmp);
end;
The original code rev 433.. Works, no?
Wizzup?
09-11-2010, 11:07 AM
What caused it to break? I tried the original code and it didn't work either :confused:
I'm pretty sure there has been no change in Simba itself. (If there was, you could have seen it in the source)
Log for Debug:
commit ca85febf21c627917dce86a80af21599e0b3545b
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Fri Sep 10 22:47:53 2010 +0000
Fixed DebugATPABounds bug in Simba
git-svn-id: http://villavu.com/repositories/srl-opendev@605 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 332d020d768b7e02e565ce1c76395f3b947b1168
Author: Coh3n <Coh3n@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Mon Jun 21 01:25:40 2010 +0000
- Fixed compiling issues in Debug.scar (2 forgotten semicolons)
git-svn-id: http://villavu.com/repositories/srl-opendev@540 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 1bf4059a57cca75485d1ec0298ebea20490fb523
Author: IceFire908 <IceFire908@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Jun 20 18:33:43 2010 +0000
DebugATPABounds fix simba portion by Nava2
git-svn-id: http://villavu.com/repositories/srl-opendev@538 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 559f1150146b84398e1fd311badcc06cdd1be36b
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Wed May 12 13:23:18 2010 +0000
Lamp solves perfectly, just needs to slow down a bit :). + Unused variable.
git-svn-id: http://villavu.com/repositories/srl-opendev@489 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 2371149674e597d845abbe006c0c30aeca563999
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat May 8 22:57:08 2010 +0000
Added ReadLn and edited the debugging methods a bit..
git-svn-id: http://villavu.com/repositories/srl-opendev@470 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 63ab06c9d8748e7041bb1e0e7dc8181b616c65c7
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Apr 11 19:20:20 2010 +0000
Added some simba stuff :).
git-svn-id: http://villavu.com/repositories/srl-opendev@433 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 7f0c4ca3cd09b7fd8e8beb817c0622a856e48240
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Mar 27 23:01:39 2010 +0000
Added other standard fixes, by Dgby714
git-svn-id: http://villavu.com/repositories/srl-opendev@423 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 9fe4a1668a709be4ed6a11b3709187aed60c9b42
Author: IceFire908 <IceFire908@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Mon Mar 22 02:25:14 2010 +0000
Made RandomID multi possible now, Fixed Forester, fixed Drag Item, cleaned up some DebugATPABounds mess lol. Rev 420.. epic pwnage
git-svn-id: http://villavu.com/repositories/srl-opendev@420 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit cbe44f5e395a4d133fd76c8695203f43da050e58
Author: IceFire908 <IceFire908@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Mar 21 19:31:11 2010 +0000
LevelUp fix, Hopefully Arnav fix. Inventory standards fix, DeBugATPABounds fix
git-svn-id: http://villavu.com/repositories/srl-opendev@419 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit f0246e846800770dd49e5a3fa783cef1b13c9253
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Wed Mar 3 15:55:13 2010 +0000
Fixed issues where it would search outside the client.
git-svn-id: http://villavu.com/repositories/srl-opendev@403 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 8e6e2b24ad9b5683a220db84cbd2afd01d9de181
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Feb 6 18:22:39 2010 +0000
More Simba changes.
git-svn-id: http://villavu.com/repositories/srl-opendev@371 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit e0adaf68711dd9d27b499b90bff018c43433d822
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Wed Dec 30 22:13:41 2009 +0000
Loads of shit fixed and updated.
Worked with some small things, making the Color functions work in Color.scar.
Removed some compiling errors in SmartColors.scar.
Changed something in Debug.scar, to be honest I have no idea what it was.
git-svn-id: http://villavu.com/repositories/srl-opendev@329 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit d066656c926eb4d18aecca7ae91e32dc1447eb91
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Nov 29 01:01:02 2009 +0000
Fixed small things that really made no sense..
git-svn-id: http://villavu.com/repositories/srl-opendev@291 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 74c05a059dd96e5fd21f37d865f85b4cf360fef2
Author: EvilChicken! <EvilChicken!@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Oct 17 00:55:15 2009 +0000
Fixed.
God, I can't do a single commit correctly these days.
Sorry, guys.
git-svn-id: http://villavu.com/repositories/srl-opendev@271 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 0345fa816109ed3e0608d1fc0f53e9740c7c0cd2
Author: EvilChicken! <EvilChicken!@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Fri Oct 16 09:34:16 2009 +0000
Small changes, mostly TakeScreenShotEx.
git-svn-id: http://villavu.com/repositories/srl-opendev@269 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 232bf1ddc4d263e6f1e18911a98c2106e351b196
Author: ZephyrsFury <ZephyrsFury@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Thu Sep 10 18:46:55 2009 +0000
Stuff.
git-svn-id: http://villavu.com/repositories/srl-opendev@235 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit b6fbf521502ebf7b444d8563e3dd957d57aedc30
Author: ZephyrsFury <ZephyrsFury@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Jun 20 20:47:34 2009 +0000
Minor edits. Added DebugBitmap to Debug.scar.
git-svn-id: http://villavu.com/repositories/srl-opendev@88 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 8519792392734a00c08d417b0832a4fca8ab5e70
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun May 31 02:20:52 2009 +0000
Added Fighting fixes.
Changed TakeScreenshot
git-svn-id: http://villavu.com/repositories/srl-opendev@34 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 947febf8aecb1f9a1b0ef87d286ffc5cc4214c5f
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat May 23 14:23:17 2009 +0000
Exiting Mordaut should be fixed.. Not sure.
Close Window, needs some testing..
I broked DebugATPABounds, its in the text writing, someone look at it please.
git-svn-id: http://villavu.com/repositories/srl-opendev@11 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit b286550bc6df862a3c76f00992c1b3aa86f8625f
Author: Wizzup? <Wizzup?@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Mon May 18 20:19:48 2009 +0000
Recommit.
git-svn-id: http://villavu.com/repositories/srl-opendev@1 6aa993dd-eb45-4ab4-881a-589510b4aab8
Bobzilla69
09-11-2010, 11:18 AM
Fixed it.. (It worked when I created it, no doubt)
i can confirm it now works for me, both in scar (wasnt broken there) and in Simba.
thanks alot for the fix
Wanted
09-12-2010, 06:00 AM
procedure DebugATPABounds(aPoints: array Of TPointArray);
var
Width, Height, ClientBMP, I: Integer;
B: TBox;
BoxColors : Array Of Integer;
SelColor: Integer;
{$IFDEF SIMBA}
x,y : integer;
BMP : Integer;
{$ENDIF}
begin
GetClientDimensions(width,height);
DisplayDebugImgWindow(Width, Height);
BoxColors := [clRed, clBlue, clBlack, clGreen, clYellow];
{$IFDEF Simba}
ClientBMP := BitmapFromClient(0,0,width-1,height-1);
{$ELSE}
ClientBMP := BitmapFromString(Width, Height, '');
CopyClientToBitmap(ClientBMP, 0, 0, width, height);
SafeDrawBitmap(ClientBmp, GetDebugCanvas, 0, 0);
GetDebugCanvas.Font.Style := [fsBold];
GetDebugCanvas.Brush.Style := bsClear;
{$ENDIF}
for i:= 0 to high(aPoints) do
begin
SelColor := BoxColors[Random(length(Boxcolors))];
B := GetTPABounds(aPoints[i]);
{$IFDEF Simba}
for x := B.X1 to B.X2 do
begin
FastSetPixel(ClientBMP,x,B.y1,SelColor);
FastSetPixel(ClientBMP,x,B.y2,SelColor);
end;
for y := B.y1 to B.y2 do
begin
FastSetPixel(ClientBMP,B.X1,y,SelColor);
FastSetPixel(ClientBMP,B.X2,y,SelColor);
end;
BMP := BitmapFromText(inttostr(i),StatChars);
FastReplaceColor(bmp,clblack,clyellow);
FastReplaceColor(bmp,clwhite,clblack);
SetTransparentColor(bmp,clYellow);
FastDrawTransparent(B.x1 + 2,b.y1 + 2,bmp,clientbmp);
FreeBitmap(BMP);
{$ELSE}
GetDebugCanvas.Pen.Color := SelColor;
GetDebugCanvas.Font.Color := SelColor;
GetDebugCanvas.Rectangle(B.x1,B.y1,B.x2,B.y2);
GetDebugCanvas.TextOut(B.x1,B.y1,inttostr(i));
{$ENDIF}
end;
{$IFDEF Simba}
DrawBitmapDebugImg(clientBMP);
{$ENDIF}
FreeBitmap(ClientBmp);
end;
The original code rev 433.. Works, no?
Nope
I'm pretty sure there has been no change in Simba itself. (If there was, you could have seen it in the source)
Log for Debug:
commit ca85febf21c627917dce86a80af21599e0b3545b
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Fri Sep 10 22:47:53 2010 +0000
Fixed DebugATPABounds bug in Simba
git-svn-id: http://villavu.com/repositories/srl-opendev@605 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 332d020d768b7e02e565ce1c76395f3b947b1168
Author: Coh3n <Coh3n@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Mon Jun 21 01:25:40 2010 +0000
- Fixed compiling issues in Debug.scar (2 forgotten semicolons)
git-svn-id: http://villavu.com/repositories/srl-opendev@540 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 1bf4059a57cca75485d1ec0298ebea20490fb523
Author: IceFire908 <IceFire908@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Jun 20 18:33:43 2010 +0000
DebugATPABounds fix simba portion by Nava2
git-svn-id: http://villavu.com/repositories/srl-opendev@538 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 559f1150146b84398e1fd311badcc06cdd1be36b
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Wed May 12 13:23:18 2010 +0000
Lamp solves perfectly, just needs to slow down a bit :). + Unused variable.
git-svn-id: http://villavu.com/repositories/srl-opendev@489 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 2371149674e597d845abbe006c0c30aeca563999
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat May 8 22:57:08 2010 +0000
Added ReadLn and edited the debugging methods a bit..
git-svn-id: http://villavu.com/repositories/srl-opendev@470 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 63ab06c9d8748e7041bb1e0e7dc8181b616c65c7
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Apr 11 19:20:20 2010 +0000
Added some simba stuff :).
git-svn-id: http://villavu.com/repositories/srl-opendev@433 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 7f0c4ca3cd09b7fd8e8beb817c0622a856e48240
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Mar 27 23:01:39 2010 +0000
Added other standard fixes, by Dgby714
git-svn-id: http://villavu.com/repositories/srl-opendev@423 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 9fe4a1668a709be4ed6a11b3709187aed60c9b42
Author: IceFire908 <IceFire908@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Mon Mar 22 02:25:14 2010 +0000
Made RandomID multi possible now, Fixed Forester, fixed Drag Item, cleaned up some DebugATPABounds mess lol. Rev 420.. epic pwnage
git-svn-id: http://villavu.com/repositories/srl-opendev@420 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit cbe44f5e395a4d133fd76c8695203f43da050e58
Author: IceFire908 <IceFire908@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Mar 21 19:31:11 2010 +0000
LevelUp fix, Hopefully Arnav fix. Inventory standards fix, DeBugATPABounds fix
git-svn-id: http://villavu.com/repositories/srl-opendev@419 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit f0246e846800770dd49e5a3fa783cef1b13c9253
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Wed Mar 3 15:55:13 2010 +0000
Fixed issues where it would search outside the client.
git-svn-id: http://villavu.com/repositories/srl-opendev@403 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 8e6e2b24ad9b5683a220db84cbd2afd01d9de181
Author: Raymond <Raymond@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Feb 6 18:22:39 2010 +0000
More Simba changes.
git-svn-id: http://villavu.com/repositories/srl-opendev@371 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit e0adaf68711dd9d27b499b90bff018c43433d822
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Wed Dec 30 22:13:41 2009 +0000
Loads of shit fixed and updated.
Worked with some small things, making the Color functions work in Color.scar.
Removed some compiling errors in SmartColors.scar.
Changed something in Debug.scar, to be honest I have no idea what it was.
git-svn-id: http://villavu.com/repositories/srl-opendev@329 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit d066656c926eb4d18aecca7ae91e32dc1447eb91
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun Nov 29 01:01:02 2009 +0000
Fixed small things that really made no sense..
git-svn-id: http://villavu.com/repositories/srl-opendev@291 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 74c05a059dd96e5fd21f37d865f85b4cf360fef2
Author: EvilChicken! <EvilChicken!@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Oct 17 00:55:15 2009 +0000
Fixed.
God, I can't do a single commit correctly these days.
Sorry, guys.
git-svn-id: http://villavu.com/repositories/srl-opendev@271 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 0345fa816109ed3e0608d1fc0f53e9740c7c0cd2
Author: EvilChicken! <EvilChicken!@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Fri Oct 16 09:34:16 2009 +0000
Small changes, mostly TakeScreenShotEx.
git-svn-id: http://villavu.com/repositories/srl-opendev@269 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 232bf1ddc4d263e6f1e18911a98c2106e351b196
Author: ZephyrsFury <ZephyrsFury@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Thu Sep 10 18:46:55 2009 +0000
Stuff.
git-svn-id: http://villavu.com/repositories/srl-opendev@235 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit b6fbf521502ebf7b444d8563e3dd957d57aedc30
Author: ZephyrsFury <ZephyrsFury@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat Jun 20 20:47:34 2009 +0000
Minor edits. Added DebugBitmap to Debug.scar.
git-svn-id: http://villavu.com/repositories/srl-opendev@88 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 8519792392734a00c08d417b0832a4fca8ab5e70
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sun May 31 02:20:52 2009 +0000
Added Fighting fixes.
Changed TakeScreenshot
git-svn-id: http://villavu.com/repositories/srl-opendev@34 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit 947febf8aecb1f9a1b0ef87d286ffc5cc4214c5f
Author: Nava2 <Nava2@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Sat May 23 14:23:17 2009 +0000
Exiting Mordaut should be fixed.. Not sure.
Close Window, needs some testing..
I broked DebugATPABounds, its in the text writing, someone look at it please.
git-svn-id: http://villavu.com/repositories/srl-opendev@11 6aa993dd-eb45-4ab4-881a-589510b4aab8
commit b286550bc6df862a3c76f00992c1b3aa86f8625f
Author: Wizzup? <Wizzup?@6aa993dd-eb45-4ab4-881a-589510b4aab8>
Date: Mon May 18 20:19:48 2009 +0000
Recommit.
git-svn-id: http://villavu.com/repositories/srl-opendev@1 6aa993dd-eb45-4ab4-881a-589510b4aab8
Maybe it never worked? I could of sworn I ran that thing in simba before.
mastaraymond
09-12-2010, 05:02 PM
Nope
{$include SRL\SRL.scar}
{************************************************* ******************************
function DebugATPABounds2(aPoints: T2DPointArray; BmpName: string): Boolean;
By: Wizzup? & lordsaturn
Description: Shows an image of the client, plotting each TPA's bounds as a box
of different colour per TPA. If a name is specified, an image
will be saved.
************************************************** *****************************}
procedure DebugATPABounds2(aPoints: array Of TPointArray);
var
Width, Height, ClientBMP, I: Integer;
B: TBox;
BoxColors : Array Of Integer;
SelColor: Integer;
{$IFDEF SIMBA}
x,y : integer;
BMP : Integer;
{$ENDIF}
begin
GetClientDimensions(width,height);
DisplayDebugImgWindow(Width, Height);
BoxColors := [clRed, clBlue, clBlack, clGreen, clYellow];
{$IFDEF Simba}
ClientBMP := BitmapFromClient(0,0,width-1,height-1);
{$ELSE}
ClientBMP := BitmapFromString(Width, Height, '');
CopyClientToBitmap(ClientBMP, 0, 0, width, height);
SafeDrawBitmap(ClientBmp, GetDebugCanvas, 0, 0);
GetDebugCanvas.Font.Style := [fsBold];
GetDebugCanvas.Brush.Style := bsClear;
{$ENDIF}
for i:= 0 to high(aPoints) do
begin
SelColor := BoxColors[Random(length(Boxcolors))];
B := GetTPABounds(aPoints[i]);
{$IFDEF Simba}
for x := B.X1 to B.X2 do
begin
FastSetPixel(ClientBMP,x,B.y1,SelColor);
FastSetPixel(ClientBMP,x,B.y2,SelColor);
end;
for y := B.y1 to B.y2 do
begin
FastSetPixel(ClientBMP,B.X1,y,SelColor);
FastSetPixel(ClientBMP,B.X2,y,SelColor);
end;
BMP := BitmapFromText(inttostr(i),StatChars);
FastReplaceColor(bmp,clblack,clyellow);
FastReplaceColor(bmp,clwhite,clblack);
SetTransparentColor(bmp,clYellow);
FastDrawTransparent(B.x1 + 2,b.y1 + 2,bmp,clientbmp);
FreeBitmap(BMP);
{$ELSE}
GetDebugCanvas.Pen.Color := SelColor;
GetDebugCanvas.Font.Color := SelColor;
GetDebugCanvas.Rectangle(B.x1,B.y1,B.x2,B.y2);
GetDebugCanvas.TextOut(B.x1,B.y1,inttostr(i));
{$ENDIF}
end;
{$IFDEF Simba}
DrawBitmapDebugImg(clientBMP);
{$ENDIF}
FreeBitmap(ClientBmp);
end;
var
TPA: TPointArray;
ATPA: T2DPointArray;
begin
SetUpSRL;
TPA := TPAFromBox(IntToBox(0, 0, 500, 500));
ATPA := TPAToATPAEx(TPA, 10, 10);
DebugATPABounds2(ATPA);
end.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.