You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GetUrlScript.txt 1.7 KiB

54 年之前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. var res:string;
  2. i:byte;
  3. osX,osY,prX,prY:integer;
  4. begin
  5. res:='t';
  6. osX:=round(intpower(2,GetZ-1)) div 2;
  7. osY:=round(intpower(2,GetZ-1)) div 2;
  8. prX:=osX; prY:=osY;
  9. for i:=2 to GetZ do
  10. begin
  11. prX:=prX div 2;
  12. prY:=prY div 2;
  13. if GetX<osX
  14. then begin
  15. osX:=osX-prX;
  16. if GetY<osY then begin
  17. osY:=osY-prY;
  18. res:=res+'q';
  19. end
  20. else begin
  21. osY:=osY+prY;
  22. res:=res+'t';
  23. end;
  24. end
  25. else begin
  26. osX:=osX+prX;
  27. if Gety<osy then begin
  28. osY:=osY-prY;
  29. res:=res+'r';
  30. end
  31. else begin
  32. osY:=osY+prY;
  33. res:=res+'s';
  34. end;
  35. end;
  36. end;
  37. { if GetY <7 then insert('10',GetURLBase,13) else insert('8',GetURLBase,13);}
  38. case GetZ of
  39. 5: ResultURL:=GetURLBase+res+'/'+res+'.png';
  40. 5: ResultURL:=GetURLBase+res+'/'+res+'.png';
  41. 7: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  42. 8: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  43. 9: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  44. 10: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  45. 11: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  46. 12: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  47. 13: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  48. 14: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png';
  49. else
  50. ResultURL:=GetURLBase+res+'.png';
  51. end
  52. end.