SHARE
TWEET

Untitled

a guest Jul 19th, 2017 644 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /usr/bin/sdlbrt
  2.  
  3. '- picture converter - sharp mz700 - colour version (based on a zx81 picture converter) - Paulo Silva - Feb'11 - GPL licence
  4. '- pictures must have 80x50 pixel size
  5.  
  6. finp$="lena_80x50.jpg"
  7. finp2$="_tmpr_m.png":shell("convert -modulate 100,0 "+finp$+" "+finp2$)
  8. finp3$="_tmpr_n.png":shell("convert "+finp$+" "+finp3$)
  9.  
  10. onlgr=0
  11. 'xed=0:yed=0
  12. 'open finp2$ for input as #1
  13. '  for i=1 to 16:n=readbyte(1):next:for i=1 to 2:n=readbyte(1):next
  14. '  xed=readbyte(1)*256:xed=xed+readbyte(1)
  15. '  for i=1 to 2:n=readbyte(1):next:yed=readbyte(1)*256:yed=yed+readbyte(1)
  16. '  close #1
  17.  
  18. xed=80:yed=50
  19.  
  20. xed2a=xed*4:xed2disp=xed2a:if xed2disp<(160+xed) then: xed2disp=160+xed:end if
  21. yed2a=yed*4:yed2disp=yed2a+256:if yed2disp<(yed2a+yed) then:yed2disp=yed2a+yed:end if
  22. xed2disp2=xed*8:
  23.  
  24. yed2disp2=256+(yed*4):if yed2disp2<yed*8 then:yed2disp2=yed*8:end if
  25.  
  26.  
  27. setdisplay(xed2disp2,yed2disp2,32,1):paper(0x808080):ink(0):pen(0):cls
  28.  
  29. loadimage(finp2$,1):pasteicon(160,yed2a+50,1)
  30. loadimage(finp3$,1):pasteicon(160+80,yed2a,1)
  31.  
  32. sub filpic7(qxx1,qyy1,qstq$)
  33.   yyt=qyy1:xxt=qxx1:tstt$=qstq$
  34.   for qq=0 to len(tstt$)-1
  35.     qu=(((val(mid$(tstt$,qq+1,1)))*255)/7):ink(rgb(qu,qu,qu)):dot(xxt+qq,yyt):next
  36.   end sub
  37.  
  38. dim mchr[40,25],mink[40,25],mppr[40,25]
  39.  
  40. dim paleta[16]
  41. paleta[00]=0x000000:paleta[01]=0x0000FF:paleta[02]=0xFF0000:paleta[03]=0xFF00FF
  42. paleta[04]=0x00FF00:paleta[05]=0x00FFFF:paleta[06]=0xFFFF00:paleta[07]=0xFFFFFF
  43. paleta[08]=0x000000:paleta[09]=0x0000FF:paleta[10]=0xFF0000:paleta[11]=0xFF00FF
  44. paleta[12]=0x00FF00:paleta[13]=0x00FFFF:paleta[14]=0xFFFF00:paleta[15]=0xFFFFFF
  45.  
  46. filpic7(0,yed2a+000,"77777777777007777000007777700077700007777000000770000007777000777077770777700077777700077077770770777777707777077077770777700777")
  47. filpic7(0,yed2a+001,"77777777770770777707770777077707770770777077777770777777770777077077770777770777777770777077707770777777700770077007770777077077")
  48. filpic7(0,yed2a+002,"77777777707777077707770770777777770777077077777770777777707777777077770777770777777770777077077770777777707007077070770770777707")
  49. filpic7(0,yed2a+003,"77777777700000077700007770777777770777077000077770000777707700077000000777770777777770777000777770777777707007077077070770777707")
  50. filpic7(0,yed2a+004,"77777777707777077707770770777777770777077077777770777777707777077077770777770777777770777077077770777777707777077077700770777707")
  51. filpic7(0,yed2a+005,"77777777707777077707770777077707770770777077777770777777770777077077770777770777707770777077707770777777707777077077770777077077")
  52. filpic7(0,yed2a+006,"77777777707777077000007777700077700007777000000770777777777000777077770777700077770007777077770770000007707777077077770777700777")
  53. filpic7(0,yed2a+007,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  54. filpic7(0,yed2a+008,"70000077777007777000007777000077770000077077770770777707707777077077770777077707700000077777077777770777777707777777077777770777")
  55. filpic7(0,yed2a+009,"70777707770770777077770770777707777707777077770770777707707777077077770777077707777777077777077777770777777707777777077777770777")
  56. filpic7(0,yed2a+010,"70777707707777077077770770777777777707777077770770777707707777077707707777077707777770777777077777770777777707777777077777770777")
  57. filpic7(0,yed2a+011,"70000077707777077000007777000077777707777077770777077077707007077770077777700077777007777777077777770777777707777777077777770777")
  58. filpic7(0,yed2a+012,"70777777707707077077077777777707777707777077770777077077707007077707707777770777770777770000000077770000000007777777000000000000")
  59. filpic7(0,yed2a+013,"70777777770770777077707770777707777707777077770777700777700770077077770777770777707777777777077777777777777777777777077777777777")
  60. filpic7(0,yed2a+014,"70777777777007077077770777000077777707777700007777700777707777077077770777770777700000077777077777777777777777777777077777777777")
  61. filpic7(0,yed2a+015,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777077777777777777777777777077777777777")
  62. filpic7(0,yed2a+016,"77000077777707777700007777000077777770777000000777700077700000077700007777000077777777777777777777777777777777777777777777777777")
  63. filpic7(0,yed2a+017,"70777707777007777077770770777707777700777077777777077777707777077077770770777707777777777777777777777777777777077777777777777777")
  64. filpic7(0,yed2a+018,"70777007770707777777770777777707777070777000077770777777777770777077770770777707777777777000000777770777777770777777777777777777")
  65. filpic7(0,yed2a+019,"70700707777707777777007777000077770770777777707770000077777707777700007777000007700000077777777777777777777707777777777777777777")
  66. filpic7(0,yed2a+020,"70077707777707777700777777777707700000077777770770777707777077777077770777777707777777777000000777777777777077777777777777777777")
  67. filpic7(0,yed2a+021,"70777707777707777077777770777707777770777077707770777707777077777077770777777077777777777777777777770777770777777770077777770777")
  68. filpic7(0,yed2a+022,"77000077770000077000000777000077777770777700077777000077777077777700007777000777777777777777777777770777707777777770077777770777")
  69. filpic7(0,yed2a+023,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777707777777777777777777777707777")
  70. filpic7(0,yed2a+024,"77777777707777770777777777777770777777777770777700000000007777777777777777777077777777777777000077777777777777707777777777777700")
  71. filpic7(0,yed2a+025,"00000000707777770777777777777770777777777770777700000000007777777777777777777077777777777777000077777777777777707777777777777700")
  72. filpic7(0,yed2a+026,"77777777707777770777777777777770777777777770777777777777007777777777777777777077777777777777000077777777777777707777777777777700")
  73. filpic7(0,yed2a+027,"77777777707777770777777777777770000000007770777777777777007777777777777777777077777777777777000077777777777777707777777777777700")
  74. filpic7(0,yed2a+028,"77777777707777770777777777777770777777777770777777777777007777777777777777777077000000007777000077777777777777707777777777777700")
  75. filpic7(0,yed2a+029,"77777777707777770777777777777770777777777770777777777777007777770000000077777077000000007777000077777777777777707777777777777700")
  76. filpic7(0,yed2a+030,"77777777707777770777777777777770777777777770777777777777007777777777777777777077000000007777000077777777777777700000000077777700")
  77. filpic7(0,yed2a+031,"77777777707777770000000000000000777777777770777777777777007777777777777777777077000000007777000000000000777777700000000077777700")
  78. filpic7(0,yed2a+032,"77777777777707770000000000000000777707777777777777770777777777777777777777000077000000007777777777777777077777777777777077777777")
  79. filpic7(0,yed2a+033,"77777777777000777000000000000000777000777777777777700077770000777700007770777707007777007777777777777777007777777777770077777777")
  80. filpic7(0,yed2a+034,"77770777770000077700000000000000770000077770777777070707700000077077770777777707077777707777777777777777000777777777700077770777")
  81. filpic7(0,yed2a+035,"77777077700000007770000000000000700000007707777770000000700000077077770777770077077777707777777777777777000077777777000077777777")
  82. filpic7(0,yed2a+036,"00000007700000007777000000000000770000077000000077070707700000077077770777707777077777707777770000777777000007777770000077777777")
  83. filpic7(0,yed2a+037,"77777077777000777777700000000000777000777707777777770777700000077077770777777777077777707777707777077777000000777700000077770777")
  84. filpic7(0,yed2a+038,"77770777770000077777770000000000777707777770777777770777770000777700007777707777007777007777077777707777000000077000000077777777")
  85. filpic7(0,yed2a+039,"77777777777777777777777000000000777777777777777777777777777777777777777777777777000000007777077777707777000000000000000077777777")
  86. filpic7(0,yed2a+040,"77777777777700077700007777007007770000777770007700000000700077770707777777777777070707070000777777777777777777777777077777777777")
  87. filpic7(0,yed2a+041,"77770777777007777707777770000000777770777707770700000007777007777070777770777777707070700000777777777777777777777777077777777777")
  88. filpic7(0,yed2a+042,"77700077770077777707777770000000777770777077070700000077777700770707777777077777070707070000777777777777777777777777077777777777")
  89. filpic7(0,yed2a+043,"77070707700777777707777770000000777770777070700700000777777770077070777777707777707070700000777777777777777777777777077777777777")
  90. filpic7(0,yed2a+044,"77770777770077777707777777000007777770777077007700007777777700770707777777770777070707077777000077770000000077770000077700000000")
  91. filpic7(0,yed2a+045,"77770777777007777707777777700077777770777707777700077777777007777070777777777077707070707777000077770777777077777777077777770777")
  92. filpic7(0,yed2a+046,"77770777777700077700007777770777770000777770000700777777700077770707777777777707070707077777000077770777777077777777077777770777")
  93. filpic7(0,yed2a+047,"77777777777777777777777777777777777777777777777707777777777777777070777777777777707070707777000077770777777077777777077777770777")
  94. filpic7(0,yed2a+048,"77777777777707777707707777077077777707777777777777007777777770777777707777077777777777777777077777770000077777707770777777770777")
  95. filpic7(0,yed2a+049,"77777777777707777707707777077077777000077007770770770777777707777777077777707777777707777707070777770000707777077770777777770777")
  96. filpic7(0,yed2a+050,"77777770777707777707707770000007770707777007707770770777777077777770777777770777777707777770007777770000770770777707777777777077")
  97. filpic7(0,yed2a+051,"77000007777707777777777777077077777000777777077777007777777777777770777777770777770000077700000777770000777007770077777777777700")
  98. filpic7(0,yed2a+052,"70707077777777777777777770000007777707077770777770770707777777777770777777770777777707777770007700007777777007777777777777777777")
  99. filpic7(0,yed2a+053,"77707077777777777777777777077077777000777707700770777077777777777777077777707777777707777707070700007777770770777777777777777777")
  100. filpic7(0,yed2a+054,"77707077777707777777777777077077777707777077700777000707777777777777707777077777777777777777077700007777707777077777777777777777")
  101. filpic7(0,yed2a+055,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777700007777077777707777777777777777")
  102. filpic7(0,yed2a+056,"00000000077777770000000000000000777777777707777777777770077777777777777777770777000000000000777777777777777777077777777777777000")
  103. filpic7(0,yed2a+057,"77777777077777770777777777777770777777777707777777777707707777777777777777770777000000000000777777777777777777077777777777777000")
  104. filpic7(0,yed2a+058,"77777777077777770777777777777770000000007707777777777077770777777777777777770777000000000000777777777777777777077777777777777000")
  105. filpic7(0,yed2a+059,"77777777077777770777777777777770777777777707777777770777777077777777777777770777000000000000777777777777777777077777777777777000")
  106. filpic7(0,yed2a+060,"77777777077777770777777777777770777777777707777777707777777707770000000077770777777777770000777777777777777777077777777777777000")
  107. filpic7(0,yed2a+061,"77777777077777770777777777777770777777777707777777077777777770777777777777770777777777770000777777777777777777070000000077777000")
  108. filpic7(0,yed2a+062,"77777777077777770777777777777770777777777707777770777777777777077777777777770777777777770000777700000000777777070000000077777000")
  109. filpic7(0,yed2a+063,"77777777077777770777777777777770777777777707777707777777777777707777777777770777777777770000777777777777777777070000000077777000")
  110. filpic7(0,yed2a+064,"77777777777770777777777777777777777777777777770777777777777707777777777777777777777777777777707777077077777777777777777777700077")
  111. filpic7(0,yed2a+065,"77770777770007777700000777077707770077777777707777770777770000077770000777700077770000077777707777077077770000077770007777777777")
  112. filpic7(0,yed2a+066,"77770777777707777777770777077707777777077777077777777077777707777770770777777777777777077777707777077077777077777777777777000007")
  113. filpic7(0,yed2a+067,"77770777770000077777770777707707770077077770077777077707770000077707770777777777777777077777707777077077770000077770007777777707")
  114. filpic7(0,yed2a+068,"77070707777707777777770777777707777777077707077777077707777707777777770777777777777070777777707777777077777077777777777777777707")
  115. filpic7(0,yed2a+069,"77700077777707777777770777777077777770777777077777077707777707777777707777777777777707777777077777770777777077777700007777777077")
  116. filpic7(0,yed2a+070,"77770777777077777700000777700777770007777777077777077707777707777770077777000007777770777770777777707777777700077777770777770777")
  117. filpic7(0,yed2a+071,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  118. filpic7(0,yed2a+072,"77707777777777777777777777707777777077777777077777077777777000777770707777777777777777777777777777707777777000077777777777777777")
  119. filpic7(0,yed2a+073,"77000007777000077700000777707777770000077777077777077777777777777700000777007777770707077700000777700007777077777777777777777777")
  120. filpic7(0,yed2a+074,"77707707777077077777770777707777777077077700000777000007770000077770707777777777770707077707770777077077777077777700000777707777")
  121. filpic7(0,yed2a+075,"77707077770707077777707777700777777077077777077777077777777707777770707777777707770707077707770777777077777077777777770777000007")
  122. filpic7(0,yed2a+076,"77707777777770077777077777707077777077077777077777077777777707777777707777777707777777077707770777777077777777777777007777707707")
  123. filpic7(0,yed2a+077,"77707777777770777770707777707777777077077770777777077777777707777777077777777077777770777707770777777077777777777777077777707077")
  124. filpic7(0,yed2a+078,"77770007777007777707770777707777770770777707777777700007777077777770777777000777777707777700000777770777777777777770777777707777")
  125. filpic7(0,yed2a+079,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  126. filpic7(0,yed2a+080,"77777777777777777777777777000007777707777777777777777077777077777777777777777777777707777777777777777777777777777777777777770777")
  127. filpic7(0,yed2a+081,"77000007770000077700000777777707770000077700000777000007777077777770007777000007770000077770777777077777777777077777077777000007")
  128. filpic7(0,yed2a+082,"77077707777777077777770777770707770777077777077777777077770000077777707777777707777707777707077777077777777777077707077777777077")
  129. filpic7(0,yed2a+083,"77077707777070777777770777770077770777077777077777770077777077077777707777000007777707777777707777077707777070777707077777770777")
  130. filpic7(0,yed2a+084,"77777707777707777777770777770777777777077777077777707077777070777777707777777707770707077777770777077077777707777707070777700077")
  131. filpic7(0,yed2a+085,"77777077777070777777707777770777777770777777077777077077777077777777707777777707770707077777770777070777777070777707070777070707")
  132. filpic7(0,yed2a+086,"77770777770777777770077777707777777707777700000777777077777077777700000777000007777707777777777777007777770777777707007777770777")
  133. filpic7(0,yed2a+087,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  134. filpic7(0,yed2a+088,"77777777777777777777777777777777777777777777777777777777777777777000777777777777777777777777777777707777777777777777777777777777")
  135. filpic7(0,yed2a+089,"77770777777777777777777777777777770000077777777777777777777777777070777777777777777777777777777770770777777777777777777777777777")
  136. filpic7(0,yed2a+090,"77707777777777777777770777777777777777077777777777770777770000777000777777777777777777777777777777077777777777777777707777777777")
  137. filpic7(0,yed2a+091,"77077777777707777777707777700077770000077777777777000007777770777777777777777777770000077707070777777777777777777700000777700077")
  138. filpic7(0,yed2a+092,"77077707777707777777007777777077777777077077777777077707770000777777777777777777777707777707070777777777700077777777007777777777")
  139. filpic7(0,yed2a+093,"77000007777707777770707777777077777770777707777777777707777770777777777777777777777707777777770777777777707077777770707777777777")
  140. filpic7(0,yed2a+094,"77777707700007777777707777000007777707777770777777770077770000777777777777777777770000077777007777777777700077777707707777777777")
  141. filpic7(0,yed2a+095,"77777777777777777777777777777777777777777777777777777777777777777777777777077777777777777777777777777777777777777777777777777777")
  142. filpic7(0,yed2a+096,"77700077000000000000000000000000000000000700007000077700777007770007777777077707777000777777777777777777770777077700007777000077")
  143. filpic7(0,yed2a+097,"77700077000070000000700000000000000000000700007000700070770770777077700077000007777000777770777007770777777070777000000770777707")
  144. filpic7(0,yed2a+098,"77000007000070000007770000007000000700000700007007000000700000077077770777070707777707770070770770770700777707770000000007777770")
  145. filpic7(0,yed2a+099,"77700077000070000070707000000700007000000777777007000000000000007000000777770777770000070000007777000000777707770070070007077070")
  146. filpic7(0,yed2a+100,"77770777007070700000700007777770077777700700007007000000707007077077770777770777777707770070770770770700770000070000000007777770")
  147. filpic7(0,yed2a+101,"77777777000777000000700000000700007000000700007000700070770770777077700070770770777707777770777007770777777707770007700007700770")
  148. filpic7(0,yed2a+102,"77000007000070000000700000007000000700000700007000077700777777770007777770000000777070777777777777777777777000777000000770777707")
  149. filpic7(0,yed2a+103,"77777777000000000000000000000000000000000000000000000000777777777777777770777770770777077777777777777777777000777700007777000077")
  150. filpic7(0,yed2a+104,"77000007777000007777077777770777777707777777077777777777777707777707777777777077777707777700077770000000770777077777007777777777")
  151. filpic7(0,yed2a+105,"77077707777077707707070777770770777707777770707777770777707707777700000770000007777070777770770770770770777070777770770700777777")
  152. filpic7(0,yed2a+106,"77077707777000007707070777000707770000077700000777770777700000077077077770707077770777077000000070770770770000077770777700770777")
  153. filpic7(0,yed2a+107,"77000007777077707777077777770077777707777077077077000007707707777700007770000000700000007770700070000000777707777700077770707077")
  154. filpic7(0,yed2a+108,"77077707777000007770707777700077777000777700000777770777770000077707077770707777777077077700070070777770770000077770777770707077")
  155. filpic7(0,yed2a+109,"77077707777077707707770777070707770707077770007777770777777707777000000770000000777077077070770770777770777707777770777770707070")
  156. filpic7(0,yed2a+110,"77000007770777707077777070770770707707707000000070000000700000007777077777770707770770777770707770777770777707777700000777077707")
  157. filpic7(0,yed2a+111,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  158. filpic7(0,yed2a+112,"77777777777777077777770777777777777777777777777777777777777777777777777707770777070707770777777777777777777707777777077770707070")
  159. filpic7(0,yed2a+113,"77777777777777077777770777777777777700070000000070007777007770777707770007707777070077777077777777777777777707777770777707070707")
  160. filpic7(0,yed2a+114,"77777777777777077777770777077777777077707777777707770777070770777707707007077777070007777707777777077077770000077707777770707070")
  161. filpic7(0,yed2a+115,"77777777777777077777770770707777770777070777777070777077077070777707077000777777007777777770777777077077777777777770777707070707")
  162. filpic7(0,yed2a+116,"77777777777777077777770707770777007770777077770777077700077700000000777000777777007777777770000000077000777777777777077770707070")
  163. filpic7(0,yed2a+117,"77777707777777077777770777777070777770777077770777077777077070777707077007070777070777777707777777077077770000077777707707070707")
  164. filpic7(0,yed2a+118,"00000000777770000000000077777707777777070777777070777777070770777707707007700777077077777077777777077077777707777777770770707070")
  165. filpic7(0,yed2a+119,"77777707777777077777770777777777777777707777777707777777007770777707770007000777077707770777777777777777777707777777707707070707")
  166. filpic7(0,yed2a+120,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  167. filpic7(0,yed2a+121,"77777777700077777777700070007000777777777000777777777000700070007777777770007777777770007000700077777777700077777777700070007000")
  168. filpic7(0,yed2a+122,"77777777700077777777700070007000777777777000777777777000700070007777777770007777777770007000700077777777700077777777700070007000")
  169. filpic7(0,yed2a+123,"77777777700077777777700070007000777777777000777777777000700070007777777770007777777770007000700077777777700077777777700070007000")
  170. filpic7(0,yed2a+124,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  171. filpic7(0,yed2a+125,"77777777777777777777777777777777700077777000777770007777700077777777700077777000777770007777700070007000700070007000700070007000")
  172. filpic7(0,yed2a+126,"77777777777777777777777777777777700077777000777770007777700077777777700077777000777770007777700070007000700070007000700070007000")
  173. filpic7(0,yed2a+127,"77777777777777777777777777777777700077777000777770007777700077777777700077777000777770007777700070007000700070007000700070007000")
  174. filpic7(0,yed2a+128,"77777777777777777077777777777777777777707777777777770077777777777077777777770777777770777077777777700777777777777777777777777777")
  175. filpic7(0,yed2a+129,"77777777777777777077777777777777777777707777777777707707777777777077777777777777777777777077777777770777777777777777777777777777")
  176. filpic7(0,yed2a+130,"77777777770007777070007777000077777000707700007777707777770007077070007777700777777700777077707777770777700070077070007777000077")
  177. filpic7(0,yed2a+131,"77777777777770777007770770777707770777007077770770000077707770077007770777770777777770777077077777770777707707707007770770777707")
  178. filpic7(0,yed2a+132,"77777777770000777077770770777777770777707000000777707777707770077077770777770777777770777070777777770777707707707077770770777707")
  179. filpic7(0,yed2a+133,"77777777707770777007770770777707770777007077777777707777770007077077770777770777777770777007077777770777707707707077770770777707")
  180. filpic7(0,yed2a+134,"77777777770007077070007777000077777000707700007777707777777777077077770777700077707770777077707777700077707707707077770777000077")
  181. filpic7(0,yed2a+135,"77777777777777777777777777777777777777777777777777777777770000777777777777777777770007777777777777777777777777777777777777777777")
  182. filpic7(0,yed2a+136,"77777777777777777777777777777777777077777777777777777777777777777777777777777777777777777777077777770777777707777777077777770777")
  183. filpic7(0,yed2a+137,"77777777777777777777777777777777777077777777777777777777777777777777777777777777777777777777077777770777777707777777077777770777")
  184. filpic7(0,yed2a+138,"70700077770007077070007777000007700000777077770770777707707777707077707770777707700000077777077777770777777707777777077777770777")
  185. filpic7(0,yed2a+139,"70077707707770077007770770777777777077777077770770777707707707707707077770777707777770777777077777770777777707777777077777770777")
  186. filpic7(0,yed2a+140,"70077707707770077077777777000077777077777077770770777707707707707770777770777007777007770000000077770000000007777777000000000000")
  187. filpic7(0,yed2a+141,"70700077770007077077777777777707777077077077770777077077707707707707077777000707770777777777077777777777777777777777077777777777")
  188. filpic7(0,yed2a+142,"70777777777777077077777770000077777700777700007777700777770070077077707777777707700000077777077777777777777777777777077777777777")
  189. filpic7(0,yed2a+143,"70777777777777077777777777777777777777777777777777777777777777777777777777000077777777777777077777777777777777777777077777777777")
  190. filpic7(0,yed2a+144,"77000077777707777700007777000077777770777000000777700077700000077700007777000077777777777777777777777777777777777777777777777777")
  191. filpic7(0,yed2a+145,"70777707777007777077770770777707777700777077777777077777707777077077770770777707777777777777777777777777777777077777777777777777")
  192. filpic7(0,yed2a+146,"70777007770707777777770777777707777070777000077770777777777770777077770770777707777777777000000777770777777770777777777777777777")
  193. filpic7(0,yed2a+147,"70700707777707777777007777000077770770777777707770000077777707777700007777000007700000077777777777777777777707777777777777777777")
  194. filpic7(0,yed2a+148,"70077707777707777700777777777707700000077777770770777707777077777077770777777707777777777000000777777777777077777777777777777777")
  195. filpic7(0,yed2a+149,"70777707777707777077777770777707777770777077707770777707777077777077770777777077777777777777777777770777770777777770077777770777")
  196. filpic7(0,yed2a+150,"77000077770000077000000777000077777770777700077777000077777077777700007777000777777777777777777777770777707777777770077777770777")
  197. filpic7(0,yed2a+151,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777707777777777777777777777707777")
  198. filpic7(0,yed2a+152,"77777777707777770777777777777770777777777770777700000000007777777777777777777077777777777777000077777777777777707777777777777700")
  199. filpic7(0,yed2a+153,"00000000707777770777777777777770777777777770777700000000007777777777777777777077777777777777000077777777777777707777777777777700")
  200. filpic7(0,yed2a+154,"77777777707777770777777777777770777777777770777777777777007777777777777777777077777777777777000077777777777777707777777777777700")
  201. filpic7(0,yed2a+155,"77777777707777770777777777777770000000007770777777777777007777777777777777777077777777777777000077777777777777707777777777777700")
  202. filpic7(0,yed2a+156,"77777777707777770777777777777770777777777770777777777777007777777777777777777077000000007777000077777777777777707777777777777700")
  203. filpic7(0,yed2a+157,"77777777707777770777777777777770777777777770777777777777007777770000000077777077000000007777000077777777777777707777777777777700")
  204. filpic7(0,yed2a+158,"77777777707777770777777777777770777777777770777777777777007777777777777777777077000000007777000077777777777777700000000077777700")
  205. filpic7(0,yed2a+159,"77777777707777770000000000000000777777777770777777777777007777777777777777777077000000007777000000000000777777700000000077777700")
  206. filpic7(0,yed2a+160,"77777777777707770000000000000000777707777777777777770777777777777777777777000077000000007777777777777777077777777777777077777777")
  207. filpic7(0,yed2a+161,"77777777777000777000000000000000777000777777777777700077770000777700007770777707007777007777777777777777007777777777770077777777")
  208. filpic7(0,yed2a+162,"77770777770000077700000000000000770000077770777777070707700000077077770777777707077777707777777777777777000777777777700077770777")
  209. filpic7(0,yed2a+163,"77777077700000007770000000000000700000007707777770000000700000077077770777770077077777707777777777777777000077777777000077777777")
  210. filpic7(0,yed2a+164,"00000007700000007777000000000000770000077000000077070707700000077077770777707777077777707777770000777777000007777770000077777777")
  211. filpic7(0,yed2a+165,"77777077777000777777700000000000777000777707777777770777700000077077770777777777077777707777707777077777000000777700000077770777")
  212. filpic7(0,yed2a+166,"77770777770000077777770000000000777707777770777777770777770000777700007777707777007777007777077777707777000000077000000077777777")
  213. filpic7(0,yed2a+167,"77777777777777777777777000000000777777777777777777777777777777777777777777777777000000007777077777707777000000000000000077777777")
  214. filpic7(0,yed2a+168,"77777777777700077700007777007007770000777770007700000000700077770707777777777777070707070000777777777777777777777777077777777777")
  215. filpic7(0,yed2a+169,"77770777777007777707777770000000777770777707770700000007777007777070777770777777707070700000777777777777777777777777077777777777")
  216. filpic7(0,yed2a+170,"77700077770077777707777770000000777770777077070700000077777700770707777777077777070707070000777777777777777777777777077777777777")
  217. filpic7(0,yed2a+171,"77070707700777777707777770000000777770777070700700000777777770077070777777707777707070700000777777777777777777777777077777777777")
  218. filpic7(0,yed2a+172,"77770777770077777707777777000007777770777077007700007777777700770707777777770777070707077777000077770000000077770000077700000000")
  219. filpic7(0,yed2a+173,"77770777777007777707777777700077777770777707777700077777777007777070777777777077707070707777000077770777777077777777077777770777")
  220. filpic7(0,yed2a+174,"77770777777700077700007777770777770000777770000700777777700077770707777777777707070707077777000077770777777077777777077777770777")
  221. filpic7(0,yed2a+175,"77777777777777777777777777777777777777777777777707777777777777777070777777777777707070707777000077770777777077777777077777770777")
  222. filpic7(0,yed2a+176,"77777777777707777707707777077077777707777777777777007777777770777777707777077777777777777777077777770000077777707770777777770777")
  223. filpic7(0,yed2a+177,"77777777777707777707707777077077777000077007770770770777777707777777077777707777777707777707070777770000707777077770777777770777")
  224. filpic7(0,yed2a+178,"77777770777707777707707770000007770707777007707770770777777077777770777777770777777707777770007777770000770770777707777777777077")
  225. filpic7(0,yed2a+179,"77000007777707777777777777077077777000777777077777007777777777777770777777770777770000077700000777770000777007770077777777777700")
  226. filpic7(0,yed2a+180,"70707077777777777777777770000007777707077770777770770707777777777770777777770777777707777770007700007777777007777777777777777777")
  227. filpic7(0,yed2a+181,"77707077777777777777777777077077777000777707700770777077777777777777077777707777777707777707070700007777770770777777777777777777")
  228. filpic7(0,yed2a+182,"77707077777707777777777777077077777707777077700777000707777777777777707777077777777777777777077700007777707777077777777777777777")
  229. filpic7(0,yed2a+183,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777700007777077777707777777777777777")
  230. filpic7(0,yed2a+184,"00000000077777770000000000000000777777777707777777777077770777777777777777770777000000000000777777777777777777077777777777777000")
  231. filpic7(0,yed2a+185,"77777777077777770777777777777770777777777707777777770777777077777777777777770777000000000000777777777777777777077777777777777000")
  232. filpic7(0,yed2a+186,"77777777077777770777777777777770000000007707777777707770077707777777777777770777000000000000777777777777777777077777777777777000")
  233. filpic7(0,yed2a+187,"77777777077777770777777777777770777777777707777777077707707770777777777777770777000000000000777777777777777777077777777777777000")
  234. filpic7(0,yed2a+188,"77777777077777770777777777777770777777777707777770777077770777070000000077770777777777770000777777777777777777077777777777777000")
  235. filpic7(0,yed2a+189,"77777777077777770777777777777770777777777707777707770777777077707777777777770777777777770000777777777777777777070000000077777000")
  236. filpic7(0,yed2a+190,"77777777077777770777777777777770777777777707777777707777777707777777777777770777777777770000777700000000777777070000000077777000")
  237. filpic7(0,yed2a+191,"77777777077777770777777777777770777777777707777777077777777770777777777777770777777777770000777777777777777777070000000077777000")
  238. filpic7(0,yed2a+192,"77777777777077777777777777000077707777770777707707777077777077777777007707700007777077777700077770777077770777777000777770077777")
  239. filpic7(0,yed2a+193,"77770777000000070000007777770777707777770777770707700007700000077770077707777777700000077070707770777077000007777770777777777777")
  240. filpic7(0,yed2a+194,"77770777770777777777770777707777707777770777770707777077777707777700777707777777777077770770770770777077770777777770707707700077")
  241. filpic7(0,yed2a+195,"77770777700000777777777770000007707777770777770707777077700000077007777707777777700000070770770770077077000007777000000707077707")
  242. filpic7(0,yed2a+196,"77070707777777077777777777770777707770770777770707700077777770777700777707777777777077770770770777777077770777070770707700777707")
  243. filpic7(0,yed2a+197,"77700077777777070777777777707777707770770770777707077007777777077770077707707777700077770770770777770777770777070770707707777707")
  244. filpic7(0,yed2a+198,"77770777000000777000000777770077770007777007777770700077700777777777007700700007077000777007707777707777777000777007707777700077")
  245. filpic7(0,yed2a+199,"77777777777777777777777777777777777777777777777777777777777007777777777777777777700077077777777777777777777777777777777777777777")
  246. filpic7(0,yed2a+200,"70777077770777777777077777077777770777077707777700077777000000077707777777707777077777777000007707777077777000077777777777777777")
  247. filpic7(0,yed2a+201,"70777077000000770000000777077707000007700000070777077007777770770000000777077777700000777777077707000007777077777707777777777777")
  248. filpic7(0,yed2a+202,"00000007707777777777077777070077770770707077777070777070777707777770777777077777777777077770777707777077777077777000777770700777")
  249. filpic7(0,yed2a+203,"70777077707000077700077777007777770770777077707707777077777077777777077770007777777777077707007707777077777077777707777700077077")
  250. filpic7(0,yed2a+204,"70700777077777777077077770777777770770770770007707777077777077777077707770770777777777077077770707777077777777777000077777070777")
  251. filpic7(0,yed2a+205,"70777777070777777700077707777777770770770707700707770777777707777707777707770777777770777777770707777077777777770770707777077777")
  252. filpic7(0,yed2a+206,"77000007070000077777077770000007707707777770007770007777777770777770077707777007777007777707707770770777777777777007077777707777")
  253. filpic7(0,yed2a+207,"77777777777777777770777777777777777777777777777777777777777777777777777777777777777777777770077777777777777777777777777777777777")
  254. filpic7(0,yed2a+208,"77077777777770777700077777077777777007777770777777077777707707777777077777770777077000077777777777077777777770777000007777077777")
  255. filpic7(0,yed2a+209,"00077077707770777777777700000077777777777777777700000070707700770770007777770007077770777707777700077007707770777777077700077077")
  256. filpic7(0,yed2a+210,"77070707700000777770777777077777770000777000007777077770770077070707070777770777077000077070777777070077700000777770777777070707")
  257. filpic7(0,yed2a+211,"77007707707707077077070770000077707777077777077770000077770777070077070777770777077770770777077777007077707707077700007777007707")
  258. filpic7(0,yed2a+212,"77077707070077077077070707070707777777077770777707077707770770770077070770000777077000777777707770077077070077077077770770077007")
  259. filpic7(0,yed2a+213,"70077707077070000777070707707707777770777707077707077707777077770777007707770007070770077777770707077077077077077770070707070700")
  260. filpic7(0,yed2a+214,"07077077700770077700777770077077777707777077700770077077777077777770077770000777007000777777770777077707700770777707707777077007")
  261. filpic7(0,yed2a+215,"77777777777777777777777777777777777777777777777777777777777707777777777777777777777777777777777777777777777777777770077777777777")
  262. filpic7(0,yed2a+216,"77077777777777777777777777777777777077777777777777777777777777777700077777777777777777777777777777077777777777777777777777777777")
  263. filpic7(0,yed2a+217,"00000070777777777777777777777777000000077777777777077777777777777707077777777777770777777777777707707777777777777707777777777777")
  264. filpic7(0,yed2a+218,"77077770777777777077077777707777770777777777777777777777770777777700077777777777777777777777777770777777777777777000707777777777")
  265. filpic7(0,yed2a+219,"70077777777777777077707707000777700070777777777770000777770007777777777777777777700007770000077777777777777777777707777777700077")
  266. filpic7(0,yed2a+220,"07077777777777777077707700707077070007777777777777777077770777777777777777777777777077777777707777777777777777777000077777777777")
  267. filpic7(0,yed2a+221,"70077707777707777077707707700777707707777077777777777077700007777777777777777777770077777777707777777777700077770707707777777777")
  268. filpic7(0,yed2a+222,"77000007777707777707777777007777700000077707777777770777700777777777777777077777707700777770077777777777707077777007077777777777")
  269. filpic7(0,yed2a+223,"77777777777707777777777777777777777777777770777777777777777777777777777777777777777777777777777777777777700077777777777777777777")
  270. filpic7(0,yed2a+224,"77700077000000000000000000000000000000000700007000077700777007770007777777077707777000777777777777777777770777077700007777000077")
  271. filpic7(0,yed2a+225,"77700077000070000000700000000000000000000700007000700070770770777077700077000007777000777770777007770777777070777000000770777707")
  272. filpic7(0,yed2a+226,"77000007000070000007770000007000000700000700007007000000700000077077770777070707777707770070770770770700777707770000000007777770")
  273. filpic7(0,yed2a+227,"77700077000070000070707000000700007000000777777007000000000000007000000777770777770000070000007777000000777707770070070007077070")
  274. filpic7(0,yed2a+228,"77770777007070700000700007777770077777700700007007000000707007077077770777770777777707770070770770770700770000070000000007777770")
  275. filpic7(0,yed2a+229,"77777777000777000000700000000700007000000700007000700070770770777077700070770770777707777770777007770777777707770007700007700770")
  276. filpic7(0,yed2a+230,"77000007000070000000700000007000000700000700007000077700777777770007777770000000777070777777777777777777777000777000000770777707")
  277. filpic7(0,yed2a+231,"77777777000000000000000000000000000000000000000000000000777777777777777770777770770777077777777777777777777000777700007777000077")
  278. filpic7(0,yed2a+232,"77000007770000077777077777770777777707777777077777777777777707777707777777777077777707777700077770000000770777077777007777777777")
  279. filpic7(0,yed2a+233,"77077707770777077707070777770770777707777770707777770777707707777700000770000007777070777770770770770770777070777770770700777777")
  280. filpic7(0,yed2a+234,"77077707770000077707070777000707770000077700000777770777700000077077077770707077770777077000000070770770770000077770777700770777")
  281. filpic7(0,yed2a+235,"77000007770777077777077777770077777707777077077077000007707707777700007770000000700000007770700070000000777707777700077770707077")
  282. filpic7(0,yed2a+236,"77077707770000077770707777700077777000777700000777770777770000077707077770707707777077077700070070777770777000777770777770707077")
  283. filpic7(0,yed2a+237,"77077707770777077707770777070707770707077770007777770777777707777000000770000000777077077070770770777770777707777770777770707070")
  284. filpic7(0,yed2a+238,"77000007707777077077777070770770707707707770007770000000700000007777077777770707770770777770707770777770777707777700000777077707")
  285. filpic7(0,yed2a+239,"77777777777777777777777777777777777777777000000077777777777777777777777777777777777777777777777777777777777777777777777777777777")
  286. filpic7(0,yed2a+240,"77777777777777077777770777777777777777777777777777777777777777777777777707770777070707770777777777777777777707777777077770707070")
  287. filpic7(0,yed2a+241,"77777777777777077777770777777777777700070000000070007777007770777707770007707777070077777077777777777777777707777770777707070707")
  288. filpic7(0,yed2a+242,"77777777777777077777770777077777777077707777777707770777070770777707707007077777070007777707777777077077770000077707777770707070")
  289. filpic7(0,yed2a+243,"77777777777777077777770770707777770777070777777070777077077070777707077000777777007777777770777777077077777777777770777707070707")
  290. filpic7(0,yed2a+244,"77777777777777077777770707770777007770777077770777077700077700000000777000777777007777777770000000077000777777777777077770707070")
  291. filpic7(0,yed2a+245,"77777707777777077777770777777070777770777077770777077777077070777707077007070777070777777707777777077077770000077777707707070707")
  292. filpic7(0,yed2a+246,"00000000777770000000000077777707777777070777777070777777070770777707707007700777077077777077777777077077777707777777770770707070")
  293. filpic7(0,yed2a+247,"77777707777777077777770777777777777777707777777707777777007770777707770007000777077707770777777777777777777707777777707707070707")
  294. filpic7(0,yed2a+248,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  295. filpic7(0,yed2a+249,"77777777700077777777700070007000777777777000777777777000700070007777777770007777777770007000700077777777700077777777700070007000")
  296. filpic7(0,yed2a+250,"77777777700077777777700070007000777777777000777777777000700070007777777770007777777770007000700077777777700077777777700070007000")
  297. filpic7(0,yed2a+251,"77777777700077777777700070007000777777777000777777777000700070007777777770007777777770007000700077777777700077777777700070007000")
  298. filpic7(0,yed2a+252,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  299. filpic7(0,yed2a+253,"77777777777777777777777777777777700077777000777770007777700077777777700077777000777770007777700070007000700070007000700070007000")
  300. filpic7(0,yed2a+254,"77777777777777777777777777777777700077777000777770007777700077777777700077777000777770007777700070007000700070007000700070007000")
  301. filpic7(0,yed2a+255,"77777777777777777777777777777777700077777000777770007777700077777777700077777000777770007777700070007000700070007000700070007000")
  302.  
  303. filpic7(128,yed2a+000,"77444456454545544475744657444555"):filpic7(128,yed2a+001,"77665566565667656675666656666566")
  304. filpic7(128,yed2a+002,"44554445645555555555547575757575"):filpic7(128,yed2a+003,"67656665765566556676565475577455")
  305. filpic7(128,yed2a+004,"44656454654545544444666677767777"):filpic7(128,yed2a+005,"55654665656655675566776676676676")
  306. filpic7(128,yed2a+006,"55575775555733377775777077757773"):filpic7(128,yed2a+007,"77574554775777375575007055753373")
  307. filpic7(128,yed2a+008,"76433000436753335564337777377377"):filpic7(128,yed2a+009,"55437300645575335567337557033077")
  308. filpic7(128,yed2a+010,"65555621655403554767440777777577"):filpic7(128,yed2a+011,"76655664656537564776447074475554")
  309. filpic7(128,yed2a+012,"65756644645646766666655370555775"):filpic7(128,yed2a+013,"56777755756555777667766507557777")
  310. filpic7(128,yed2a+014,"55574554555775577775000777757772"):filpic7(128,yed2a+015,"77575775775757755575770755752272")
  311. filpic7(128,yed2a+016,"76546566567576536576657555546564"):filpic7(128,yed2a+017,"65766576667666767666767676666676")
  312. filpic7(128,yed2a+018,"55646557556456645467645565566566"):filpic7(128,yed2a+019,"66756667666766767666765576777666")
  313. filpic7(128,yed2a+020,"55656563546564557554646667766664"):filpic7(128,yed2a+021,"76667676766566676565657656666465")
  314. filpic7(128,yed2a+022,"67777676547765663777667667776576"):filpic7(128,yed2a+023,"65667565766775557777657577376577")
  315. filpic7(128,yed2a+024,"53011201103321333454533553652244"):filpic7(128,yed2a+025,"65120112211111665553655665532244")
  316. filpic7(128,yed2a+026,"44536464645465544433544342545546"):filpic7(128,yed2a+027,"55646664644364535554665566655655")
  317. filpic7(128,yed2a+028,"77757567655556466447365766656744"):filpic7(128,yed2a+029,"54745475656656444436475555657544")
  318. filpic7(128,yed2a+030,"77377333773773337737733377377333"):filpic7(128,yed2a+031,"77777777373737377373737333333333")
  319. filpic7(128,yed2a+032,"77664666646655654676755675555666"):filpic7(128,yed2a+033,"77555556644567546675655675646655")
  320. filpic7(128,yed2a+034,"56655666466666666666657575757575"):filpic7(128,yed2a+035,"46646755665566546654555475577455")
  321. filpic7(128,yed2a+036,"44656454654545544444666677767777"):filpic7(128,yed2a+037,"55654665656655675566776676676676")
  322. filpic7(128,yed2a+038,"55575775555733377775777077757773"):filpic7(128,yed2a+039,"77574554775777375575007055753373")
  323. filpic7(128,yed2a+040,"76433000436753335564337777377377"):filpic7(128,yed2a+041,"55437300645575335567337557033077")
  324. filpic7(128,yed2a+042,"65555621655403554767440777777577"):filpic7(128,yed2a+043,"76655664656537564776447074475554")
  325. filpic7(128,yed2a+044,"65756644645646766666655370555775"):filpic7(128,yed2a+045,"56777755756555777667766507557777")
  326. filpic7(128,yed2a+046,"55574554555765567775000777757772"):filpic7(128,yed2a+047,"77575775775756655575770755752272")
  327. filpic7(128,yed2a+048,"76355644575554445656343555363546"):filpic7(128,yed2a+049,"65555676565744666646364676654655")
  328. filpic7(128,yed2a+050,"44354456444545554547555544565756"):filpic7(128,yed2a+051,"55465656665456766665766566774667")
  329. filpic7(128,yed2a+052,"45545635555634554474435745544545"):filpic7(128,yed2a+053,"56445545766646665545447656465554")
  330. filpic7(128,yed2a+054,"35776657357757675677575757775776"):filpic7(128,yed2a+055,"45766646456776477777567677374677")
  331. filpic7(128,yed2a+056,"53011201103321333454533553652244"):filpic7(128,yed2a+057,"65120112211111665553655665532244")
  332. filpic7(128,yed2a+058,"44446464645465544433544342545546"):filpic7(128,yed2a+059,"55556664644264535554665566755655")
  333. filpic7(128,yed2a+060,"77757567655556466447365766656744"):filpic7(128,yed2a+061,"54745475656656444436475555657544")
  334. filpic7(128,yed2a+062,"77377333773773337737733377377333"):filpic7(128,yed2a+063,"77777777373737377373737333333333")
  335.  
  336. for y1=0 to 49 step 2:for x1=0 to 79 step 2
  337.   rac=0:gac=0:bac=0
  338.   for y2=0 to 1: for x2=0 to 1
  339.     x=x1+x2:y=y1+y2
  340.     u=point(x+160+80,y+yed2a)
  341.     b=u mod 256:u=int(u/256)
  342.     g=u mod 256:u=int(u/256)
  343.     r=u mod 256:u=int(u/256)
  344.     rac+=r:gac+=g:bac+=b
  345.     next:next
  346.   rav=rac/4:gav=gac/4:bav=bac/4
  347.   ink(rgb(rav,gav,bav)):bar(x1+160+80,y1+yed2a+50,x1+160+80+1,y1+yed2a+50+1)
  348.   next:next
  349.  
  350. for y1=0 to 24:for x1=0 to 39
  351.   dist=9999
  352.   u1=point(160+80+(x1*2),yed2a+50+(y1*2))
  353.   b1=u1 mod 256:u1=int(u1/256)
  354.   g1=u1 mod 256:u1=int(u1/256)
  355.   r1=u1 mod 256:u1=int(u1/256)
  356.   pp=0
  357.   for c=0 to 7
  358.     u2=paleta[c]
  359.     b2=u2 mod 256:u2=int(u2/256)
  360.     g2=u2 mod 256:u2=int(u2/256)
  361.     r2=u2 mod 256:u2=int(u2/256)
  362.     rd=abs(r2-r1):gd=abs(g2-g1):bd=abs(b2-b1)
  363.     distt=sqr((rd^2)+(gd^2)+(bd^2))
  364.     if dist>distt then:dist=distt:pp=c:end if
  365.     next
  366.   ik=0
  367.   u4=paleta[pp]
  368.   dist=9999
  369.   b4=u4 mod 256:u4=int(u4/256)
  370.   g4=u4 mod 256:u4=int(u4/256)
  371.   r4=u4 mod 256:u4=int(u4/256)
  372.   for c=0 to 7
  373.     if c<>pp then:
  374.       u2=paleta[c]
  375.       b2=u2 mod 256:u2=int(u2/256)
  376.       g2=u2 mod 256:u2=int(u2/256)
  377.       r2=u2 mod 256:u2=int(u2/256)
  378.       r3=int((r4+r2)/2):g3=int((g4+g2)/2):b3=int((b4+b2)/2)
  379.       rd=abs(r3-r1):gd=abs(g3-g1):bd=abs(b3-b1)
  380.       distt=sqr((rd^2)+(gd^2)+(bd^2))
  381.       if dist>distt then:dist=distt:ik=c:end if
  382.       end if
  383.     next
  384.   mink[x1,y1]=ik:mppr[x1,y1]=pp
  385.  
  386.  
  387.   ink (paleta[pp]):bar((xed*4)+x1*8,y1*8,7+(xed*4)+x1*8,7+(y1*8))
  388.   ink (paleta[ik]):bar(4+(xed*4)+x1*8,1+(y1*8),6+(xed*4)+x1*8,5+(y1*8))
  389.  
  390.   next:next
  391.  
  392. for y1=0 to 24:for x1=0 to 39
  393.   u1=point((xed*4)+(x1*8),y1*8)
  394.   b1=u1 mod 256:u1=int(u1/256)
  395.   g1=u1 mod 256:u1=int(u1/256)
  396.   r1=u1 mod 256:u1=int(u1/256)
  397.   w1=int(((b1*11)+(r1*30)+(g1*59))/100)
  398.   u2=point(4+(xed*4)+(x1*8),2+(y1*8))
  399.   b2=u2 mod 256:u2=int(u2/256)
  400.   g2=u2 mod 256:u2=int(u2/256)
  401.   r2=u2 mod 256:u2=int(u2/256)
  402.   w2=int(((b2*11)+(r2*30)+(g2*59))/100)
  403.   if w2<w1 then:tmz=w1:w1=w2:w2=tmz:end if
  404.   dw=w2-w1:if dw<1 then:dw=1:end if
  405.    
  406.   for y2=0 to 2: for x2=0 to 1
  407.     y=(y1*2)+y2:x=(x1*2)+x2
  408.     u3=(point(x+160,y+yed2a+50))mod 256
  409.     u4=int(((u3-w1)*255)/dw)
  410.     if u4<0 then:u4=0:end if
  411.     if u4>255 then:u4=255:end if
  412.     ink(rgb(u4,u4,u4))
  413.     dot(x+160,y+yed2a)
  414.     next:next
  415.  
  416.   next:next
  417.  
  418. for y1=0 to (yed/2)-1:for x1=0 to (xed/2)-1:dfi=65536:fgx=0:fgy=0:chid=0
  419.  
  420.   for yq=0 to 31:for xq=0 to 15:cnt=0
  421.     for y2=0 to 2:for x2=0 to 1
  422.       q1=bitwiseand(point(160+(x1*2)+x2,yed2a+(y1*2)+y2),255)
  423.       q2=bitwiseand(point(128+(xq*2)+x2,yed2a+0+(yq*2)+y2),255)
  424.       dq=abs(q2-q1):cnt=cnt+dq
  425.       next:next
  426.     if cnt<dfi then:dfi=cnt:fgx=xq:fgy=yq:end if
  427.     next:next
  428.  
  429.   mchr[x1,y1]=fgx+(fgy*16)
  430.  
  431.   for y2=0 to 7:for x2=0 to 7
  432.     c=point((fgx*8)+x2,yed2a+(fgy*8)+y2):ink(c):dot((x1*8)+x2,(y1*8)+y2)
  433.     ink(point((xed*4)+(x1*8)+4,(y1*8)+2))
  434.     if (c mod 256)>128 then:ink(point((xed*4)+(x1*8),(y1*8))):end if
  435.     dot((x1*8)+x2+(xed*4),(y1*8)+y2+(yed*4))
  436.     next:next:next:next
  437.  
  438. open "_t_out_cge.txt" for output as #1
  439. for y1=0 to 24:for x1=0 to 39
  440.   print #1,str$(mchr[x1,y1])+","
  441.   next:next
  442. for y1=0 to 24:for x1=0 to 39
  443.   print #1,str$(mink[x1,y1])+","
  444.   next:next
  445. for y1=0 to 24:for x1=0 to 39
  446.   print #1,str$(mppr[x1,y1])+","
  447.   next:next
  448. close #1
  449.  
  450. open "_t_out_cge.txt" for input as #1
  451. open "out_cge.txt" for output as #2
  452. while eof(1)=0
  453.   u=readbyte(1)
  454.   if u<>0x0A then:writebyte(2,u):end if
  455. wend
  456. close #1:close #2
  457. shell("rm _t_out_cge.txt")
  458. shell("mv out_cge.txt "+finp$+".txt")
  459.  
  460. '  fout$=finp$+".bmp":grab (1,0,0,xed2a,yed2a):saveimage (fout$,1)
  461.   fout$=finp$+".bmp":grab (1,0,0,xed2disp2,yed2disp2):saveimage (fout$,1)
  462.  
  463. '- unix only (?) - needs imagemagick installed
  464.   shell("convert "+fout$+" "+finp$+".png"):shell("rm "+fout$+" "+finp2$+" "+finp3$)  
  465.  
  466. setcaption("exit pressing any key")
  467. waitkey
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top