From: ggzz
I currently use this to create SPS map Snippets without blurs.. U can try it and modify it so that it does the chatbox instead.. It won't be that hard.. Just some math and knowledge of TPA's and ur good to go.
program SPS_MapMaker;
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
Procedure GetMinimap(Name: String);
var
TPA, Draw: TPointArray;
TIA: TIntegerArray;
I, BMP: Integer;
begin
BMP:= CreateBitmap(MMX2 - MMX1 + 1, MMY2 - MMY1 + 1);
TPA:= TPAFromBox(MMBox);
FilterPointsPie(TPA, 0.0, 360.0, 0.0, 75.0, MMCX, MMCY);
TIA:= GetColors(TPA);
TPA:= TPAFromBox(IntToBox(0, 0, MMX2 - MMX1, MMY2 - MMY1));
DrawTPABitmap(BMP, TPA, 16777215);
FilterPointsPie(TPA, 0.0, 360.0, 0.0, 75.0, (MMX2 - MMX1)/2, (MMY2 - MMY1)/2);
For I:= 0 To High(TPA) do
begin
SetLength(DRAW, 1);
Draw[0]:= TPA[I];
DrawTPABitmap(BMP, Draw, TIA[I]);
end;
DebugBitmap(BMP);
SaveBitmap(BMP, 'C:/Users/Brandon/Desktop/' + Name + '.bmp');
FreeBitmap(BMP);
end;
begin
SetupSRL;
GetMinimap('Testing');
end.
Great idea, im working on it! Thanks! :D
EDIT: I managed to get it work, but it still wont draw the things what I painted on SMART. :(
This DebugImgForm looks cool.
procedure MakeScreenShotDebug(const FilePath : String);
var
fileName : String;
Year, Month, Day : Word;
TPA, Draw: TPointArray;
TIA: TIntegerArray;
BMP, W, H, i: Integer;
begin
GetClientDimensions(W, H);
BMP:= CreateBitmap(W, H);
TPA:= TPAFromBox(PointToBox(Point(0,0),Point(W-1,H-1)));
TIA:= GetColors(TPA);
For I:= 0 To High(TPA) do
begin
SetLength(DRAW, 1);
Draw[0]:= TPA[I];
DrawTPABitmap(BMP, Draw, TIA[I]);
end;
DebugBitmap(BMP);
if not DirectoryExists(FilePath) then
CreateDirectory(FilePath);
DecodeDate(Date,Year,Month,Day);
i := 0;
repeat
i := i+1;
fileName := ToStr(Year)+'-'+ToStr(Month)+'-'+ToStr(Day)+' ('+IntToStr(i)+')';
until not FileExists(FilePath+FileName+'.bmp')
SaveBitmap(BMP,FilePath+FileName+'.bmp');
end;