Olly
2012-12-05 14:37:38
Here are some debug procedures for SPS.
SPS_SPS_DebugLocOnMap - This will show your current position on the SPS map your using, this is handy for seeing how accurate SPS/your map is. (this will only work with custom sps maps stored in "runescape_other")

il add more in the future…
SPS_SPS_DebugLocOnMap - This will show your current position on the SPS map your using, this is handy for seeing how accurate SPS/your map is. (this will only work with custom sps maps stored in "runescape_other")

procedure SPS_DebugLocOnMap(Area: string; Pos: TPoint);
var
bmp, i, w, h: Integer;
Pts, CPts: TPointArray;
Path: string;
begin
Path := IncludePath + 'SPS\img\runescape_other\' + Area + '.png';
if not FileExists(Path) then
begin
srl_Warn('SPS_DebugLocOnMap', '[' + Path + '] does not exist', warn_AllVersions);
Exit;
end;
ClearDebugImg;
BMP := LoadBitmap(Path);
GetBitmapSize(bmp, w, h);
DisplayDebugImgWindow(W + 5, H + 5);
TPAFromCircleWrap(Pos.X, Pos.Y, 76, CPts);
TPAFromCircleWrap(Pos.X, Pos.Y, 2, Pts);
FillEllipse(pts);
for i := 0 to high(pts) do
begin
try
FastSetPixel(bmp, pts[i].x, pts[i].y, cllime);
except
end;
end;
for i := 0 to high(Cpts) do
begin
try
FastSetPixel(bmp, Cpts[i].x, Cpts[i].y, cllime);
except
end;
end;
DrawBitmapDebugImg(bmp);
FreeBitmap(BMP);
end;
il add more in the future…