25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

GetUrlScript.txt 3.1 KiB

54 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. var a:array[0..35] of char;
  2. max:array[0..20] of byte;
  3. x1,x2,x3:integer;
  4. y1,y2,y3:integer;
  5. px1,px2,px3:integer;
  6. py1,py2,py3:integer;
  7. ppx1,ppx2,ppx3:integer;
  8. ppy1,ppy2,ppy3:integer;
  9. dx3,dx2,dx1:integer;
  10. dy3,dy2,dy1:integer;
  11. sxy:string;
  12. strx1,strx2,strx3:string;
  13. stry1,stry2,stry3:string;
  14. begin
  15. a[0]:= '0';
  16. a[1]:= '1';
  17. a[2]:= '2';
  18. a[3]:= '3';
  19. a[4]:= '4';
  20. a[5]:= '5';
  21. a[6]:= '6';
  22. a[7]:= '7';
  23. a[8]:= '8';
  24. a[9]:= '9';
  25. a[10]:='A';
  26. a[11]:='B';
  27. a[12]:='C';
  28. a[13]:='D';
  29. a[14]:='E';
  30. a[15]:='F';
  31. a[16]:='G';
  32. a[17]:='H';
  33. a[18]:='I';
  34. a[19]:='J';
  35. a[20]:='K';
  36. a[21]:='L';
  37. a[22]:='M';
  38. a[23]:='N';
  39. a[24]:='O';
  40. a[25]:='P';
  41. a[26]:='Q';
  42. a[27]:='R';
  43. a[28]:='S';
  44. a[29]:='T';
  45. a[30]:='U';
  46. a[31]:='V';
  47. a[32]:='W';
  48. a[33]:='X';
  49. a[34]:='Y';
  50. a[35]:='Z';
  51. max[0]:= 15;
  52. max[1]:= 15;
  53. max[2]:= 15;
  54. max[3]:= 15;
  55. max[4]:= 15;
  56. max[5]:= 15;
  57. max[6]:= 16;
  58. max[7]:= 16;
  59. max[8]:= 16;
  60. max[9]:= 16;
  61. max[10]:=16;
  62. max[11]:=16;
  63. max[12]:=16;
  64. max[13]:=16;
  65. max[14]:=16;
  66. max[15]:=16;
  67. max[16]:=16;
  68. max[17]:=16;
  69. max[18]:=16;
  70. max[19]:=16;
  71. sxy:='';
  72. strx1:='';
  73. strx2:='';
  74. strx3:='';
  75. stry1:='';
  76. stry2:='';
  77. stry3:='';
  78. x3:=0;
  79. y3:=0;
  80. x2:=0;
  81. y2:=0;
  82. x1:=0;
  83. y1:=0;
  84. px3:=0;
  85. py3:=0;
  86. px2:=0;
  87. py2:=0;
  88. px1:=0;
  89. py1:=0;
  90. if (gety>=round(intpower(2,GetZ-1)/2)) and (getx >=round(intpower(2,GetZ-1)/2)) then sxy:='/A';
  91. if (gety>=round(intpower(2,GetZ-1)/2)) and (getx < round(intpower(2,GetZ-1)/2)) then sxy:='/B';
  92. if (gety< round(intpower(2,GetZ-1)/2)) and (getx >= round(intpower(2,GetZ-1)/2))then sxy:='/D';
  93. if (gety< round(intpower(2,GetZ-1)/2)) and (getx < round(intpower(2,GetZ-1)/2))then sxy:='/C';
  94. dx3:=round(intpower(2,GetZ-1)/2)-GetX;
  95. if dx3<0 then dx3:=-dx3;
  96. dy3:=round(intpower(2,GetZ-1)/2)-GetY;
  97. if dy3<0 then dy3:=-dy3;
  98. if GetZ>3 then
  99. begin
  100. dx2:=dx3 div max[getz];
  101. dy2:=dy3 div max[getz];
  102. dx1:=dx2 div max[getz];
  103. dy1:=dy2 div max[getz];
  104. end;
  105. px3:=dx3 div 35;
  106. py3:=dy3 div 35;
  107. ppx3:=px3 div 35;
  108. ppy3:=py3 div 35;
  109. x3:=dx3 mod 35;
  110. y3:=dy3 mod 35;
  111. px3:=px3-ppx3*35;
  112. py3:=py3-ppy3*35;
  113. px2:=dx2 div 35;
  114. py2:=dy2 div 35;
  115. ppx2:=px2 div 35;
  116. ppy2:=py2 div 35;
  117. x2:=dx2 mod 35;
  118. y2:=dy2 mod 35;
  119. px2:=px2-ppx2*35;
  120. py2:=py2-ppy2*35;
  121. px1:=dx1 div 35;
  122. py1:=dy1 div 35;
  123. ppx1:=px1 div 35;
  124. ppy1:=py1 div 35;
  125. x1:=dx1 mod 35;
  126. y1:=dy1 mod 35;
  127. px1:=px1-ppx1*35;
  128. py1:=py1-ppy1*35;
  129. strx3:=a[x3];
  130. stry3:=a[y3];
  131. if px3>0 then strx3:=a[px3]+strx3;
  132. if py3>0 then stry3:=a[py3]+stry3;
  133. if ppx3>0 then strx3:=a[ppx3]+strx3;
  134. if ppy3>0 then stry3:=a[ppy3]+stry3;
  135. strx2:=a[x2];
  136. stry2:=a[y2];
  137. if px2>0 then strx2:=a[px2]+strx2;
  138. if py2>0 then stry2:=a[py2]+stry2;
  139. if ppx2>0 then strx2:=a[ppx2]+strx2;
  140. if ppy2>0 then stry2:=a[ppy2]+stry2;
  141. strx1:=a[x1];
  142. stry1:=a[y1];
  143. if px1>0 then strx1:=a[px1]+strx1;
  144. if py1>0 then stry1:=a[py1]+stry1;
  145. if ppx1>0 then strx1:=a[ppx1]+strx1;
  146. if ppy1>0 then stry1:=a[ppy1]+stry1;
  147. ResultURL:=GetURLBase+'Z'+inttostr(19-GetZ)+sxy+'/L1'+strx1+'Z'+stry1+'/L2'+strx2+'Z'+stry2+'/'+strx3+'Z'+stry3+'.png';
  148. end.