Smarter Child
2011-06-19 12:53:53
Anyone got a reflection debugger that works with simba?
2011-06-19 12:53:53
2011-06-19 14:52:26
2011-06-19 22:40:23
2011-06-19 23:40:36
2011-06-20 17:51:56
2011-06-20 20:15:33
2011-06-21 08:13:46
From: YagoRefpaint is heavily outdated and I've found it to be pretty unuseable.
Check out refpaint in the reflection include
http://villavu.com/forum/showthread.php?t=60481&highlight=refpaint
2011-06-21 08:34:51
From: Smarter Child
Debug object Id's and tiles, although I do remember seeing an all in one sort of Ref debugger.
2011-06-21 08:55:58
program ReflectionDebugger;
{$DEFINE SMART}
{$i SRL/SRL.scar}
{$i SRL/SRL/Misc/paintsmart.scar}
{$i Reflection/Reflection.simba}
{$i Reflection/Core/RefPaint.simba}
var
MyTile, t : TTile;
NPCArr : TNPCArray;
PlayerArr : TPlayerArray;
ObjArr : TRSObjectArray;
X, Y, h, i : Integer;
//EDited r_drawline.
procedure Z_R_DrawLine(Clear: Boolean; TP1, TP2: TPoint; Color: TColor);
{$IFDEF SMART}
var
drawing : TBitmap;
begin
drawing := TBitmap.Create;
drawing.canvas.handle := SmartGetDebugDC;
drawing.canvas.Pen.Color := color;
if Clear then ClearRSCanvas(drawing.canvas);
if (TP1.x < 14) and (TP1.y < 14) then exit;
if (TP2.x < 14) and (TP2.y < 14) then exit;
drawing.canvas.moveto(TP1.x,TP1.y);
drawing.canvas.LineTo(TP2.x,TP2.y);
try
FreeBitmap(drawing);
except end;
{$ELSE}
begin
{$ENDIF}
end;
procedure Z_R_DrawTileEx(Tile : TTile; Height : Integer; Color : TColor; Clear : Boolean);
var
TileBox : array [0..3] of TPoint;
I : Integer;
begin
if not TileOnMS(Tile, Height) or not R_LoggedIn then
Exit;
TileBox[0] := TileToMSEx(Tile, 1.0, 0.0, Height);
TileBox[1] := TileToMSEx(Tile, 1.0, 1.0, Height);
TileBox[2] := TileToMSEx(Tile, 0.0, 1.0, Height);
TileBox[3] := TileToMSEx(Tile, 0.0, 0.0, Height);
for I := 0 to 2 do
if (TileBox[I].X < 14) and (TileBox[I].Y < 14) then Continue
else if (TileBox[I+1].X < 14) and (TileBox[I+1].Y < 14) then Continue
else z_R_DrawLine(Clear, TileBox[I], TileBox[I+1], Color);
z_R_DrawLine(Clear, TileBox[3], TileBox[0], Color);
end;
procedure Z_R_DrawTile(Tile : TTile; Color : TColor; Clear : Boolean);
begin
Z_R_DrawTileEx(Tile, 0, Color, Clear);
end;
begin
SMART_SERVER := 1;
SMART_SIGNED := True;
SetupSRL;
SetupReflection;
WriteLn('Start!');
while True do
begin
MyTile := GetMyPos;
ClearSmartCanvas;
Z_R_DrawTile(MyTile, clBlue, False);
for X := MyTile.X-6 to MyTile.X+6 do
for Y := MyTile.Y-6 to MyTile.Y+6 do
begin
if TileOnMS(Tile(X, Y), 0) then
Z_R_DrawTile(Tile(X, Y), clRed, False);
end;
Z_R_DrawTile(MyTile, clBlue, False);
NPCArr := GetNPCs('Banker');
h := high(NPCArr);
for I := 0 to h do
Z_R_DrawTile(NPCArr[I].Tile, clLime, False);
ObjArr := GetAllObjects(0);
h := high(objarr);
for i := 0 to h do
begin
Z_r_drawtile(objarr[i].tile, clpurple, false);
t := TileToMS(objarr[i].tile, 50);
SMART_DrawText(t.x, t.y, CharsNPC, tostr(objarr[i].ID), clRed);
end;
PlayerArr := GetAllPlayers;
h := high(playerarr);
for I := 0 to h do
Z_R_DrawTile(PlayerArr[I].Tile, clYellow, False);
end;
end.
2011-06-22 18:14:29
2011-06-22 18:18:55