home *** CD-ROM | disk | FTP | other *** search
/ APDL DTP 1 / DTP1.iso / _cdview / cdview (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1996-04-29  |  16.4 KB  |  526 lines

  1.  --> CD Catalogue
  2.  This program and all documentation 
  3.  David Holden 1995
  4. A_$="1.00":
  5. 262343,D_%,E_%
  6. G_%:A%=1:B%=E_%:G%=H_%:H%=I_%:
  7. 262341,,E_%
  8. 262351,,L_%+100:
  9. L_%?108=4
  10. :E_%!100=K_%:
  11. 262342,,E_%+100:M_%=N_%:O_%=P_%:Q_$=$R_%
  12. 262342,,E_%:I%=
  13. T_(0)
  14. 262342,,E_%:E_%!4=0:
  15. 262340,,E_%:I%=
  16. T_(0)
  17. 262342,,E_%
  18. W_(X_%,Y_%)
  19. 262364,E_%!24
  20. 17,18:
  21. E_%!16
  22. 262351,,E_%+&C0:c_%=E_%!&C8:d_%=E_%!&C4:
  23. E_%!4=-1
  24. 0:!E_%=G_%:
  25. 262342,,E_%:!E_%=U_%:
  26. 262342,,E_%:$e_%="CDview Help":
  27. f_(g_$+".!Help")
  28. c_%=1
  29. 262356,,h_%,i_%,j_%
  30. k_%,l_%:i_%=!E_%:d_%=E_%!4:c_%=E_%!8:l_%=E_%!12:k_%=E_%!16:
  31. k_%=m_%
  32. 1:P_%=O_%:N_%=M_%:$R_%=Q_$:
  33. n_(P_%)
  34. 2:j_%=228:
  35. 262356,,h_%,i_%-60,j_%
  36. 4:P_%=o_%+1:N_%=48:
  37. $(o_%+4)=".^" $R_%=g_$+".^"
  38. $R_%=$(o_%+4)
  39. n_(P_%)
  40. 263872:
  41. p_(k_%)
  42. 64,16:I%=
  43. q_(k_%,P_%)+1:
  44. :I%+=1:
  45. ?I%>32:r_$=$R_%+"."+$I%:
  46. s_(K_%,k_%)
  47. &416,&404:I%=
  48. q_(k_%,P_%)+1:
  49. :I%+=1:
  50. ?I%>32:r_$=$R_%+"."+$I%
  51. 263873
  52. N_%=48
  53. 263872:A%=4:B%=P_%:C%=N_%:P_%=
  54. (J_%):N_%=P_%?1:I%=R_%+
  55. ($R_%):
  56. ?I%<>46:I%-=1:
  57. :?I%=13:
  58. n_(P_%):
  59. 263873:
  60. q_(i%,p%):
  61. t_%:t_%=i%:p%=
  62. u_(p%):
  63. t_%>0:
  64. ?p%<>N_%:p%=
  65. u_(p%):
  66. u_(p%)
  67. u_(p%)
  68. :t_%-=1:
  69. p_(i%):
  70. v_%,t_%,x%,y%,w_%:
  71. q_(i%,P_%):
  72. ">":P_%=v_%:N_%+=1:v_%+=2:
  73. ?v_%<32:v_%+=1:
  74. :$R_%=$R_%+"."+$v_%:
  75. n_(P_%)
  76. x_(K_%,i%,0):I%=v_%+1:
  77. :I%+=1:
  78. ?I%>32:$e_%=$I%:r_$=$R_%+"."+$e_%:!E_%=G_%:
  79. 262342,,E_%:!E_%=U_%:
  80. 262342,,E_%:I%=
  81. T_(0):
  82. ?v_%<>
  83. !y_%=U_%:
  84. 262348,,y_%:$(y_%!76)=$e_%:
  85. 53,-1,11
  86. ,,x%:
  87. 53,-1,4
  88. ,,w_%:x%=x%<<w_%:
  89. 53,-1,12
  90. ,,y%:
  91. 53,-1,5
  92. ,,w_%:y%=y%<<w_%:!E_%=0:E_%!4=-(y%-40):E_%!8=x%-32:E_%!12=0:
  93. 262359,U_%,E_%
  94. z_(&D94,r_$)
  95. f_(r_$)
  96. z_(&AFF,r_$)
  97. z_(&FF9,r_$)
  98. f_(__$):
  99. 8,17,__$
  100. F%,,,,I_%:
  101. 1)<>1 I%=
  102. A`(1,"File not found."):
  103. T_(I_%+20)=
  104. A`(1,"Not enough memory available to load this file"):
  105. !y_%=G_%:
  106. 262348,,y_%:$(y_%!76)=$e_%:
  107. 8,16,__$,H_%,0:H_%!I_%=&0A0A0A0A:A%=2:B%=H_%:C%=I_%:`_%=
  108. (J_%):!E_%=0:E_%!4=-`_%:E_%!8=1232:E_%!12=0:
  109. 262359,G_%,E_%:!E_%=G_%:
  110. 262347,,E_%:E_%!20=0:E_%!24=0:E_%!28=-1:
  111. 262341,,E_%:
  112. n_(p%):
  113. B`%,C`%,a$:B`%=-20:C`%=0:
  114. 263872:!y_%=K_%:
  115. 262348,,y_%:I%=y_%!88:
  116. I%>=0:!L_%=K_%:L_%!4=I%-1:
  117. 262340,,L_%:I%-=1:
  118. :I%=R_%+
  119. ($R_%):
  120. ?I%<>46:I%-=1:
  121. :I%+=1:a$=$I%:
  122. a$="^" a$="$"
  123. U$(y_%!76)=a$:p%=
  124. u_(p%):
  125. 4:L_%!(I%+4)=D`%!I%:
  126. :!L_%=K_%:
  127. ?p%>=N_%:
  128. p%?1=N_%+1
  129. E`(F`%,p%+2)
  130. :A%=3:B%=p%:C%=N_%:p%=
  131. (J_%)
  132. E`(F`%+64,p%+1):p%=
  133. u_(p%)
  134. E`(F`%+16,p%+1):p%=
  135. u_(p%)
  136. E`(F`%+32,p%+1):p%=
  137. u_(p%)
  138. E`(F`%+48,p%+1):p%=
  139. u_(p%)
  140. u_(p%)
  141. :B`%=-(C`%
  142. 2+C`%
  143. 2)*40-20:
  144. B`%>G`% B`%=G`%
  145. !L_%=0:L_%!4=B`%:L_%!8=274:L_%!12=0:
  146. 262359,K_%,L_%:!y_%=K_%:
  147. 262348,,y_%+1:y_%!24=0:y_%!28=-1:
  148. 262341,,y_%:
  149. 262353,-1,y_%!4,y_%!8,y_%!12,y_%!16+40:
  150. 263873:
  151. E`(i%,p%):
  152. ?p%<32:p%+=1:
  153. :L_%!24=p%:L_%!28=i%:
  154. 262338,,L_%:
  155. L_%!4>200
  156. >L_%!8=L_%!8-40:L_%!16=L_%!16-40:L_%!4=8:L_%!12=272:B`%-=40
  157. :L_%!4=276:L_%!12=542
  158. :C`%+=1:
  159. 8,17,g_$+".Cat_File"
  160. F%,,,,I_%:
  161. 1)<>1 I%=
  162. A`(1,"No catalogue data found - unable to continue"):
  163. I`% I_%+&20:
  164. 8,16,g_$+".Cat_File",I`%,0:A%=0:B%=I`%:C%=I_%:
  165. J_%:J`$=$I`%:o_%=
  166. u_(I`%):P_%=o_%+1:O_%=P_%:N_%=48:M_%=N_%:
  167. $(o_%+4)=".^" $R_%=g_$+".^"
  168. $R_%=$(o_%+4)
  169. MQ_$=$R_%:!E_%=K_%:
  170. 262347,,E_%:G`%=E_%!8-E_%!16:
  171. n_(P_%):
  172. 262341,,E_%:
  173. s_(w%,i%):X_%=w%:Y_%=i%:!E_%=w%:
  174. 262347,,E_%:X%=E_%!4-E_%!20:Y%=E_%!16-E_%!24:E_%!4=i%:
  175. 262350,,E_%:!E_%=w%:E_%!4=5:E_%!8=E_%!8+X%:E_%!12=E_%!12+Y%:E_%!16=E_%!16+X%:E_%!20=E_%!20+Y%:E_%!24=0:E_%!28=0
  176. 5E_%!32=&7FFFFFFF:E_%!36=&7FFFFFFF:
  177. 262352,,E_%:
  178. W_(w%,i%):
  179. e_$:E_%!&80=w%:E_%!&84=i%:
  180. 262350,,E_%+&80:I%=(E_%!&9C):
  181. $(I%),"."):I%+=1:
  182. :e_$=$(I%):
  183. 262351,,E_%:E_%!20=E_%!12:E_%!24=E_%!16:E_%!28=!E_%:E_%!32=E_%!4:E_%!16=1:$(E_%+44)=e_$:!E_%=(
  184. (e_$)+49)
  185. 3:E_%!12=0
  186. 262375,17,E_%,E_%!20,E_%!24:
  187. f$,d$,i$,i%:
  188. i%=E_%+44:
  189. ?i%>31:i%+=1:
  190. ?i%<>46:i%-=1:
  191. :?i%=13:d$=$(E_%+44):$L_%=r_$:i%=L_%+
  192. ?i%<>46:i%-=1:
  193. :?i%=13:f$=$L_%:!y_%=K_%:
  194. 262348,,y_%:i%=y_%!88:
  195. i%>=0:
  196. K`(K_%,i%)=
  197. Gi$="."+
  198. L`(K_%,i%):
  199. "copy "+f$+i$+" "+d$+i$+" RQ~V~C":
  200. x_(K_%,i%,0)
  201. :i%-=1:
  202. x_(w%,i%,s%):!L_%=w%:L_%!4=i%:L_%!8=s%<<21:L_%!12=1<<21:
  203. 262349,,L_%:
  204. L`(w%,i%):!L_%=w%:L_%!4=i%:
  205. 262350,,L_%:I%=(L_%!28):
  206. ?I%>31:I%+=1:
  207. :?I%=13:=$(L_%!28)
  208. K`(w%,i%):!L_%=w%:L_%!4=i%:
  209. 262350,,L_%:
  210. (L_%!24
  211. 1<<21):=
  212. T_(M`%):
  213. 262380,N`%+M`%,-1
  214. e%>=(N`%+M`%):=
  215. 262380,N`%,-1:=
  216. P`,Q`,R`,S`,m%:Q`=1:P`=2:S`=4:R`=&80:
  217. T`%&200:m%=T`%:h_%=
  218. U`(m%,"CDview",180):m%=
  219. V`("Help",0,0):m%=
  220. V`("Info",0,W`%):m%=
  221. V`("Quit",R`,0):
  222. U` (a%,X`$,Y`%):$a%=X`$:a%!12=&70207:a%!16=Y`%:a%!20=40:a%!24=0:m%=a%+28:=a%
  223. V` (Z`$,a`%,b`%):!m%=a`%:m%!4=b`%:m%!8=&7000001:$(m%+12)=Z`$:=m%+24
  224. c` (d`$,e`%,f`$):
  225. g`% 24:$g`%="s!"+d`$:$(g`%+16)=f`$:!E_%=e`%:E_%!4=0:E_%!8=-24:E_%!12=80:E_%!16=80:E_%!20=&1700210B:E_%!28=g`%:E_%!24=g`%+16:E_%!32=8:
  226. 262338,,E_%
  227. I%:=I%
  228. u_(p%):
  229. :p%+=1:
  230. ?p%=10
  231. ?p%=13:=p%+1
  232. C_(h`$,i`%):
  233. 263874:D_%=&C31:!L_%=
  234. :$(L_%+4)="Error "+
  235. )+": "+h`$++
  236. 262367,L_%,1,j`%:
  237. 262365,k`%,&4B534154:
  238. A`(l`%,a$):L_%!&80=0:$(L_%+&84)=a$+
  239. 262367,L_%+&80,16
  240. l`%,j`%
  241. ,I%:=I%
  242. J_%&500:
  243. 2:P%=J_%:[OPT n`:adr r8,o`:mov r0,r0,lsl#2:ldr pc,[r8,r0]:.p` equd 0;return data at code%+12:equd 0
  244. l/.o` equd q`:equd r`:equd s`:equd t`:equd S_
  245. ; r1=ptr, r2=level, exit with r0=ptr:.t`:mov r0,r1;put ptr in r0 ready for return:.u` ldrb r1,[r0],#1;look for line beginning with 'level' charater:cmp r1,#13:cmpne r1,#10:bne u`:ldrb r1,[r0]:cmp r1,r2:bne u`
  246. }e.u` ldrb r1,[r0],#1;skip the line with the level number:cmp r1,#13:cmpne r1,#10:bne u`:mov pc,r14
  247. ; r1=ptr, r2=level, exit with r0=ptr:.S_ mov r0,r1;transfer ptr to r0:.u` ldrb r1,[r0,#-1]!;look for end of prev line:cmp r1,#13:bne u`:ldrb r1,[r0,#1];get sol char:cmp r1,#62;if it's not '>' carry on:bne u`
  248. uldrb r1,[r0,#2];get char after '>':cmp r1,r2;if it's < level all done:bge u`:add r0,r0,#1;point to sol:mov pc,r14
  249. ;enter with r1 points to text, r2=length:.s` add r2,r1,r2:mov r0,#32;start with 32 in case there's no final cr:.u` ldrb r3,[r1],#1:cmp r1,r2:movgt pc,r14:cmp r3,#10:cmpne r3,#13:bne u`:ldrb r11,[r1];get char after eol
  250. Badd r11,r11,r3:cmp r11,#23:addeq r1,r1,#1:add r0,r0,#32:bal u`
  251. ;enter with r1 points to text, r2=length:.q` add r2,r1,r2:.u` ldrb r0,[r1],#1:cmp r0,#10:moveq r0,#13:streqb r0,[r1,#-1]:cmp r1,r2:blt u`:mov pc,r14
  252. ;enter with r1=blk, r6=text, r7=text length:.r` stmfd r13!,{r14}:add r7,r7,r6;r7 now = end of text:ldr r2,v`;get window handle:str r2,[r1]:swi "Wimp_RedrawWindow":.w` cmp r0,#0:ldmeqfd r13!,{pc}:ldr r0,[r1,#4]:ldr r2,[r1,#20]
  253. asub r8,r0,r2:add r8,r8,#16:ldr r0,[r1,#16]:ldr r2,[r1,#24]:sub r9,r0,r2;r9 = top of work area
  254. ldr r3,[r1,#40];get top of graphics window:sub r3,r9,r3;r3 = offset from top:mov r3,r3,lsr#5;divide by 32 = number of lines:mov r2,r3,lsl#5:sub r9,r9,r2:mov r2,r6;point to text:subs r3,r3,#1:bmi x`
  255. .y` ldrb r0,[r2],#1;count down to required line:cmp r0,#13:cmpne r0,#10:bne y`:ldrb r11,[r2];get char after eol in r11:add r11,r11,r0;add to eol char:cmp r11,#23:addeq r2,r2,#1;if sum=23 it's cr/lf so inc r2:subs r3,r3,#1
  256. bpl y`
  257. .x` ldr r4,[r1,#40];get graphics window max y:ldr r3,[r1,#32];get graphics window min y:sub r5,r4,r3;r5=height:mov r5,r5,lsr#5;divide by 5 = num lines:add r5,r5,#1;+1:sub r9,r9,#4;allow 4 points gap at top:bl z`
  258. z._` cmp r2,r7:bgt ``;at end of text:ldrb r0,[r2],#1:cmp r0,#31:swigt "OS_WriteC":bgt _`:cmp r0,#10:cmpne r0,#13:beq Aa
  259. ;check for tab here
  260. bal _`
  261. .Aa ldr r11,[r2];get char after eol in r11:add r11,r11,r0;add to eol char:cmp r11,#23:addeq r2,r2,#1;if sum=23 it's cr/lf so inc r2:subs r5,r5,#1;dec line count:bmi ``;graphics window redrawn, get next
  262. bsub r9,r9,#32;move down a line:bl z`:bal _`;print next line:.`` swi "Wimp_GetRectangle":bal w`
  263. .z` swi 256+25:swi 256+4:mov r0,r8:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":mov r0,r9:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":movs pc,r14
  264. .v` equd G_%
  265. .Ba% equd 0:.Ca% equd 0:.Da% equd 0:.Ea% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Fa% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ga% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0
  266. equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ha% equd 0:.Ia% equd 0:.Ja% equd 0:.Ka% equd-1:.La% equd 0:.Ma% equd 0:.Na% equd 0:.Oa% equd 0:.Pa% equd 0:.Qa% equd 255
  267. 2<equs "Unable to resize block for ArtWorks!":equb 0:align
  268. .Ra cmp r11,#0:stmfd r13!,{r4-r8,r14}:andne r5,r15,#(%1101<<28):teqnep r15,r5:ldmnefd r13!,{r4-r8,pc}:mov r1,#0:sub r1,r1,#1:cmp r0,r1:beq Sa:ldmltfd r13!,{r4-r8,pc}:.Ta str r0,Ba%:ldr r3,Ia%:sub r3,r3,#&8000:add r3,r3,r0
  269. mov r0,r3:swi "Wimp_SlotSize":cmp r3,r0:bgt Ua:ldr r0,Ia%:ldr r1,Ba%:str r1,Ja%:ldr r2,Ka%:ldr r3,La%:and r5,r15,#(%111<<29):
  270.  make sure V is clear
  271. teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Ua:adr r0,Qa%:orr r5,r15,#1<<28:teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Sa:ldr r0,Ia%:ldr r1,Ja%:ldr r2,Ka%:ldr r3,La%:ldmfd r13!,{r4-r8,pc}:.Ca stmfd r13!,{r14}:swi "XAWRender_FileInitAddress"
  272. str r0,Ca%:ldr r0,Ia%:mov r12,r1:adr r1,Ra:ldr r2,Ja%:adr r14,Va:ldr pc,Ca%:.Va swivs "OS_GenerateError":str r0,Ja%:ldmfd r13!,{pc}:.Da stmfd r13!,{r14}:swi "XAWRender_RenderAddress":str r0,Da%:ldr r0,Ka%:mov r12,r1
  273. adr r1,Ea%:adr r2,Fa%:adr r3,Ga%:ldr r4,Ia%:adr r5,Ra:ldr r6,Ha%:mov r7,#0:adr r14,Wa:ldr pc,Da%:.Wa swivs "OS_GenerateError":ldmfd r13!,{pc}:.Xa stmfd r13!,{r14}:ldr r0,Ka%:swi "XAWRender_DocBounds":str r2,Ma%:str r3,Na%
  274. |/str r4,Oa%:str r5,Pa%:ldmfd r13!,{pc}:]:
  275. Ya (Za%):
  276. aa% Za%,ba%&100:E%=aa%+Za%:
  277. 262361,,g_$+".templates":
  278. 262363,,H_%,aa%,E%,-1,"info",0
  279. ,,R%:
  280. 262337,,H_%
  281. 262363,,H_%,R%,E%,-1,"file",0
  282. ,,R%:
  283. 262337,,H_%
  284. 262363,,H_%,R%,E%,-1,"text",0
  285. 262337,,H_%
  286. 262363,,H_%,R%,E%,-1,"pic",0
  287. ,,R%:
  288. 262337,,H_%
  289. 262362:!E_%=W`%:E_%!4=1:
  290. 262350,,E_%:$(E_%!28)=ca$:!E_%=W`%:E_%!4=2:
  291. 262350,,E_%:$(E_%!28)=da$:!E_%=W`%:E_%!4=3:
  292. 262350,,E_%:$(E_%!28)=ea$
  293. E!E_%=K_%:E_%!4=0:
  294. 262350,,E_%:J%=E_%+8:
  295. 32:D`%!I%=J%!I%:
  296. 262336,200,&4B534154,"CDview"
  297. fa%,k`%:
  298. fa%<300
  299. 0,"This program requires RISC-OS 3 or better":
  300. E_%&180,L_%&100,j`% 24,R_%&100,e_% 15:
  301. D`%&28,F`%&60,y_%&B000:$j`%="CDview":
  302. $+" During initialisation",
  303. -&8000:H_%=
  304. 35,"CD1View$Dir",E_%,256,0,3
  305. ,,I%:E_%?I%=13:g_$=$E_%:
  306. T_(&1000)=
  307. A`(1,"Not enough memory available to run !CDview"):
  308. Ya(&400):
  309. H`:m_%=
  310. c`("CDview",-1,J`$):
  311. O`:I%=
  312. T_(0):
  313. ga:$F`%="Ssmall_dir":$(F`%+16)="Ssmall_FFF":$(F`%+32)="Ssmall_FF9":$(F`%+48)="Ssmall_AFF":$(F`%+64)="Ssmall_D94":$(F`%+80)="Ssmall_FF9":ca$="CDview v0.13":da$="David Holden":ea$="
  314.  A.P.D.L. 1995":D_%=%110000110001:G`%=-550
  315. ha%&300,ia 24,ja% 13,ka% 15,la% 255:
  316. ma:na%=
  317. z_(oa%,pa$):
  318. qa%,ra%,sa%:
  319. ta%,d`%,ua%:
  320.  Get file length
  321. 131080,5,pa$
  322. ,,,,I_%:!y_%=U_%:
  323. 262348,,y_%:
  324.  If window has an icon, delete it
  325. y_%!88>0
  326. ,!E_%=U_%:E_%!4=0:
  327. 262340,,E_%:I%=
  328. T_(0)
  329.  Get size of window
  330. Iqa%=y_%!12-y_%!4:ra%=y_%!16-y_%!8:
  331.  Calculate space needed for sprite
  332. Lsa%=
  333. va(qa%,
  334. ,ta%):
  335.  Grab space, initialise sprite area(s) and load file
  336. T_(ta%+I_%+8)=0 I%=
  337. A`(1,"Not enough memory available to load this file"):
  338. /d`%=H_%:ua%=d`%+ta%:
  339. wa(d`%,ta%):
  340. oa%=&FF9
  341. wa(ua%,I_%+8):
  342. 46,10+256,ua%,pa$
  343. 131080,255,pa$,ua%
  344.  Make the sprite
  345. xa(oa%,ua%,I_%,$e_%,d`%,sa%,
  346. ya(d`%,
  347.  Add the sprite to the window
  348. !E_%=U_%:E_%!4=0:E_%!12=qa%:E_%!8=-qa%:E_%!16=0:E_%!20=&0700A11A:E_%!24=e_%:E_%!28=d`%:E_%!32=
  349. ($e_%):
  350. 262338,,E_%:
  351.  Open the window
  352. c!E_%=U_%:
  353. 262347,,E_%:E_%!28=-1:
  354. 262341,,E_%:
  355. 262353,-1,E_%!4,E_%!8,E_%!4+qa%,E_%!8+qa%+40:
  356. xa(oa%,za%,_a%,`a$,Ab%,Bb%,Cb%):
  357. r0%,r1%,r2%,r3%:
  358. Db%,Eb%,I%:
  359. Fb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%:
  360. Mb(Cb%,Fb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%):
  361. Fb%>=63 Db%=0
  362. Db%=1
  363.  Create a sprite
  364. 131118,15+256,Ab%,`a$,Db%,Bb%
  365. Hb%,Bb%
  366. Jb%,Cb%:
  367.  Divert output to it
  368. g!ha%=0:
  369. 131118,60+256,Ab%,`a$,ha%
  370. r0%,r1%,r2%,r3%:
  371. 46,r0%,r1%,r2%,r3%:I%=
  372. T_(0):
  373.  Give the sprite a palette (if less than 63 colours)
  374. 131118,24+256,Ab%,`a$
  375. ,,Eb%:
  376. 4:Eb%!(44+I%*2)=Nb%!I%:Eb%!(44+I%*2+4)=Nb%!I%:
  377. 4:Eb%!(44+I%*2)=Ob%!I%:Eb%!(44+I%*2+4)=Ob%!I%:
  378. 4:Eb%!(44+I%*2)=Pb%!I%:Eb%!(44+I%*2+4)=Pb%!I%:
  379. 264016:
  380.  Make white background
  381. Qb(&FFFFFF00):
  382. 0,0,Bb%:
  383.  Call appropriate sub-routine
  384. &FF9:
  385. Rb(za%,1,Cb%,0,0,Bb%,Bb%)
  386. &AFF,&CC3:
  387. Sb(za%,Bb%,_a%)
  388. &D94:
  389. Tb(za%,Bb%,_a%)
  390.  Restore output back to screen
  391. 46,r0%,r1%,r2%,r3%:
  392. 264016:
  393. A`(1,"Unable to display this Artworks file."):na%=
  394. Rb(Ub%,Vb%,Cb%,Wb%,Xb%,Yb%,Zb%):
  395. ab%,bb%,cb%,Fb%,Gb%,db%,Ib%,eb%,Kb%,Lb%,Hb%,Jb%:
  396. fb,gb,hb,ib,jb,kb,lb%:
  397. mb%,nb%,ob%,pb%,qb%:
  398. 46,13+256,Ub%,ja%,13,Vb%:
  399. 131118,40+256,Ub%,ja%
  400. ,,,ab%,bb%,,cb%
  401. Mb(cb%,ob%,Gb%,db%,Ib%,eb%,Kb%,Lb%):fb=ab%*db%:ka%!0=db%*256:gb=bb%*eb%:ka%!4=eb%*256:
  402. fb<>0
  403. gb<>0
  404. !*hb=Yb%/fb:ib=Zb%/gb:
  405. hb<ib ib=hb
  406. hb=ib
  407. Mb(Cb%,pb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%):
  408. hb<>0 ka%!8=Hb%*256/hb
  409. ib<>0 ka%!12=Jb%*256/ib
  410. 46,24+256,Ub%,ja%
  411. ,,lb%:
  412. lb%!32<>44
  413. lb%!32-52
  414. 8:rb%!(I%/2)=lb%!(I%+44):
  415. :mb%=rb%
  416. 15:mb%=Nb%
  417. 3:mb%=Ob%
  418. 1:mb%=Pb%
  419. :mb%=0
  420. 15:nb%=Nb%
  421. 3:nb%=Ob%
  422. 1:nb%=Pb%
  423. :nb%=0
  424. ob%>255
  425. <    qb%=0
  426. :qb%=la%:
  427. lb%!32<>44+2048
  428. 264000,cb%,mb%,Cb%,nb%,la%
  429. 264006,mb%!(Q%<<2),Cb%,nb%
  430. la%?Q%:
  431. :jb=(Yb%-hb*fb)/2+Wb%:kb=(Zb%-ib*gb)/2+Xb%:
  432. 46,52+256,Ub%,ja%,jb,kb,8,ka%,qb%
  433. Sb(za%,Bb%,_a%):
  434. fb,gb,hb,ib,jb,kb:
  435.  not Points%
  436. Ojsb=za%!24:tb=za%!28:ub=za%!32:vb=za%!36:fb=(ub-sb)
  437. 256:gb=(vb-tb)
  438. 256:wb%=sb
  439. 256:xb%=tb
  440. fb=0 fb=1
  441. gb=0 gb=1
  442. Y*hb=Bb%/fb:ib=Bb%/gb:
  443. hb<ib ib=hb
  444. hb=ib
  445. yb=hb:jb=(Bb%-hb*fb)/2:kb=(Bb%-ib*gb)/2:zb=&10000*yb:_b=zb/&10000:ia!0=zb:ia!4=0:ia!8=0:ia!12=zb:ia!16=jb*&100-sb*_b:ia!20=kb*&100-tb*_b:
  446. 415040,0,za%,_a%,ia,0:
  447. Tb(`b%,Bb%,I_%):
  448. `b%!4>10
  449. !Ia%=`b%:!Ja%=I_%:!Ka%=-1:!La%=I_%:
  450. Ca:!Ka%=!Ia%:!La%=!Ja%:!Ia%=!Ka%+!La%:!Ja%=0:
  451. Xa:!Ea%=0:Ea%!4=0:Ea%!8=!Ma%:Ea%!12=!Na%:Ea%!16=!Oa%:Ea%!20=!Pa%:fb=!Oa%-!Ma%:gb=!Pa%-!Na%:
  452. fb=0 fb=1
  453. gb=0 gb=1
  454. %hb=Bb%*256/fb:
  455. hb>=&7FFF
  456. hb=&7FFF
  457. %ib=Bb%*256/gb:
  458. ib>=&7FFF
  459. ib=&7FFF
  460. hb<ib ib=hb
  461. hb=ib
  462. !Fa%=&10000*hb:Fa%!4=0:Fa%!8=0:Fa%!12=&10000*hb:Fa%!16=(Bb%*256-fb*hb)/2-!Ma%*hb:Fa%!20=(Bb%*256-gb*hb)/2-!Na%*hb:
  463. ,Fb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%):!Ga%=Gb%:Ga%!4=Ib%:Ga%!8=Kb%:
  464. 1:Ac%=Bc%
  465. 3:Ac%=Cc%
  466. 15:Ac%=Dc%
  467. :Ac%=Ec%
  468. 4:!(Ga%+12+I%)=Ac%!I%:
  469. :!Ha%=110:
  470. 263872:
  471. 263874:
  472. va(Fc%,Gc%,
  473. Hc%):
  474. Fb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%:
  475.  X OS Units Per Word
  476. Mb(Gc%,Fb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%):Ic%=Hb%*8/Lb%*4:
  477. Ic%<>0
  478. Fc%=((Fc%
  479. Ic%)+1)*Ic%
  480. :Hc%=((Fc%/Hb%*Fc%/Jb%)*Lb%/8-(Lb%=8)*512+256):
  481. Gc%=2
  482. Gc%=4
  483. Gc%=5
  484. Gc%=10
  485. Hc%=Hc%*2
  486. ya(Jc%,Gc%):
  487. za%,J%,I%:
  488. 53,Gc%,3
  489. ,,Fb%:za%=Jc%+Jc%!8:
  490. Jc%!4:
  491. 4:za%!(44+I%*2)=Nb%!I%:za%!(44+I%*2+4)=Nb%!I%:
  492. 4:za%!(44+I%*2)=Ob%!I%:za%!(44+I%*2+4)=Ob%!I%:
  493. 4:za%!(44+I%*2)=Pb%!I%:za%!(44+I%*2+4)=Pb%!I%:
  494. :za%+=!za%:
  495. wa(S%,_a%):!S%=_a%:S%!8=16:
  496. 46,9+256,S%:
  497. Mb(Gc%,
  498. Lb%):
  499. 53,Gc%,3
  500. ,,Kc%:
  501. 53,Gc%,4
  502. ,,Gb%:Hb%=1<<Gb%:
  503. 53,Gc%,5
  504. ,,Ib%:Jb%=1<<Ib%:
  505. 53,Gc%,9
  506. ,,Kb%:Lb%=1<<Kb%:
  507. Qb(Lc):
  508. 264005,Lc,
  509. 3)<<6
  510. Nc(Oc%):
  511. c%,p%:
  512. 53,Oc%,3
  513. ,,c%:
  514. 15:p%=Nb%
  515. 3:p%=Ob%
  516. 1:p%=Pb%
  517. :p%=0
  518. 256(m%):
  519. 53,m%,3
  520. ,,c%:=(c%>=63)
  521. Nb% 80,Ob% 80,Pb% 80,Qc% 320,rb% 1023:
  522. 8,255,g_$+".Pal16",Nb%:
  523. 8,255,g_$+".WimpPals",Qc%:Bc%=Qc%:Cc%=Bc%+80:Dc%=Cc%+80:Ec%=Dc%+80:
  524. 1:Pb%!(4*(1-I%))=(&FFFFFF*I%)<<8:
  525. 3:Ob%!(4*(3-I%))=(&555555*I%)<<8:
  526.