function RUNJZ(x,y:integer):DWORD;
var ecx,eax:integer;
begin
ecx:=y;
eax:=x;
ecx:=ecx and $3ff;
ecx:=ecx shl $a; eax:= eax and $3ff;
ecx = ecx or eax;
ecx = ecx shl $5;
ecx = ecx or $b;
result:=ecx;
end;这是一个把坐标x,y转换成long的函数谁能帮忙把它反过来,把long转成x,y的数值.
如:x=50,y=95时
n=RUNJZ(x,y)
n的值为$2F864B我现在要把n的值转换成x,y的值.
var ecx,eax:integer;
begin
ecx:=y;
eax:=x;
ecx:=ecx and $3ff;
ecx:=ecx shl $a; eax:= eax and $3ff;
ecx = ecx or eax;
ecx = ecx shl $5;
ecx = ecx or $b;
result:=ecx;
end;这是一个把坐标x,y转换成long的函数谁能帮忙把它反过来,把long转成x,y的数值.
如:x=50,y=95时
n=RUNJZ(x,y)
n的值为$2F864B我现在要把n的值转换成x,y的值.
var
temp:DWORD;
begin
temp:=Value shr $5;
Result.X:=temp and $3ff;
temp:=temp shr $a;
Result.Y:=temp and $3ff;
end;
返回结果的X,Y即是。