奇迹Mu分析 - Bool地图

通过读取游戏内存,绘制角色当前地图

var
  MapBase:Cardinal = $86E9D78;

function TMain.GetMapPointByIndex(n: Cardinal): Word;
begin
  Result:=pWord(MapBase + n * 2)^;
end;

Procedure TMain.pand(x:Integer;y:Integer;id_cl:integer);
begin
   case id_cl of
     0:begin
         Img1.Canvas.Pen.Color:=clGreen;   
       end;
     1:begin
         Img1.Canvas.Pen.Color:=clYellow; 
       end;
     2:begin
         Img1.Canvas.Pen.Color:=clBlue;
       end;
     3:begin
         Img1.Canvas.Pen.Color:=clWhite;
       end;
     4:begin
         Img1.Canvas.Pen.Color:=clWhite;      
       end;
     5:begin
         Img1.Canvas.Pen.Color:=clBlue;
       end;
     6:begin
         Img1.Canvas.Pen.Color:=clLime;
       end;
      7:begin
         Img1.Canvas.Pen.Color:=clPurple;
       end;
       8:begin
         Img1.Canvas.Pen.Color:=clWhite;  
       end;
       9:begin
         Img1.Canvas.Pen.Color:=clWhite;
       end;
     12:begin
         Img1.Canvas.Pen.Color:=clWhite;
       end;
   end;
   Img1.Canvas.Pen.Width:=2;
   Img1.Canvas.MoveTo(y,x);
   Img1.Canvas.LineTo(y,x);
end;

procedure TMain.DrawMap;
var
  x,y,i:Integer;
  n:word;
begin
  i:=0;
  for x := 0 to 255 do
    begin
      for y := 0 to 255 do
        begin
          n:=GetMapPointByIndex(i);
          Inc(i);
          pand(y,x,n);
        end;
    end;
end;


需添加控件image

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值