Home » Archimedes archive » Acorn User » AU 1993-08.adf » !Bio_Bio » !Bio/Library/DrawSprs
!Bio/Library/DrawSprs
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 1993-08.adf » !Bio_Bio |
Filename: | !Bio/Library/DrawSprs |
Read OK: | ✔ |
File size: | 02C4 bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Acorn User » AU 1993-08.adf » !Bio_Bio » !Bio/Library/DrawSprs
- Archimedes archive » Acorn User » AU 1993-09.adf » !Bio_Bio » !Bio/Library/DrawSprs
File contents
10REM >SaveSprs 20REM Get sprites from drawfile 30: 40END 50: 60DEF FNdrawsprs_name = "Extract sprites" 70DEF FNdrawsprs_args = "-in DrawFile -out Sprite -send" 80DEF FNdrawsprs_init 90=0 100: 110DEF FNdrawsprs(in$,out$) 120LOCAL in%,out%,obj%,len%,i%,sprites% 130in%=OPENIN(in$) 140out%=OPENOUT(out$) 150PTR#in%=40 160PTR#out%=12 170sprites%=0 180WHILE NOT EOF#in% 190 IF PTR#in% MOD 100=0 PROChourglass(PTR#in%,EXT#in%) 200 obj%=FNwget(in%) 210 len%=FNwget(in%) 220 IF obj%<>5 THEN 230 PTR#in%=PTR#in%+len%-8 240 ELSE 250 PTR#in%=PTR#in%+16 260 FOR i%=1 TO len%-24 270 IF PTR#in% MOD 100=0 PROChourglass(PTR#in%,EXT#in%) 280 BPUT#out%,BGET#in% 290 NEXT 300 sprites%+=1 310 ENDIF 320ENDWHILE 330PTR#out%=0 340PROCwput(out%,sprites%) 350PROCwput(out%,16) 360PROCwput(out%,EXT#out%+4) 370CLOSE#in% 380CLOSE#out% 390=0
� >SaveSprs � Get sprites from drawfile : (� 2: <(� �drawsprs_name = "Extract sprites" F7� �drawsprs_args = "-in DrawFile -out Sprite -send" P� �drawsprs_init Z=0 d: n� �drawsprs(in$,out$) x$� in%,out%,obj%,len%,i%,sprites% �in%=�(in$) �out%=�(out$) ��#in%=40 � �#out%=12 �sprites%=0 �ȕ � �#in% �, � �#in% � 100=0 �hourglass(�#in%,�#in%) � obj%=�wget(in%) � len%=�wget(in%) � � obj%<>5 � � �#in%=�#in%+len%-8 � � � �#in%=�#in%+16 � i%=1 � len%-24 . � �#in% � 100=0 �hourglass(�#in%,�#in%) �#out%,�#in% " � , sprites%+=1 6 � @� J�#out%=0 T�wput(out%,sprites%) ^�wput(out%,16) h�wput(out%,�#out%+4) r �#in% | �#out% �=0 �
00000000 0d 00 0a 0f f4 20 3e 53 61 76 65 53 70 72 73 0d |..... >SaveSprs.| 00000010 00 14 1f f4 20 47 65 74 20 73 70 72 69 74 65 73 |.... Get sprites| 00000020 20 66 72 6f 6d 20 64 72 61 77 66 69 6c 65 0d 00 | from drawfile..| 00000030 1e 05 3a 0d 00 28 05 e0 0d 00 32 05 3a 0d 00 3c |..:..(....2.:..<| 00000040 28 dd 20 a4 64 72 61 77 73 70 72 73 5f 6e 61 6d |(. .drawsprs_nam| 00000050 65 20 3d 20 22 45 78 74 72 61 63 74 20 73 70 72 |e = "Extract spr| 00000060 69 74 65 73 22 0d 00 46 37 dd 20 a4 64 72 61 77 |ites"..F7. .draw| 00000070 73 70 72 73 5f 61 72 67 73 20 3d 20 22 2d 69 6e |sprs_args = "-in| 00000080 20 44 72 61 77 46 69 6c 65 20 2d 6f 75 74 20 53 | DrawFile -out S| 00000090 70 72 69 74 65 20 2d 73 65 6e 64 22 0d 00 50 14 |prite -send"..P.| 000000a0 dd 20 a4 64 72 61 77 73 70 72 73 5f 69 6e 69 74 |. .drawsprs_init| 000000b0 0d 00 5a 06 3d 30 0d 00 64 05 3a 0d 00 6e 19 dd |..Z.=0..d.:..n..| 000000c0 20 a4 64 72 61 77 73 70 72 73 28 69 6e 24 2c 6f | .drawsprs(in$,o| 000000d0 75 74 24 29 0d 00 78 24 ea 20 69 6e 25 2c 6f 75 |ut$)..x$. in%,ou| 000000e0 74 25 2c 6f 62 6a 25 2c 6c 65 6e 25 2c 69 25 2c |t%,obj%,len%,i%,| 000000f0 73 70 72 69 74 65 73 25 0d 00 82 0e 69 6e 25 3d |sprites%....in%=| 00000100 8e 28 69 6e 24 29 0d 00 8c 10 6f 75 74 25 3d ae |.(in$)....out%=.| 00000110 28 6f 75 74 24 29 0d 00 96 0c cf 23 69 6e 25 3d |(out$).....#in%=| 00000120 34 30 0d 00 a0 0d cf 23 6f 75 74 25 3d 31 32 0d |40.....#out%=12.| 00000130 00 aa 0e 73 70 72 69 74 65 73 25 3d 30 0d 00 b4 |...sprites%=0...| 00000140 0e c8 95 20 ac 20 c5 23 69 6e 25 0d 00 be 2c 20 |... . .#in%..., | 00000150 e7 20 8f 23 69 6e 25 20 83 20 31 30 30 3d 30 20 |. .#in% . 100=0 | 00000160 f2 68 6f 75 72 67 6c 61 73 73 28 8f 23 69 6e 25 |.hourglass(.#in%| 00000170 2c a2 23 69 6e 25 29 0d 00 c8 14 20 6f 62 6a 25 |,.#in%).... obj%| 00000180 3d a4 77 67 65 74 28 69 6e 25 29 0d 00 d2 14 20 |=.wget(in%).... | 00000190 6c 65 6e 25 3d a4 77 67 65 74 28 69 6e 25 29 0d |len%=.wget(in%).| 000001a0 00 dc 10 20 e7 20 6f 62 6a 25 3c 3e 35 20 8c 0d |... . obj%<>5 ..| 000001b0 00 e6 18 20 20 cf 23 69 6e 25 3d 8f 23 69 6e 25 |... .#in%=.#in%| 000001c0 2b 6c 65 6e 25 2d 38 0d 00 f0 06 20 cc 0d 00 fa |+len%-8.... ....| 000001d0 14 20 20 cf 23 69 6e 25 3d 8f 23 69 6e 25 2b 31 |. .#in%=.#in%+1| 000001e0 36 0d 01 04 16 20 20 e3 20 69 25 3d 31 20 b8 20 |6.... . i%=1 . | 000001f0 6c 65 6e 25 2d 32 34 0d 01 0e 2e 20 20 20 e7 20 |len%-24.... . | 00000200 8f 23 69 6e 25 20 83 20 31 30 30 3d 30 20 f2 68 |.#in% . 100=0 .h| 00000210 6f 75 72 67 6c 61 73 73 28 8f 23 69 6e 25 2c a2 |ourglass(.#in%,.| 00000220 23 69 6e 25 29 0d 01 18 13 20 20 20 d5 23 6f 75 |#in%).... .#ou| 00000230 74 25 2c 9a 23 69 6e 25 0d 01 22 07 20 20 ed 0d |t%,.#in%..". ..| 00000240 01 2c 11 20 20 73 70 72 69 74 65 73 25 2b 3d 31 |.,. sprites%+=1| 00000250 0d 01 36 06 20 cd 0d 01 40 05 ce 0d 01 4a 0c cf |..6. ...@....J..| 00000260 23 6f 75 74 25 3d 30 0d 01 54 18 f2 77 70 75 74 |#out%=0..T..wput| 00000270 28 6f 75 74 25 2c 73 70 72 69 74 65 73 25 29 0d |(out%,sprites%).| 00000280 01 5e 12 f2 77 70 75 74 28 6f 75 74 25 2c 31 36 |.^..wput(out%,16| 00000290 29 0d 01 68 18 f2 77 70 75 74 28 6f 75 74 25 2c |)..h..wput(out%,| 000002a0 a2 23 6f 75 74 25 2b 34 29 0d 01 72 09 d9 23 69 |.#out%+4)..r..#i| 000002b0 6e 25 0d 01 7c 0a d9 23 6f 75 74 25 0d 01 86 06 |n%..|..#out%....| 000002c0 3d 30 0d ff |=0..| 000002c4