Sir; I am Lost >.<
Code:
program DebugMyPos;
{$I OSRWalker/Walker.simba}
var
RSW:TRSWalker;
procedure TRSWalker.DebugPos();
var
TPA:TPointArray;
BMP:Integer;
W,H,_:Int32;
loc,glob:TPoint;
begin
loc := self.finder.GetLocalPos(True); //find local pos
self.UpdateGlobalStart(loc); //find a piece of the local map in the provided world map
glob.x := loc.x + self.global.x; //offset
glob.y := loc.y + self.global.y;
//when loading a new chunk there is chance it will fail at first attempet
//so just ignore it.. and it will fix it self next call.. simple as that.
if PointInBox(loc,TBox([70,70,440,440])) then
begin
BMP := CreateBitmap(0,0);
DrawMatrixBitmap(BMP,self.localMap);
GetBitmapSize(BMP,W,H);
DrawTPABitmap(BMP, TPAFromLine(loc.x-69,loc.y,loc.x+69,loc.y), $00FF00);
DrawTPABitmap(BMP, TPAFromLine(loc.x,loc.y-69,loc.x,loc.y+69), $00FF00);
DrawTPABitmap(BMP, TPAFromCircle(loc.x,loc.y,69), $0022FF);
TPA := TPAFromText('Global Pos: '+ToString(glob), 'SmallChars07',_,_);
OffsetTPA(TPA,Point(55,35));
DrawTPABitmap(BMP, TPA, $00FF00);
DisplayDebugImgWindow(W,H);
DrawBitmapDebugImg(BMP);
FreeBitmap(BMP);
end;
end;
procedure OnTerminate();
begin RSW.Free(); end;
var
loc:TPoint;
t:UInt32;
begin
RSW.Init('world.png', w_getClientPID()); //big map, takes a while for Simba to load it.
AddOnTerminate('OnTerminate');
//RSW.anyAngle := True;
while 1 do
RSW.DebugPos();
end;
I simply trying to use the debug position posted.. many months ago i didnt have this trouble....
I am completely lost. i have tried every version you have posted
Thank you in advanced
Ben