SRL Archive - S.M.A.R.T. Tutorials

Smart Painting?


Goobs

2008-08-24 03:29:03

I've been looking around for tutorials, but haven't found one yet.

How would I go about painting on SMART's Debug Canvas?

For proggies, or awesome siggies ^.^

ProphesyOfWolf/Faelstorm

ShowerThoughts

2008-08-24 05:17:58

Take a look at Jukka's essence miner, I lost my code.

It was a long time in S.M.A.R.T But it was kinda the idea of Jukka and me To Actually use it in scripts ;)

BazzBarrett

2008-09-19 17:40:13

easy texttobitmap - look it up (press F1 in scar)
safedrawbitmap - again look it up
getdebugcanvas (returns the value of the debug canvas) cant think of anything else ;)

Death12652

2008-09-19 18:47:17

Yea Jukka had very good smart paint stuff in his essence miner but this isn't my particularly best subject because i don't use paint on smart.

TViYH

2008-10-09 16:10:37

How could you draw where the script finds a TPA?

Like, not where it just paints the text.
I want it to paint a dot or something where it finds the TPA.

Smartzkid

2008-10-09 16:45:35

thebitmap := BitmapFromString([RS dimensions], '');
FastSetPixel(thebitmap, tpa[i].x, tpa[i].y, 255);
SafeCopyCanvas(getbitmapcanvas(thebitmap), [smart canvas], [dimensions]);

Fill in the blanks and it should work

TViYH

2008-10-09 16:53:42

What would I put for [smart canvas] and [dimensions]?

Tootoot222

2008-11-01 06:41:13

if you want to copy the client to see whats going on with your script while SMART is minimized, just add:

procedure CopyClient;
var
W, H, X, Y: Integer;
begin
GetClientDimensions(W, H);
if(IsFKeyDown(12)) then
DisplayDebugImgWindow(766, 504);
SafeCopyCanvas(GetClientCanvas, GetDebugCanvas, 0, 0, W, H, 0, 0, W, H);
GetDebugCanvas.Pen.Color:= 255;
GetDebugCanvas.Brush.Color:= 255;
GetMousePos(X, Y);
GetDebugCanvas.Ellipse(X, Y, X + 4, Y + 4);
SetTimeout(2, 'CopyClient');
end;

and put in your mainloop:


LoadSMART(1, True, False);
DisplayDebugImgWindow(766, 504);
CopyClient;

bloodargon

2008-11-06 19:52:20

From: tootoot222
if you want to copy the client to see whats going on with your script while SMART is minimized, just add:

procedure CopyClient;
var
W, H, X, Y: Integer;
begin
GetClientDimensions(W, H);
if(IsFKeyDown(12)) then
DisplayDebugImgWindow(766, 504);
SafeCopyCanvas(GetClientCanvas, GetDebugCanvas, 0, 0, W, H, 0, 0, W, H);
GetDebugCanvas.Pen.Color:= 255;
GetDebugCanvas.Brush.Color:= 255;
GetMousePos(X, Y);
GetDebugCanvas.Ellipse(X, Y, X + 4, Y + 4);
SetTimeout(2, 'CopyClient');
end;

and put in your mainloop:


LoadSMART(1, True, False);
DisplayDebugImgWindow(766, 504);
CopyClient;


Isnt smart broken, and the only way to run it is to have it minimized?