Home » Archimedes archive » Acorn User » AU 1998-05 A.adf » EasyAnim » !EasyAnim/Resources/DrawConv/!RunImage
!EasyAnim/Resources/DrawConv/!RunImage
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1998-05 A.adf » EasyAnim |
Filename: | !EasyAnim/Resources/DrawConv/!RunImage |
Read OK: | ✔ |
File size: | 0F66 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM > DrawConv v1.37 20REM LEN Nicholas Marriott 1996 30REM 40REM How the hell do you do this in assembly language? 50REM FP instructions, maybe. 60REM 70REM NEWS UPDATE - As of 13/1/97 I have learnt how to 80REM use the FP instruction set... but 90REM do not expect an ARM version soon. 100REM 110: 120ON ERROR SYS "XARMLib_Message",1,messages%: ERROR EXT ERR,REPORT$: END 130: 140SYS "ARMLib_Message",0,"<DrawConv$Dir>.Messages" TO messages% 150: 160SYS "XOS_Module",18,"DrawFile" TO ;flags% 170IF (flags% AND 1)=1 PROC_Error("BadModule") 180: 190DIM buffer% 1024 200SYS "XOS_GetEnv" TO env$;flags% 210IF (flags% AND 1)=1 PROC_Error("Syntax") 220pos%=INSTR(env$,CHR$(34),INSTR(env$,CHR$(34))+1) 230env$=RIGHT$(env$,LEN(env$)-pos%) 240args$="input/a/k,output/a/k,xsize/a/k/e,ysize/a/k/e,mode/k/e,background/k/e,name/k" 250SYS "XOS_ReadArgs",args$,env$,buffer%,1024 TO ;flags% 260IF (flags% AND 1)=1 PROC_Error("Syntax") 270: 280input$=FN_Zero(buffer%!0) 290output$=FN_Zero(buffer%!4) 300xsize%=(buffer%!8) 310xsize%=!(xsize%+1) 320ysize%=(buffer%!12) 330ysize%=!(ysize%+1) 340mode%=(buffer%!16) 350IF mode%<>0 mode%=!(mode%+1) ELSE mode%=13 360backg%=(buffer%!20) 370IF backg%<>0 backg%=(!(backg%+1))<<8 ELSE backg%=&FFFFFF00 380IF buffer%!24<>0 name$=FN_Zero(buffer%!24) ELSE name$="sprite" 390: 400IF input$="" PROC_Error("NoInput") 410IF output$="" PROC_Error("NoOutput") 420SYS "XOS_File",17,input$ TO type% 430IF type%<>1 PROC_Error("BadInput") 440IF xsize%<32 OR ysize%<32 PROC_Error("BadSize") 450SYS "XOS_CheckModeValid",mode% TO valid% 460IF valid%<0 PROC_Error("BadMode") 470: 480SYS "OS_File",17,input$ TO ,,,,drawsize% 490DIM drawfile% drawsize%, transfmatrix% 24, bbox% 16 500SYS "OS_File",255,input$,drawfile% 510: 520spritesize%=(xsize%*ysize%)+4096 530SYS "Wimp_SlotSize",-1,-1 TO slot% 540IF spritesize%>slot% PROC_Error("NoMemory") 550DIM spritefile% spritesize% 560spritefile%!0=spritesize% 570spritefile%!8=16 580SYS "OS_SpriteOp",256+ 9,spritefile% 590SYS "OS_SpriteOp",256+15,spritefile%,name$,0,xsize%,ysize%,mode% 600: 610MODE mode% 620SYS "XHourglass_On" 630: 640ON ERROR SYS "XARMLib_Message",1,messages%: SYS "XHourglass_Off": SYS "OS_SpriteOp",R0,R1,R2,R3: ERROR EXT ERR,REPORT$: END 650SYS "OS_SpriteOp",256+62,spritefile%,name$ TO ,,,savesize% 660DIM savearea% savesize%+8 670savearea%=(savearea% DIV 4)*4 680SYS "OS_SpriteOp",256+60,spritefile%,name$,savearea% TO R0,R1,R2,R3 690SYS "ColourTrans_SetGCOL",backg% 700RECTANGLE FILL 0,0,xsize%*4,ysize%*4 710PROC_DrawFile_Centre(drawfile%,drawsize%,0,0,xsize%*4,ysize%*4) 720SYS "OS_SpriteOp",R0,R1,R2,R3 730: 740SYS "OS_SpriteOp",256+12,spritefile%,output$ 750SYS "XHourglass_Off" 760: 770SYS "XARMLib_Message",1,messages% 780SYS "XWimp_CommandWindow",-1 790END 800: 810DEF PROC_Error(token$) 820SYS "ARMLib_Message",2,messages%,token$ TO error$ 830SYS "XARMLib_Message",1,messages% 840SYS "XHourglass_Smash" 850ERROR EXT 0,error$ 860END 870ENDPROC 880: 890DEF FN_Zero(pos%) 900str$="" 910WHILE ?pos%>31 920str$+=CHR$(?pos%) 930pos%+=1 940ENDWHILE 950=str$ 960: 970DEF PROC_DrawFile_Plot(drawfile%,drawfile_length%,originx%,originy%,scale) 980transfmatrix%! 0=scale*&10000 990transfmatrix%! 4=0 1000transfmatrix%! 8=0 1010transfmatrix%!12=scale*&10000 1020transfmatrix%!16=originx%*&100 1030transfmatrix%!20=originy%*&100 1040SYS "DrawFile_Render",0,drawfile%,drawfile_length%,transfmatrix%,0 1050ENDPROC 1060: 1070DEF PROC_DrawFile_Centre(drawfile%,drawfile_length%,rectlowx%,rectlowy%,recthighx%,recthighy%) 1080SYS "DrawFile_BBox",0,drawfile%,drawfile_length%,,bbox% 1090bboxlowx% =bbox%! 0/&100 1100bboxlowy% =bbox%! 4/&100 1110bboxhighx%=bbox%! 8/&100 1120bboxhighy%=bbox%!12/&100 1130xscale=(recthighx%-rectlowx%)/(bboxhighx%-bboxlowx%) 1140yscale=(recthighy%-rectlowy%)/(bboxhighy%-bboxlowy%) 1150IF xscale>yscale scale=yscale ELSE scale=xscale 1160scale=scale*0.95: REM Scale down by 5% to ensure fit 1170originx%=(rectlowx%+recthighx%)/2-(bboxhighx%+bboxlowx%)*scale/2 1180originy%=(rectlowy%+recthighy%)/2-(bboxhighy%+bboxlowy%)*scale/2 1190PROC_DrawFile_Plot(drawfile%,drawfile_length%,originx%,originy%,scale) 1200ENDPROC 1210: 1220
� > DrawConv v1.37 � � Nicholas Marriott 1996 � (7� How the hell do you do this in assembly language? 2� FP instructions, maybe. <� F6� NEWS UPDATE - As of 13/1/97 I have learnt how to P5� use the FP instruction set... but Z6� do not expect an ARM version soon. d� n: x5� � ș "XARMLib_Message",1,messages%: � � �,�$: � �Q: �?ș "ARMLib_Message",0,"<DrawConv$Dir>.Messages" � messages% �: �+ș "XOS_Module",18,"DrawFile" � ;flags% �)� (flags% � 1)=1 �_Error("BadModule") �: �� buffer% 1024 �!ș "XOS_GetEnv" � env$;flags% �&� (flags% � 1)=1 �_Error("Syntax") �$pos%=�env$,�(34),�env$,�(34))+1) �env$=�env$,�(env$)-pos%) �Wargs$="input/a/k,output/a/k,xsize/a/k/e,ysize/a/k/e,mode/k/e,background/k/e,name/k" �7ș "XOS_ReadArgs",args$,env$,buffer%,1024 � ;flags% &� (flags% � 1)=1 �_Error("Syntax") : input$=�_Zero(buffer%!0) "output$=�_Zero(buffer%!4) ,xsize%=(buffer%!8) 6xsize%=!(xsize%+1) @ysize%=(buffer%!12) Jysize%=!(ysize%+1) Tmode%=(buffer%!16) ^*� mode%<>0 mode%=!(mode%+1) � mode%=13 hbackg%=(buffer%!20) r:� backg%<>0 backg%=(!(backg%+1))<<8 � backg%=&FFFFFF00 |=� buffer%!24<>0 name$=�_Zero(buffer%!24) � name$="sprite" �: �"� input$="" �_Error("NoInput") �$� output$="" �_Error("NoOutput") �#ș "XOS_File",17,input$ � type% �"� type%<>1 �_Error("BadInput") �.� xsize%<32 � ysize%<32 �_Error("BadSize") �*ș "XOS_CheckModeValid",mode% � valid% �!� valid%<0 �_Error("BadMode") �: �*ș "OS_File",17,input$ � ,,,,drawsize% �5� drawfile% drawsize%, transfmatrix% 24, bbox% 16 �%ș "OS_File",255,input$,drawfile% �: $spritesize%=(xsize%*ysize%)+4096 $ș "Wimp_SlotSize",-1,-1 � slot% +� spritesize%>slot% �_Error("NoMemory") &� spritefile% spritesize% 0spritefile%!0=spritesize% :spritefile%!8=16 D'ș "OS_SpriteOp",256+ 9,spritefile% NCș "OS_SpriteOp",256+15,spritefile%,name$,0,xsize%,ysize%,mode% X: b� mode% lș "XHourglass_On" v: �h� � ș "XARMLib_Message",1,messages%: ș "XHourglass_Off": ș "OS_SpriteOp",R0,R1,R2,R3: � � �,�$: � �<ș "OS_SpriteOp",256+62,spritefile%,name$ � ,,,savesize% �� savearea% savesize%+8 �savearea%=(savearea% � 4)*4 �Eș "OS_SpriteOp",256+60,spritefile%,name$,savearea% � R0,R1,R2,R3 �#ș "ColourTrans_SetGCOL",backg% �ȓ Ȑ 0,0,xsize%*4,ysize%*4 �@�_DrawFile_Centre(drawfile%,drawsize%,0,0,xsize%*4,ysize%*4) � ș "OS_SpriteOp",R0,R1,R2,R3 �: �/ș "OS_SpriteOp",256+12,spritefile%,output$ �ș "XHourglass_Off" �: $ș "XARMLib_Message",1,messages% ș "XWimp_CommandWindow",-1 � : *� �_Error(token$) 43ș "ARMLib_Message",2,messages%,token$ � error$ >$ș "XARMLib_Message",1,messages% Hș "XHourglass_Smash" R� � 0,error$ \� f� p: z� �_Zero(pos%) �str$="" �ȕ ?pos%>31 �str$+=�(?pos%) �pos%+=1 �� � =str$ �: �I� �_DrawFile_Plot(drawfile%,drawfile_length%,originx%,originy%,scale) �!transfmatrix%! 0=scale*&10000 �transfmatrix%! 4=0 �transfmatrix%! 8=0 �!transfmatrix%!12=scale*&10000 �"transfmatrix%!16=originx%*&100 "transfmatrix%!20=originy%*&100 Eș "DrawFile_Render",0,drawfile%,drawfile_length%,transfmatrix%,0 � $: .]� �_DrawFile_Centre(drawfile%,drawfile_length%,rectlowx%,rectlowy%,recthighx%,recthighy%) 8:ș "DrawFile_BBox",0,drawfile%,drawfile_length%,,bbox% Bbboxlowx% =bbox%! 0/&100 Lbboxlowy% =bbox%! 4/&100 Vbboxhighx%=bbox%! 8/&100 `bboxhighy%=bbox%!12/&100 j8xscale=(recthighx%-rectlowx%)/(bboxhighx%-bboxlowx%) t8yscale=(recthighy%-rectlowy%)/(bboxhighy%-bboxlowy%) ~/� xscale>yscale scale=yscale � scale=xscale �6scale=scale*0.95: � Scale down by 5% to ensure fit �Doriginx%=(rectlowx%+recthighx%)/2-(bboxhighx%+bboxlowx%)*scale/2 �Doriginy%=(rectlowy%+recthighy%)/2-(bboxhighy%+bboxlowy%)*scale/2 �G�_DrawFile_Plot(drawfile%,drawfile_length%,originx%,originy%,scale) �� �: � �
00000000 0d 00 0a 16 f4 20 3e 20 44 72 61 77 43 6f 6e 76 |..... > DrawConv| 00000010 20 76 31 2e 33 37 0d 00 14 1e f4 20 a9 20 4e 69 | v1.37..... . Ni| 00000020 63 68 6f 6c 61 73 20 4d 61 72 72 69 6f 74 74 20 |cholas Marriott | 00000030 31 39 39 36 0d 00 1e 05 f4 0d 00 28 37 f4 20 48 |1996.......(7. H| 00000040 6f 77 20 74 68 65 20 68 65 6c 6c 20 64 6f 20 79 |ow the hell do y| 00000050 6f 75 20 64 6f 20 74 68 69 73 20 69 6e 20 61 73 |ou do this in as| 00000060 73 65 6d 62 6c 79 20 6c 61 6e 67 75 61 67 65 3f |sembly language?| 00000070 0d 00 32 1d f4 20 46 50 20 69 6e 73 74 72 75 63 |..2.. FP instruc| 00000080 74 69 6f 6e 73 2c 20 6d 61 79 62 65 2e 0d 00 3c |tions, maybe...<| 00000090 05 f4 0d 00 46 36 f4 20 4e 45 57 53 20 55 50 44 |....F6. NEWS UPD| 000000a0 41 54 45 20 2d 20 41 73 20 6f 66 20 31 33 2f 31 |ATE - As of 13/1| 000000b0 2f 39 37 20 49 20 68 61 76 65 20 6c 65 61 72 6e |/97 I have learn| 000000c0 74 20 68 6f 77 20 74 6f 0d 00 50 35 f4 20 20 20 |t how to..P5. | 000000d0 20 20 20 20 20 20 20 20 20 20 20 20 75 73 65 20 | use | 000000e0 74 68 65 20 46 50 20 69 6e 73 74 72 75 63 74 69 |the FP instructi| 000000f0 6f 6e 20 73 65 74 2e 2e 2e 20 62 75 74 0d 00 5a |on set... but..Z| 00000100 36 f4 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |6. | 00000110 20 64 6f 20 6e 6f 74 20 65 78 70 65 63 74 20 61 | do not expect a| 00000120 6e 20 41 52 4d 20 76 65 72 73 69 6f 6e 20 73 6f |n ARM version so| 00000130 6f 6e 2e 0d 00 64 05 f4 0d 00 6e 05 3a 0d 00 78 |on...d....n.:..x| 00000140 35 ee 20 85 20 c8 99 20 22 58 41 52 4d 4c 69 62 |5. . .. "XARMLib| 00000150 5f 4d 65 73 73 61 67 65 22 2c 31 2c 6d 65 73 73 |_Message",1,mess| 00000160 61 67 65 73 25 3a 20 85 20 a2 20 9f 2c f6 24 3a |ages%: . . .,.$:| 00000170 20 e0 0d 00 82 51 3a 20 20 20 20 20 20 20 20 20 | ....Q: | 00000180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000001c0 20 20 20 0d 00 8c 3f c8 99 20 22 41 52 4d 4c 69 | ...?.. "ARMLi| 000001d0 62 5f 4d 65 73 73 61 67 65 22 2c 30 2c 22 3c 44 |b_Message",0,"<D| 000001e0 72 61 77 43 6f 6e 76 24 44 69 72 3e 2e 4d 65 73 |rawConv$Dir>.Mes| 000001f0 73 61 67 65 73 22 20 b8 20 6d 65 73 73 61 67 65 |sages" . message| 00000200 73 25 0d 00 96 05 3a 0d 00 a0 2b c8 99 20 22 58 |s%....:...+.. "X| 00000210 4f 53 5f 4d 6f 64 75 6c 65 22 2c 31 38 2c 22 44 |OS_Module",18,"D| 00000220 72 61 77 46 69 6c 65 22 20 b8 20 3b 66 6c 61 67 |rawFile" . ;flag| 00000230 73 25 0d 00 aa 29 e7 20 28 66 6c 61 67 73 25 20 |s%...). (flags% | 00000240 80 20 31 29 3d 31 20 f2 5f 45 72 72 6f 72 28 22 |. 1)=1 ._Error("| 00000250 42 61 64 4d 6f 64 75 6c 65 22 29 0d 00 b4 05 3a |BadModule")....:| 00000260 0d 00 be 12 de 20 62 75 66 66 65 72 25 20 31 30 |..... buffer% 10| 00000270 32 34 0d 00 c8 21 c8 99 20 22 58 4f 53 5f 47 65 |24...!.. "XOS_Ge| 00000280 74 45 6e 76 22 20 b8 20 65 6e 76 24 3b 66 6c 61 |tEnv" . env$;fla| 00000290 67 73 25 0d 00 d2 26 e7 20 28 66 6c 61 67 73 25 |gs%...&. (flags%| 000002a0 20 80 20 31 29 3d 31 20 f2 5f 45 72 72 6f 72 28 | . 1)=1 ._Error(| 000002b0 22 53 79 6e 74 61 78 22 29 0d 00 dc 24 70 6f 73 |"Syntax")...$pos| 000002c0 25 3d a7 65 6e 76 24 2c bd 28 33 34 29 2c a7 65 |%=.env$,.(34),.e| 000002d0 6e 76 24 2c bd 28 33 34 29 29 2b 31 29 0d 00 e6 |nv$,.(34))+1)...| 000002e0 1c 65 6e 76 24 3d c2 65 6e 76 24 2c a9 28 65 6e |.env$=.env$,.(en| 000002f0 76 24 29 2d 70 6f 73 25 29 0d 00 f0 57 61 72 67 |v$)-pos%)...Warg| 00000300 73 24 3d 22 69 6e 70 75 74 2f 61 2f 6b 2c 6f 75 |s$="input/a/k,ou| 00000310 74 70 75 74 2f 61 2f 6b 2c 78 73 69 7a 65 2f 61 |tput/a/k,xsize/a| 00000320 2f 6b 2f 65 2c 79 73 69 7a 65 2f 61 2f 6b 2f 65 |/k/e,ysize/a/k/e| 00000330 2c 6d 6f 64 65 2f 6b 2f 65 2c 62 61 63 6b 67 72 |,mode/k/e,backgr| 00000340 6f 75 6e 64 2f 6b 2f 65 2c 6e 61 6d 65 2f 6b 22 |ound/k/e,name/k"| 00000350 0d 00 fa 37 c8 99 20 22 58 4f 53 5f 52 65 61 64 |...7.. "XOS_Read| 00000360 41 72 67 73 22 2c 61 72 67 73 24 2c 65 6e 76 24 |Args",args$,env$| 00000370 2c 62 75 66 66 65 72 25 2c 31 30 32 34 20 b8 20 |,buffer%,1024 . | 00000380 3b 66 6c 61 67 73 25 0d 01 04 26 e7 20 28 66 6c |;flags%...&. (fl| 00000390 61 67 73 25 20 80 20 31 29 3d 31 20 f2 5f 45 72 |ags% . 1)=1 ._Er| 000003a0 72 6f 72 28 22 53 79 6e 74 61 78 22 29 0d 01 0e |ror("Syntax")...| 000003b0 05 3a 0d 01 18 1c 69 6e 70 75 74 24 3d a4 5f 5a |.:....input$=._Z| 000003c0 65 72 6f 28 62 75 66 66 65 72 25 21 30 29 0d 01 |ero(buffer%!0)..| 000003d0 22 1d 6f 75 74 70 75 74 24 3d a4 5f 5a 65 72 6f |".output$=._Zero| 000003e0 28 62 75 66 66 65 72 25 21 34 29 0d 01 2c 16 78 |(buffer%!4)..,.x| 000003f0 73 69 7a 65 25 3d 28 62 75 66 66 65 72 25 21 38 |size%=(buffer%!8| 00000400 29 0d 01 36 16 78 73 69 7a 65 25 3d 21 28 78 73 |)..6.xsize%=!(xs| 00000410 69 7a 65 25 2b 31 29 0d 01 40 17 79 73 69 7a 65 |ize%+1)..@.ysize| 00000420 25 3d 28 62 75 66 66 65 72 25 21 31 32 29 0d 01 |%=(buffer%!12)..| 00000430 4a 16 79 73 69 7a 65 25 3d 21 28 79 73 69 7a 65 |J.ysize%=!(ysize| 00000440 25 2b 31 29 0d 01 54 16 6d 6f 64 65 25 3d 28 62 |%+1)..T.mode%=(b| 00000450 75 66 66 65 72 25 21 31 36 29 0d 01 5e 2a e7 20 |uffer%!16)..^*. | 00000460 6d 6f 64 65 25 3c 3e 30 20 6d 6f 64 65 25 3d 21 |mode%<>0 mode%=!| 00000470 28 6d 6f 64 65 25 2b 31 29 20 8b 20 6d 6f 64 65 |(mode%+1) . mode| 00000480 25 3d 31 33 0d 01 68 17 62 61 63 6b 67 25 3d 28 |%=13..h.backg%=(| 00000490 62 75 66 66 65 72 25 21 32 30 29 0d 01 72 3a e7 |buffer%!20)..r:.| 000004a0 20 62 61 63 6b 67 25 3c 3e 30 20 62 61 63 6b 67 | backg%<>0 backg| 000004b0 25 3d 28 21 28 62 61 63 6b 67 25 2b 31 29 29 3c |%=(!(backg%+1))<| 000004c0 3c 38 20 8b 20 62 61 63 6b 67 25 3d 26 46 46 46 |<8 . backg%=&FFF| 000004d0 46 46 46 30 30 0d 01 7c 3d e7 20 62 75 66 66 65 |FFF00..|=. buffe| 000004e0 72 25 21 32 34 3c 3e 30 20 6e 61 6d 65 24 3d a4 |r%!24<>0 name$=.| 000004f0 5f 5a 65 72 6f 28 62 75 66 66 65 72 25 21 32 34 |_Zero(buffer%!24| 00000500 29 20 8b 20 6e 61 6d 65 24 3d 22 73 70 72 69 74 |) . name$="sprit| 00000510 65 22 0d 01 86 05 3a 0d 01 90 22 e7 20 69 6e 70 |e"....:...". inp| 00000520 75 74 24 3d 22 22 20 f2 5f 45 72 72 6f 72 28 22 |ut$="" ._Error("| 00000530 4e 6f 49 6e 70 75 74 22 29 0d 01 9a 24 e7 20 6f |NoInput")...$. o| 00000540 75 74 70 75 74 24 3d 22 22 20 f2 5f 45 72 72 6f |utput$="" ._Erro| 00000550 72 28 22 4e 6f 4f 75 74 70 75 74 22 29 0d 01 a4 |r("NoOutput")...| 00000560 23 c8 99 20 22 58 4f 53 5f 46 69 6c 65 22 2c 31 |#.. "XOS_File",1| 00000570 37 2c 69 6e 70 75 74 24 20 b8 20 74 79 70 65 25 |7,input$ . type%| 00000580 0d 01 ae 22 e7 20 74 79 70 65 25 3c 3e 31 20 f2 |...". type%<>1 .| 00000590 5f 45 72 72 6f 72 28 22 42 61 64 49 6e 70 75 74 |_Error("BadInput| 000005a0 22 29 0d 01 b8 2e e7 20 78 73 69 7a 65 25 3c 33 |")..... xsize%<3| 000005b0 32 20 84 20 79 73 69 7a 65 25 3c 33 32 20 f2 5f |2 . ysize%<32 ._| 000005c0 45 72 72 6f 72 28 22 42 61 64 53 69 7a 65 22 29 |Error("BadSize")| 000005d0 0d 01 c2 2a c8 99 20 22 58 4f 53 5f 43 68 65 63 |...*.. "XOS_Chec| 000005e0 6b 4d 6f 64 65 56 61 6c 69 64 22 2c 6d 6f 64 65 |kModeValid",mode| 000005f0 25 20 b8 20 76 61 6c 69 64 25 0d 01 cc 21 e7 20 |% . valid%...!. | 00000600 76 61 6c 69 64 25 3c 30 20 f2 5f 45 72 72 6f 72 |valid%<0 ._Error| 00000610 28 22 42 61 64 4d 6f 64 65 22 29 0d 01 d6 05 3a |("BadMode")....:| 00000620 0d 01 e0 2a c8 99 20 22 4f 53 5f 46 69 6c 65 22 |...*.. "OS_File"| 00000630 2c 31 37 2c 69 6e 70 75 74 24 20 b8 20 2c 2c 2c |,17,input$ . ,,,| 00000640 2c 64 72 61 77 73 69 7a 65 25 0d 01 ea 35 de 20 |,drawsize%...5. | 00000650 64 72 61 77 66 69 6c 65 25 20 64 72 61 77 73 69 |drawfile% drawsi| 00000660 7a 65 25 2c 20 74 72 61 6e 73 66 6d 61 74 72 69 |ze%, transfmatri| 00000670 78 25 20 32 34 2c 20 62 62 6f 78 25 20 31 36 0d |x% 24, bbox% 16.| 00000680 01 f4 25 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c |..%.. "OS_File",| 00000690 32 35 35 2c 69 6e 70 75 74 24 2c 64 72 61 77 66 |255,input$,drawf| 000006a0 69 6c 65 25 0d 01 fe 05 3a 0d 02 08 24 73 70 72 |ile%....:...$spr| 000006b0 69 74 65 73 69 7a 65 25 3d 28 78 73 69 7a 65 25 |itesize%=(xsize%| 000006c0 2a 79 73 69 7a 65 25 29 2b 34 30 39 36 0d 02 12 |*ysize%)+4096...| 000006d0 24 c8 99 20 22 57 69 6d 70 5f 53 6c 6f 74 53 69 |$.. "Wimp_SlotSi| 000006e0 7a 65 22 2c 2d 31 2c 2d 31 20 b8 20 73 6c 6f 74 |ze",-1,-1 . slot| 000006f0 25 0d 02 1c 2b e7 20 73 70 72 69 74 65 73 69 7a |%...+. spritesiz| 00000700 65 25 3e 73 6c 6f 74 25 20 f2 5f 45 72 72 6f 72 |e%>slot% ._Error| 00000710 28 22 4e 6f 4d 65 6d 6f 72 79 22 29 0d 02 26 1d |("NoMemory")..&.| 00000720 de 20 73 70 72 69 74 65 66 69 6c 65 25 20 73 70 |. spritefile% sp| 00000730 72 69 74 65 73 69 7a 65 25 0d 02 30 1d 73 70 72 |ritesize%..0.spr| 00000740 69 74 65 66 69 6c 65 25 21 30 3d 73 70 72 69 74 |itefile%!0=sprit| 00000750 65 73 69 7a 65 25 0d 02 3a 14 73 70 72 69 74 65 |esize%..:.sprite| 00000760 66 69 6c 65 25 21 38 3d 31 36 0d 02 44 27 c8 99 |file%!8=16..D'..| 00000770 20 22 4f 53 5f 53 70 72 69 74 65 4f 70 22 2c 32 | "OS_SpriteOp",2| 00000780 35 36 2b 20 39 2c 73 70 72 69 74 65 66 69 6c 65 |56+ 9,spritefile| 00000790 25 0d 02 4e 43 c8 99 20 22 4f 53 5f 53 70 72 69 |%..NC.. "OS_Spri| 000007a0 74 65 4f 70 22 2c 32 35 36 2b 31 35 2c 73 70 72 |teOp",256+15,spr| 000007b0 69 74 65 66 69 6c 65 25 2c 6e 61 6d 65 24 2c 30 |itefile%,name$,0| 000007c0 2c 78 73 69 7a 65 25 2c 79 73 69 7a 65 25 2c 6d |,xsize%,ysize%,m| 000007d0 6f 64 65 25 0d 02 58 05 3a 0d 02 62 0b eb 20 6d |ode%..X.:..b.. m| 000007e0 6f 64 65 25 0d 02 6c 16 c8 99 20 22 58 48 6f 75 |ode%..l... "XHou| 000007f0 72 67 6c 61 73 73 5f 4f 6e 22 0d 02 76 05 3a 0d |rglass_On"..v.:.| 00000800 02 80 68 ee 20 85 20 c8 99 20 22 58 41 52 4d 4c |..h. . .. "XARML| 00000810 69 62 5f 4d 65 73 73 61 67 65 22 2c 31 2c 6d 65 |ib_Message",1,me| 00000820 73 73 61 67 65 73 25 3a 20 c8 99 20 22 58 48 6f |ssages%: .. "XHo| 00000830 75 72 67 6c 61 73 73 5f 4f 66 66 22 3a 20 c8 99 |urglass_Off": ..| 00000840 20 22 4f 53 5f 53 70 72 69 74 65 4f 70 22 2c 52 | "OS_SpriteOp",R| 00000850 30 2c 52 31 2c 52 32 2c 52 33 3a 20 85 20 a2 20 |0,R1,R2,R3: . . | 00000860 9f 2c f6 24 3a 20 e0 0d 02 8a 3c c8 99 20 22 4f |.,.$: ....<.. "O| 00000870 53 5f 53 70 72 69 74 65 4f 70 22 2c 32 35 36 2b |S_SpriteOp",256+| 00000880 36 32 2c 73 70 72 69 74 65 66 69 6c 65 25 2c 6e |62,spritefile%,n| 00000890 61 6d 65 24 20 b8 20 2c 2c 2c 73 61 76 65 73 69 |ame$ . ,,,savesi| 000008a0 7a 65 25 0d 02 94 1b de 20 73 61 76 65 61 72 65 |ze%..... saveare| 000008b0 61 25 20 73 61 76 65 73 69 7a 65 25 2b 38 0d 02 |a% savesize%+8..| 000008c0 9e 1f 73 61 76 65 61 72 65 61 25 3d 28 73 61 76 |..savearea%=(sav| 000008d0 65 61 72 65 61 25 20 81 20 34 29 2a 34 0d 02 a8 |earea% . 4)*4...| 000008e0 45 c8 99 20 22 4f 53 5f 53 70 72 69 74 65 4f 70 |E.. "OS_SpriteOp| 000008f0 22 2c 32 35 36 2b 36 30 2c 73 70 72 69 74 65 66 |",256+60,spritef| 00000900 69 6c 65 25 2c 6e 61 6d 65 24 2c 73 61 76 65 61 |ile%,name$,savea| 00000910 72 65 61 25 20 b8 20 52 30 2c 52 31 2c 52 32 2c |rea% . R0,R1,R2,| 00000920 52 33 0d 02 b2 23 c8 99 20 22 43 6f 6c 6f 75 72 |R3...#.. "Colour| 00000930 54 72 61 6e 73 5f 53 65 74 47 43 4f 4c 22 2c 62 |Trans_SetGCOL",b| 00000940 61 63 6b 67 25 0d 02 bc 1f c8 93 20 c8 90 20 30 |ackg%...... .. 0| 00000950 2c 30 2c 78 73 69 7a 65 25 2a 34 2c 79 73 69 7a |,0,xsize%*4,ysiz| 00000960 65 25 2a 34 0d 02 c6 40 f2 5f 44 72 61 77 46 69 |e%*4...@._DrawFi| 00000970 6c 65 5f 43 65 6e 74 72 65 28 64 72 61 77 66 69 |le_Centre(drawfi| 00000980 6c 65 25 2c 64 72 61 77 73 69 7a 65 25 2c 30 2c |le%,drawsize%,0,| 00000990 30 2c 78 73 69 7a 65 25 2a 34 2c 79 73 69 7a 65 |0,xsize%*4,ysize| 000009a0 25 2a 34 29 0d 02 d0 20 c8 99 20 22 4f 53 5f 53 |%*4)... .. "OS_S| 000009b0 70 72 69 74 65 4f 70 22 2c 52 30 2c 52 31 2c 52 |priteOp",R0,R1,R| 000009c0 32 2c 52 33 0d 02 da 05 3a 0d 02 e4 2f c8 99 20 |2,R3....:.../.. | 000009d0 22 4f 53 5f 53 70 72 69 74 65 4f 70 22 2c 32 35 |"OS_SpriteOp",25| 000009e0 36 2b 31 32 2c 73 70 72 69 74 65 66 69 6c 65 25 |6+12,spritefile%| 000009f0 2c 6f 75 74 70 75 74 24 0d 02 ee 17 c8 99 20 22 |,output$...... "| 00000a00 58 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d |XHourglass_Off".| 00000a10 02 f8 05 3a 0d 03 02 24 c8 99 20 22 58 41 52 4d |...:...$.. "XARM| 00000a20 4c 69 62 5f 4d 65 73 73 61 67 65 22 2c 31 2c 6d |Lib_Message",1,m| 00000a30 65 73 73 61 67 65 73 25 0d 03 0c 1f c8 99 20 22 |essages%...... "| 00000a40 58 57 69 6d 70 5f 43 6f 6d 6d 61 6e 64 57 69 6e |XWimp_CommandWin| 00000a50 64 6f 77 22 2c 2d 31 0d 03 16 05 e0 0d 03 20 05 |dow",-1....... .| 00000a60 3a 0d 03 2a 15 dd 20 f2 5f 45 72 72 6f 72 28 74 |:..*.. ._Error(t| 00000a70 6f 6b 65 6e 24 29 0d 03 34 33 c8 99 20 22 41 52 |oken$)..43.. "AR| 00000a80 4d 4c 69 62 5f 4d 65 73 73 61 67 65 22 2c 32 2c |MLib_Message",2,| 00000a90 6d 65 73 73 61 67 65 73 25 2c 74 6f 6b 65 6e 24 |messages%,token$| 00000aa0 20 b8 20 65 72 72 6f 72 24 0d 03 3e 24 c8 99 20 | . error$..>$.. | 00000ab0 22 58 41 52 4d 4c 69 62 5f 4d 65 73 73 61 67 65 |"XARMLib_Message| 00000ac0 22 2c 31 2c 6d 65 73 73 61 67 65 73 25 0d 03 48 |",1,messages%..H| 00000ad0 19 c8 99 20 22 58 48 6f 75 72 67 6c 61 73 73 5f |... "XHourglass_| 00000ae0 53 6d 61 73 68 22 0d 03 52 10 85 20 a2 20 30 2c |Smash"..R.. . 0,| 00000af0 65 72 72 6f 72 24 0d 03 5c 05 e0 0d 03 66 05 e1 |error$..\....f..| 00000b00 0d 03 70 05 3a 0d 03 7a 12 dd 20 a4 5f 5a 65 72 |..p.:..z.. ._Zer| 00000b10 6f 28 70 6f 73 25 29 0d 03 84 0b 73 74 72 24 3d |o(pos%)....str$=| 00000b20 22 22 0d 03 8e 0f c8 95 20 3f 70 6f 73 25 3e 33 |""...... ?pos%>3| 00000b30 31 0d 03 98 12 73 74 72 24 2b 3d bd 28 3f 70 6f |1....str$+=.(?po| 00000b40 73 25 29 0d 03 a2 0b 70 6f 73 25 2b 3d 31 0d 03 |s%)....pos%+=1..| 00000b50 ac 05 ce 0d 03 b6 09 3d 73 74 72 24 0d 03 c0 05 |.......=str$....| 00000b60 3a 0d 03 ca 49 dd 20 f2 5f 44 72 61 77 46 69 6c |:...I. ._DrawFil| 00000b70 65 5f 50 6c 6f 74 28 64 72 61 77 66 69 6c 65 25 |e_Plot(drawfile%| 00000b80 2c 64 72 61 77 66 69 6c 65 5f 6c 65 6e 67 74 68 |,drawfile_length| 00000b90 25 2c 6f 72 69 67 69 6e 78 25 2c 6f 72 69 67 69 |%,originx%,origi| 00000ba0 6e 79 25 2c 73 63 61 6c 65 29 0d 03 d4 21 74 72 |ny%,scale)...!tr| 00000bb0 61 6e 73 66 6d 61 74 72 69 78 25 21 20 30 3d 73 |ansfmatrix%! 0=s| 00000bc0 63 61 6c 65 2a 26 31 30 30 30 30 0d 03 de 16 74 |cale*&10000....t| 00000bd0 72 61 6e 73 66 6d 61 74 72 69 78 25 21 20 34 3d |ransfmatrix%! 4=| 00000be0 30 0d 03 e8 16 74 72 61 6e 73 66 6d 61 74 72 69 |0....transfmatri| 00000bf0 78 25 21 20 38 3d 30 0d 03 f2 21 74 72 61 6e 73 |x%! 8=0...!trans| 00000c00 66 6d 61 74 72 69 78 25 21 31 32 3d 73 63 61 6c |fmatrix%!12=scal| 00000c10 65 2a 26 31 30 30 30 30 0d 03 fc 22 74 72 61 6e |e*&10000..."tran| 00000c20 73 66 6d 61 74 72 69 78 25 21 31 36 3d 6f 72 69 |sfmatrix%!16=ori| 00000c30 67 69 6e 78 25 2a 26 31 30 30 0d 04 06 22 74 72 |ginx%*&100..."tr| 00000c40 61 6e 73 66 6d 61 74 72 69 78 25 21 32 30 3d 6f |ansfmatrix%!20=o| 00000c50 72 69 67 69 6e 79 25 2a 26 31 30 30 0d 04 10 45 |riginy%*&100...E| 00000c60 c8 99 20 22 44 72 61 77 46 69 6c 65 5f 52 65 6e |.. "DrawFile_Ren| 00000c70 64 65 72 22 2c 30 2c 64 72 61 77 66 69 6c 65 25 |der",0,drawfile%| 00000c80 2c 64 72 61 77 66 69 6c 65 5f 6c 65 6e 67 74 68 |,drawfile_length| 00000c90 25 2c 74 72 61 6e 73 66 6d 61 74 72 69 78 25 2c |%,transfmatrix%,| 00000ca0 30 0d 04 1a 05 e1 0d 04 24 05 3a 0d 04 2e 5d dd |0.......$.:...].| 00000cb0 20 f2 5f 44 72 61 77 46 69 6c 65 5f 43 65 6e 74 | ._DrawFile_Cent| 00000cc0 72 65 28 64 72 61 77 66 69 6c 65 25 2c 64 72 61 |re(drawfile%,dra| 00000cd0 77 66 69 6c 65 5f 6c 65 6e 67 74 68 25 2c 72 65 |wfile_length%,re| 00000ce0 63 74 6c 6f 77 78 25 2c 72 65 63 74 6c 6f 77 79 |ctlowx%,rectlowy| 00000cf0 25 2c 72 65 63 74 68 69 67 68 78 25 2c 72 65 63 |%,recthighx%,rec| 00000d00 74 68 69 67 68 79 25 29 0d 04 38 3a c8 99 20 22 |thighy%)..8:.. "| 00000d10 44 72 61 77 46 69 6c 65 5f 42 42 6f 78 22 2c 30 |DrawFile_BBox",0| 00000d20 2c 64 72 61 77 66 69 6c 65 25 2c 64 72 61 77 66 |,drawfile%,drawf| 00000d30 69 6c 65 5f 6c 65 6e 67 74 68 25 2c 2c 62 62 6f |ile_length%,,bbo| 00000d40 78 25 0d 04 42 1c 62 62 6f 78 6c 6f 77 78 25 20 |x%..B.bboxlowx% | 00000d50 3d 62 62 6f 78 25 21 20 30 2f 26 31 30 30 0d 04 |=bbox%! 0/&100..| 00000d60 4c 1c 62 62 6f 78 6c 6f 77 79 25 20 3d 62 62 6f |L.bboxlowy% =bbo| 00000d70 78 25 21 20 34 2f 26 31 30 30 0d 04 56 1c 62 62 |x%! 4/&100..V.bb| 00000d80 6f 78 68 69 67 68 78 25 3d 62 62 6f 78 25 21 20 |oxhighx%=bbox%! | 00000d90 38 2f 26 31 30 30 0d 04 60 1c 62 62 6f 78 68 69 |8/&100..`.bboxhi| 00000da0 67 68 79 25 3d 62 62 6f 78 25 21 31 32 2f 26 31 |ghy%=bbox%!12/&1| 00000db0 30 30 0d 04 6a 38 78 73 63 61 6c 65 3d 28 72 65 |00..j8xscale=(re| 00000dc0 63 74 68 69 67 68 78 25 2d 72 65 63 74 6c 6f 77 |cthighx%-rectlow| 00000dd0 78 25 29 2f 28 62 62 6f 78 68 69 67 68 78 25 2d |x%)/(bboxhighx%-| 00000de0 62 62 6f 78 6c 6f 77 78 25 29 0d 04 74 38 79 73 |bboxlowx%)..t8ys| 00000df0 63 61 6c 65 3d 28 72 65 63 74 68 69 67 68 79 25 |cale=(recthighy%| 00000e00 2d 72 65 63 74 6c 6f 77 79 25 29 2f 28 62 62 6f |-rectlowy%)/(bbo| 00000e10 78 68 69 67 68 79 25 2d 62 62 6f 78 6c 6f 77 79 |xhighy%-bboxlowy| 00000e20 25 29 0d 04 7e 2f e7 20 78 73 63 61 6c 65 3e 79 |%)..~/. xscale>y| 00000e30 73 63 61 6c 65 20 73 63 61 6c 65 3d 79 73 63 61 |scale scale=ysca| 00000e40 6c 65 20 8b 20 73 63 61 6c 65 3d 78 73 63 61 6c |le . scale=xscal| 00000e50 65 0d 04 88 36 73 63 61 6c 65 3d 73 63 61 6c 65 |e...6scale=scale| 00000e60 2a 30 2e 39 35 3a 20 f4 20 53 63 61 6c 65 20 64 |*0.95: . Scale d| 00000e70 6f 77 6e 20 62 79 20 35 25 20 74 6f 20 65 6e 73 |own by 5% to ens| 00000e80 75 72 65 20 66 69 74 0d 04 92 44 6f 72 69 67 69 |ure fit...Dorigi| 00000e90 6e 78 25 3d 28 72 65 63 74 6c 6f 77 78 25 2b 72 |nx%=(rectlowx%+r| 00000ea0 65 63 74 68 69 67 68 78 25 29 2f 32 2d 28 62 62 |ecthighx%)/2-(bb| 00000eb0 6f 78 68 69 67 68 78 25 2b 62 62 6f 78 6c 6f 77 |oxhighx%+bboxlow| 00000ec0 78 25 29 2a 73 63 61 6c 65 2f 32 0d 04 9c 44 6f |x%)*scale/2...Do| 00000ed0 72 69 67 69 6e 79 25 3d 28 72 65 63 74 6c 6f 77 |riginy%=(rectlow| 00000ee0 79 25 2b 72 65 63 74 68 69 67 68 79 25 29 2f 32 |y%+recthighy%)/2| 00000ef0 2d 28 62 62 6f 78 68 69 67 68 79 25 2b 62 62 6f |-(bboxhighy%+bbo| 00000f00 78 6c 6f 77 79 25 29 2a 73 63 61 6c 65 2f 32 0d |xlowy%)*scale/2.| 00000f10 04 a6 47 f2 5f 44 72 61 77 46 69 6c 65 5f 50 6c |..G._DrawFile_Pl| 00000f20 6f 74 28 64 72 61 77 66 69 6c 65 25 2c 64 72 61 |ot(drawfile%,dra| 00000f30 77 66 69 6c 65 5f 6c 65 6e 67 74 68 25 2c 6f 72 |wfile_length%,or| 00000f40 69 67 69 6e 78 25 2c 6f 72 69 67 69 6e 79 25 2c |iginx%,originy%,| 00000f50 73 63 61 6c 65 29 0d 04 b0 05 e1 0d 04 ba 05 3a |scale).........:| 00000f60 0d 04 c4 04 0d ff |......| 00000f66