Home » Archimedes archive » Acorn User » AU 1996-03 B.adf » Regulars » StarInfo/Cohn/!ARMovie/Tools/Shadow
StarInfo/Cohn/!ARMovie/Tools/Shadow
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 1996-03 B.adf » Regulars |
Filename: | StarInfo/Cohn/!ARMovie/Tools/Shadow |
Read OK: | ✔ |
File size: | 0524 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM ShadowEVALNUSRX 20REM Acts on 192CHAIN144 ERLlms (or smaller). 30ONERROR CLOSE#A%:PRINTREPORT$;" at line ";ERL:END 40FORshadow%=0TO2:REM A power of two between 0 and 2. 50A%=OPENOUT("<ARMovie$Dir>.Shapes.�Shadows�.Shadow�N�"+STR$(shadow%+1)) 60BPUT#A%,"ARMovie Shape 1" 70BPUT#A%,("Shadowy reflection below from the bottom "+STR$(1/(2^shadow%))+" of 192�144 (or smaller) films") 80BPUT#A%,"768 720":REM Default shape+VPOSy. 90FORY%=0TO143:REM This loop copies the normal ERLlm onto the top portion of the shape. 100destx%=0 110desty%=(179-Y%)*4:REM Shape is 180*4 high. 120q%=destx% OR desty%<<12 OR 192<<24 130BPUT#A%,q%:BPUT#A%,q%>>8:BPUT#A%,q%>>16:BPUT#A%,q%>>24 140FORI%=0TO191 150y%=Y%:REM FilmsTIMEs top rows=0. but OS Co-ords. start at bottom. 160x%=I% 170q%=y%<<16 OR x% 180BPUT#A%,q%:BPUT#A%,q%>>8:BPUT#A%,q%>>16:BPUT#A%,q%>>24 190NEXT:PRINT"Line N� ";Y%;" done.":NEXT 200FORY%=144TO179:REM This loop ERLlls the remaining bottom portion of the shape with shadowy reERRection. 210destx%=0 220desty%=(179-Y%)*4:REM 0 is base of shape, 35 is at base of film. 230q%=destx% OR desty%<<12 OR 192<<24 240BPUT#A%,q%:BPUT#A%,q%>>8:BPUT#A%,q%>>16:BPUT#A%,q%>>24 250FORI%=0TO191 260y%=(Y%-144)*(2^shadow%) 270x%=I% 280q%=(143-y%)<<16 OR x%:REM Invert order of lines so that first line chosen by y% is bottom (line 127). 290BPUT#A%,q%:BPUT#A%,q%>>8:BPUT#A%,q%>>16:BPUT#A%,q%>>24 300NEXT:PRINT"Line N� ";Y%;" done.":NEXT 310CLOSE#A% 320PRINT"Shadow N�: ";(shadow%+1);" done." 330NEXT 340END
� Shadow�N�X (� Acts on 192�144 �lms (or smaller). � �#A%:�$;" at line ";�:� (2�shadow%=0�2:� A power of two between 0 and 2. 2AA%=�("<ARMovie$Dir>.Shapes.�Shadows�.Shadow�N�"+�(shadow%+1)) <�#A%,"ARMovie Shape 1" Fh�#A%,("Shadowy reflection below from the bottom "+�(1/(2^shadow%))+" of 192�144 (or smaller) films") P&�#A%,"768 720":� Default shape+�y. ZR�Y%=0�143:� This loop copies the normal �lm onto the top portion of the shape. ddestx%=0 n,desty%=(179-Y%)*4:� Shape is 180*4 high. x$q%=destx% � desty%<<12 � 192<<24 �.�#A%,q%:�#A%,q%>>8:�#A%,q%>>16:�#A%,q%>>24 � �I%=0�191 �@y%=Y%:� Films�s top rows=0. but OS Co-ords. start at bottom. � x%=I% �q%=y%<<16 � x% �.�#A%,q%:�#A%,q%>>8:�#A%,q%>>16:�#A%,q%>>24 ��:�"Line N� ";Y%;" done.":� �b�Y%=144�179:� This loop �lls the remaining bottom portion of the shape with shadowy re�ection. �destx%=0 �Bdesty%=(179-Y%)*4:� 0 is base of shape, 35 is at base of film. �$q%=destx% � desty%<<12 � 192<<24 �.�#A%,q%:�#A%,q%>>8:�#A%,q%>>16:�#A%,q%>>24 � �I%=0�191 y%=(Y%-144)*(2^shadow%) x%=I% fq%=(143-y%)<<16 � x%:� Invert order of lines so that first line chosen by y% is bottom (line 127). ".�#A%,q%:�#A%,q%>>8:�#A%,q%>>16:�#A%,q%>>24 ,�:�"Line N� ";Y%;" done.":� 6�#A% @'�"Shadow N�: ";(shadow%+1);" done." J� T� �
00000000 0d 00 0a 10 f4 20 53 68 61 64 6f 77 a0 4e ba 58 |..... Shadow.N.X| 00000010 0d 00 14 28 f4 20 41 63 74 73 20 6f 6e 20 31 39 |...(. Acts on 19| 00000020 32 d7 31 34 34 20 9e 6c 6d 73 20 28 6f 72 20 73 |2.144 .lms (or s| 00000030 6d 61 6c 6c 65 72 29 2e 0d 00 1e 1f ee 85 20 d9 |maller)....... .| 00000040 23 41 25 3a f1 f6 24 3b 22 20 61 74 20 6c 69 6e |#A%:..$;" at lin| 00000050 65 20 22 3b 9e 3a e0 0d 00 28 32 e3 73 68 61 64 |e ";.:...(2.shad| 00000060 6f 77 25 3d 30 b8 32 3a f4 20 41 20 70 6f 77 65 |ow%=0.2:. A powe| 00000070 72 20 6f 66 20 74 77 6f 20 62 65 74 77 65 65 6e |r of two between| 00000080 20 30 20 61 6e 64 20 32 2e 0d 00 32 41 41 25 3d | 0 and 2...2AA%=| 00000090 ae 28 22 3c 41 52 4d 6f 76 69 65 24 44 69 72 3e |.("<ARMovie$Dir>| 000000a0 2e 53 68 61 70 65 73 2e 94 53 68 61 64 6f 77 73 |.Shapes..Shadows| 000000b0 95 2e 53 68 61 64 6f 77 a0 4e ba 22 2b c3 28 73 |..Shadow.N."+.(s| 000000c0 68 61 64 6f 77 25 2b 31 29 29 0d 00 3c 1a d5 23 |hadow%+1))..<..#| 000000d0 41 25 2c 22 41 52 4d 6f 76 69 65 20 53 68 61 70 |A%,"ARMovie Shap| 000000e0 65 20 31 22 0d 00 46 68 d5 23 41 25 2c 28 22 53 |e 1"..Fh.#A%,("S| 000000f0 68 61 64 6f 77 79 20 72 65 66 6c 65 63 74 69 6f |hadowy reflectio| 00000100 6e 20 62 65 6c 6f 77 20 66 72 6f 6d 20 74 68 65 |n below from the| 00000110 20 62 6f 74 74 6f 6d 20 22 2b c3 28 31 2f 28 32 | bottom "+.(1/(2| 00000120 5e 73 68 61 64 6f 77 25 29 29 2b 22 20 6f 66 20 |^shadow%))+" of | 00000130 31 39 32 d7 31 34 34 20 28 6f 72 20 73 6d 61 6c |192.144 (or smal| 00000140 6c 65 72 29 20 66 69 6c 6d 73 22 29 0d 00 50 26 |ler) films")..P&| 00000150 d5 23 41 25 2c 22 37 36 38 20 37 32 30 22 3a f4 |.#A%,"768 720":.| 00000160 20 44 65 66 61 75 6c 74 20 73 68 61 70 65 2b bc | Default shape+.| 00000170 79 2e 0d 00 5a 52 e3 59 25 3d 30 b8 31 34 33 3a |y...ZR.Y%=0.143:| 00000180 f4 20 54 68 69 73 20 6c 6f 6f 70 20 63 6f 70 69 |. This loop copi| 00000190 65 73 20 74 68 65 20 6e 6f 72 6d 61 6c 20 9e 6c |es the normal .l| 000001a0 6d 20 6f 6e 74 6f 20 74 68 65 20 74 6f 70 20 70 |m onto the top p| 000001b0 6f 72 74 69 6f 6e 20 6f 66 20 74 68 65 20 73 68 |ortion of the sh| 000001c0 61 70 65 2e 0d 00 64 0c 64 65 73 74 78 25 3d 30 |ape...d.destx%=0| 000001d0 0d 00 6e 2c 64 65 73 74 79 25 3d 28 31 37 39 2d |..n,desty%=(179-| 000001e0 59 25 29 2a 34 3a f4 20 53 68 61 70 65 20 69 73 |Y%)*4:. Shape is| 000001f0 20 31 38 30 2a 34 20 68 69 67 68 2e 0d 00 78 24 | 180*4 high...x$| 00000200 71 25 3d 64 65 73 74 78 25 20 84 20 64 65 73 74 |q%=destx% . dest| 00000210 79 25 3c 3c 31 32 20 84 20 31 39 32 3c 3c 32 34 |y%<<12 . 192<<24| 00000220 0d 00 82 2e d5 23 41 25 2c 71 25 3a d5 23 41 25 |.....#A%,q%:.#A%| 00000230 2c 71 25 3e 3e 38 3a d5 23 41 25 2c 71 25 3e 3e |,q%>>8:.#A%,q%>>| 00000240 31 36 3a d5 23 41 25 2c 71 25 3e 3e 32 34 0d 00 |16:.#A%,q%>>24..| 00000250 8c 0d e3 49 25 3d 30 b8 31 39 31 0d 00 96 40 79 |...I%=0.191...@y| 00000260 25 3d 59 25 3a f4 20 46 69 6c 6d 73 91 73 20 74 |%=Y%:. Films.s t| 00000270 6f 70 20 72 6f 77 73 3d 30 2e 20 62 75 74 20 4f |op rows=0. but O| 00000280 53 20 43 6f 2d 6f 72 64 73 2e 20 73 74 61 72 74 |S Co-ords. start| 00000290 20 61 74 20 62 6f 74 74 6f 6d 2e 0d 00 a0 09 78 | at bottom.....x| 000002a0 25 3d 49 25 0d 00 aa 12 71 25 3d 79 25 3c 3c 31 |%=I%....q%=y%<<1| 000002b0 36 20 84 20 78 25 0d 00 b4 2e d5 23 41 25 2c 71 |6 . x%.....#A%,q| 000002c0 25 3a d5 23 41 25 2c 71 25 3e 3e 38 3a d5 23 41 |%:.#A%,q%>>8:.#A| 000002d0 25 2c 71 25 3e 3e 31 36 3a d5 23 41 25 2c 71 25 |%,q%>>16:.#A%,q%| 000002e0 3e 3e 32 34 0d 00 be 1f ed 3a f1 22 4c 69 6e 65 |>>24.....:."Line| 000002f0 20 4e ba 20 22 3b 59 25 3b 22 20 64 6f 6e 65 2e | N. ";Y%;" done.| 00000300 22 3a ed 0d 00 c8 62 e3 59 25 3d 31 34 34 b8 31 |":....b.Y%=144.1| 00000310 37 39 3a f4 20 54 68 69 73 20 6c 6f 6f 70 20 9e |79:. This loop .| 00000320 6c 6c 73 20 74 68 65 20 72 65 6d 61 69 6e 69 6e |lls the remainin| 00000330 67 20 62 6f 74 74 6f 6d 20 70 6f 72 74 69 6f 6e |g bottom portion| 00000340 20 6f 66 20 74 68 65 20 73 68 61 70 65 20 77 69 | of the shape wi| 00000350 74 68 20 73 68 61 64 6f 77 79 20 72 65 9f 65 63 |th shadowy re.ec| 00000360 74 69 6f 6e 2e 0d 00 d2 0c 64 65 73 74 78 25 3d |tion.....destx%=| 00000370 30 0d 00 dc 42 64 65 73 74 79 25 3d 28 31 37 39 |0...Bdesty%=(179| 00000380 2d 59 25 29 2a 34 3a f4 20 30 20 69 73 20 62 61 |-Y%)*4:. 0 is ba| 00000390 73 65 20 6f 66 20 73 68 61 70 65 2c 20 33 35 20 |se of shape, 35 | 000003a0 69 73 20 61 74 20 62 61 73 65 20 6f 66 20 66 69 |is at base of fi| 000003b0 6c 6d 2e 0d 00 e6 24 71 25 3d 64 65 73 74 78 25 |lm....$q%=destx%| 000003c0 20 84 20 64 65 73 74 79 25 3c 3c 31 32 20 84 20 | . desty%<<12 . | 000003d0 31 39 32 3c 3c 32 34 0d 00 f0 2e d5 23 41 25 2c |192<<24.....#A%,| 000003e0 71 25 3a d5 23 41 25 2c 71 25 3e 3e 38 3a d5 23 |q%:.#A%,q%>>8:.#| 000003f0 41 25 2c 71 25 3e 3e 31 36 3a d5 23 41 25 2c 71 |A%,q%>>16:.#A%,q| 00000400 25 3e 3e 32 34 0d 00 fa 0d e3 49 25 3d 30 b8 31 |%>>24.....I%=0.1| 00000410 39 31 0d 01 04 1b 79 25 3d 28 59 25 2d 31 34 34 |91....y%=(Y%-144| 00000420 29 2a 28 32 5e 73 68 61 64 6f 77 25 29 0d 01 0e |)*(2^shadow%)...| 00000430 09 78 25 3d 49 25 0d 01 18 66 71 25 3d 28 31 34 |.x%=I%...fq%=(14| 00000440 33 2d 79 25 29 3c 3c 31 36 20 84 20 78 25 3a f4 |3-y%)<<16 . x%:.| 00000450 20 49 6e 76 65 72 74 20 6f 72 64 65 72 20 6f 66 | Invert order of| 00000460 20 6c 69 6e 65 73 20 73 6f 20 74 68 61 74 20 66 | lines so that f| 00000470 69 72 73 74 20 6c 69 6e 65 20 63 68 6f 73 65 6e |irst line chosen| 00000480 20 62 79 20 79 25 20 69 73 20 62 6f 74 74 6f 6d | by y% is bottom| 00000490 20 28 6c 69 6e 65 20 31 32 37 29 2e 0d 01 22 2e | (line 127)...".| 000004a0 d5 23 41 25 2c 71 25 3a d5 23 41 25 2c 71 25 3e |.#A%,q%:.#A%,q%>| 000004b0 3e 38 3a d5 23 41 25 2c 71 25 3e 3e 31 36 3a d5 |>8:.#A%,q%>>16:.| 000004c0 23 41 25 2c 71 25 3e 3e 32 34 0d 01 2c 1f ed 3a |#A%,q%>>24..,..:| 000004d0 f1 22 4c 69 6e 65 20 4e ba 20 22 3b 59 25 3b 22 |."Line N. ";Y%;"| 000004e0 20 64 6f 6e 65 2e 22 3a ed 0d 01 36 08 d9 23 41 | done.":...6..#A| 000004f0 25 0d 01 40 27 f1 22 53 68 61 64 6f 77 20 4e ba |%..@'."Shadow N.| 00000500 3a 20 22 3b 28 73 68 61 64 6f 77 25 2b 31 29 3b |: ";(shadow%+1);| 00000510 22 20 64 6f 6e 65 2e 22 0d 01 4a 05 ed 0d 01 54 |" done."..J....T| 00000520 05 e0 0d ff |....| 00000524