Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403_2.adf » Disk2Mar94 » !AWMar94/Goodies/yass/!Yass2/Savers/Shape

!AWMar94/Goodies/yass/!Yass2/Savers/Shape

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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403_2.adf » Disk2Mar94
Filename: !AWMar94/Goodies/yass/!Yass2/Savers/Shape
Read OK:
File size: 03DD bytes
Load address: 0000
Exec address: 0000
File contents
   10REM
   20
   30DEFFNshape_start
   40LOCAL A%
   50sh_n%=RND(8)+2
   60sh_x%=FNmalloc(sh_n%*4):sh_y%=FNmalloc(sh_n%*4):sh_dx%=FNmalloc(sh_n%*4):sh_dy%=FNmalloc(sh_n%*4)
   70IF sh_dy%=0 THEN A%=FNshape_stop:=TRUE
   80FOR A%=0 TO sh_n%-1:!(sh_x%+A%*4)=RND(max_x%):!(sh_y%+A%*4)=RND(max_y%):!(sh_dx%+A%*4)=RND(16):!(sh_dy%+A%*4)=RND(16):NEXT
   90PROCclearscreen(-1)
  100sh_f%=TRUE
  110=0
  120
  130DEFFNshape_poll
  140LOCAL A%,B%:PROCset_colour(0,7)
  150IF sh_f%=0 THEN B%=4:FOR A%=0 TO sh_n%-1:PLOT B%,!(sh_x%+A%*4),!(sh_y%+A%*4):B%=5:NEXT:PLOT 5,!sh_x%,!sh_y%
  151PROCset_colour(0,0)
  160B%=4:FOR A%=0 TO sh_n%-1
  170!(sh_x%+A%*4)+=!(sh_dx%+A%*4):IF !(sh_x%+A%*4)<0 OR !(sh_x%+A%*4)>max_x% THEN !(sh_dx%+A%*4)=-!(sh_dx%+A%*4):!(sh_x%+A%*4)+=!(sh_dx%+A%*4)
  180!(sh_y%+A%*4)+=!(sh_dy%+A%*4):IF !(sh_y%+A%*4)<0 OR !(sh_y%+A%*4)>max_y% THEN !(sh_dy%+A%*4)=-!(sh_dy%+A%*4):!(sh_y%+A%*4)+=!(sh_dy%+A%*4)
  190PLOT B%,!(sh_x%+A%*4),!(sh_y%+A%*4):B%=5
  200NEXT:PLOT 5,!sh_x%,!sh_y%
  210IF now_going%>12000 THEN =TRUE
  220sh_f%=FALSE
  230=1
  240
  250DEFFNshape_stop
  260PROCfree(sh_x%):PROCfree(sh_y%):PROCfree(sh_dx%):PROCfree(sh_dy%)
  270=0
  280

�

ݤshape_start
(� A%
2sh_n%=�(8)+2
<ash_x%=�malloc(sh_n%*4):sh_y%=�malloc(sh_n%*4):sh_dx%=�malloc(sh_n%*4):sh_dy%=�malloc(sh_n%*4)
F"� sh_dy%=0 � A%=�shape_stop:=�
Pp� A%=0 � sh_n%-1:!(sh_x%+A%*4)=�(max_x%):!(sh_y%+A%*4)=�(max_y%):!(sh_dx%+A%*4)=�(16):!(sh_dy%+A%*4)=�(16):�
Z�clearscreen(-1)
dsh_f%=�
n=0
x
�ݤshape_poll
�� A%,B%:�set_colour(0,7)
�_� sh_f%=0 � B%=4:� A%=0 � sh_n%-1:� B%,!(sh_x%+A%*4),!(sh_y%+A%*4):B%=5:�:� 5,!sh_x%,!sh_y%
��set_colour(0,0)
�B%=4:� A%=0 � sh_n%-1
��!(sh_x%+A%*4)+=!(sh_dx%+A%*4):� !(sh_x%+A%*4)<0 � !(sh_x%+A%*4)>max_x% � !(sh_dx%+A%*4)=-!(sh_dx%+A%*4):!(sh_x%+A%*4)+=!(sh_dx%+A%*4)
��!(sh_y%+A%*4)+=!(sh_dy%+A%*4):� !(sh_y%+A%*4)<0 � !(sh_y%+A%*4)>max_y% � !(sh_dy%+A%*4)=-!(sh_dy%+A%*4):!(sh_y%+A%*4)+=!(sh_dy%+A%*4)
�)� B%,!(sh_x%+A%*4),!(sh_y%+A%*4):B%=5
��:� 5,!sh_x%,!sh_y%
�� now_going%>12000 � =�
�sh_f%=�
�=1
�
�ݤshape_stop
9�free(sh_x%):�free(sh_y%):�free(sh_dx%):�free(sh_dy%)
=0

�
00000000  0d 00 0a 05 f4 0d 00 14  04 0d 00 1e 11 dd a4 73  |...............s|
00000010  68 61 70 65 5f 73 74 61  72 74 0d 00 28 08 ea 20  |hape_start..(.. |
00000020  41 25 0d 00 32 10 73 68  5f 6e 25 3d b3 28 38 29  |A%..2.sh_n%=.(8)|
00000030  2b 32 0d 00 3c 61 73 68  5f 78 25 3d a4 6d 61 6c  |+2..<ash_x%=.mal|
00000040  6c 6f 63 28 73 68 5f 6e  25 2a 34 29 3a 73 68 5f  |loc(sh_n%*4):sh_|
00000050  79 25 3d a4 6d 61 6c 6c  6f 63 28 73 68 5f 6e 25  |y%=.malloc(sh_n%|
00000060  2a 34 29 3a 73 68 5f 64  78 25 3d a4 6d 61 6c 6c  |*4):sh_dx%=.mall|
00000070  6f 63 28 73 68 5f 6e 25  2a 34 29 3a 73 68 5f 64  |oc(sh_n%*4):sh_d|
00000080  79 25 3d a4 6d 61 6c 6c  6f 63 28 73 68 5f 6e 25  |y%=.malloc(sh_n%|
00000090  2a 34 29 0d 00 46 22 e7  20 73 68 5f 64 79 25 3d  |*4)..F". sh_dy%=|
000000a0  30 20 8c 20 41 25 3d a4  73 68 61 70 65 5f 73 74  |0 . A%=.shape_st|
000000b0  6f 70 3a 3d b9 0d 00 50  70 e3 20 41 25 3d 30 20  |op:=...Pp. A%=0 |
000000c0  b8 20 73 68 5f 6e 25 2d  31 3a 21 28 73 68 5f 78  |. sh_n%-1:!(sh_x|
000000d0  25 2b 41 25 2a 34 29 3d  b3 28 6d 61 78 5f 78 25  |%+A%*4)=.(max_x%|
000000e0  29 3a 21 28 73 68 5f 79  25 2b 41 25 2a 34 29 3d  |):!(sh_y%+A%*4)=|
000000f0  b3 28 6d 61 78 5f 79 25  29 3a 21 28 73 68 5f 64  |.(max_y%):!(sh_d|
00000100  78 25 2b 41 25 2a 34 29  3d b3 28 31 36 29 3a 21  |x%+A%*4)=.(16):!|
00000110  28 73 68 5f 64 79 25 2b  41 25 2a 34 29 3d b3 28  |(sh_dy%+A%*4)=.(|
00000120  31 36 29 3a ed 0d 00 5a  14 f2 63 6c 65 61 72 73  |16):...Z..clears|
00000130  63 72 65 65 6e 28 2d 31  29 0d 00 64 0b 73 68 5f  |creen(-1)..d.sh_|
00000140  66 25 3d b9 0d 00 6e 06  3d 30 0d 00 78 04 0d 00  |f%=...n.=0..x...|
00000150  82 10 dd a4 73 68 61 70  65 5f 70 6f 6c 6c 0d 00  |....shape_poll..|
00000160  8c 1c ea 20 41 25 2c 42  25 3a f2 73 65 74 5f 63  |... A%,B%:.set_c|
00000170  6f 6c 6f 75 72 28 30 2c  37 29 0d 00 96 5f e7 20  |olour(0,7)..._. |
00000180  73 68 5f 66 25 3d 30 20  8c 20 42 25 3d 34 3a e3  |sh_f%=0 . B%=4:.|
00000190  20 41 25 3d 30 20 b8 20  73 68 5f 6e 25 2d 31 3a  | A%=0 . sh_n%-1:|
000001a0  f0 20 42 25 2c 21 28 73  68 5f 78 25 2b 41 25 2a  |. B%,!(sh_x%+A%*|
000001b0  34 29 2c 21 28 73 68 5f  79 25 2b 41 25 2a 34 29  |4),!(sh_y%+A%*4)|
000001c0  3a 42 25 3d 35 3a ed 3a  f0 20 35 2c 21 73 68 5f  |:B%=5:.:. 5,!sh_|
000001d0  78 25 2c 21 73 68 5f 79  25 0d 00 97 14 f2 73 65  |x%,!sh_y%.....se|
000001e0  74 5f 63 6f 6c 6f 75 72  28 30 2c 30 29 0d 00 a0  |t_colour(0,0)...|
000001f0  19 42 25 3d 34 3a e3 20  41 25 3d 30 20 b8 20 73  |.B%=4:. A%=0 . s|
00000200  68 5f 6e 25 2d 31 0d 00  aa 89 21 28 73 68 5f 78  |h_n%-1....!(sh_x|
00000210  25 2b 41 25 2a 34 29 2b  3d 21 28 73 68 5f 64 78  |%+A%*4)+=!(sh_dx|
00000220  25 2b 41 25 2a 34 29 3a  e7 20 21 28 73 68 5f 78  |%+A%*4):. !(sh_x|
00000230  25 2b 41 25 2a 34 29 3c  30 20 84 20 21 28 73 68  |%+A%*4)<0 . !(sh|
00000240  5f 78 25 2b 41 25 2a 34  29 3e 6d 61 78 5f 78 25  |_x%+A%*4)>max_x%|
00000250  20 8c 20 21 28 73 68 5f  64 78 25 2b 41 25 2a 34  | . !(sh_dx%+A%*4|
00000260  29 3d 2d 21 28 73 68 5f  64 78 25 2b 41 25 2a 34  |)=-!(sh_dx%+A%*4|
00000270  29 3a 21 28 73 68 5f 78  25 2b 41 25 2a 34 29 2b  |):!(sh_x%+A%*4)+|
00000280  3d 21 28 73 68 5f 64 78  25 2b 41 25 2a 34 29 0d  |=!(sh_dx%+A%*4).|
00000290  00 b4 89 21 28 73 68 5f  79 25 2b 41 25 2a 34 29  |...!(sh_y%+A%*4)|
000002a0  2b 3d 21 28 73 68 5f 64  79 25 2b 41 25 2a 34 29  |+=!(sh_dy%+A%*4)|
000002b0  3a e7 20 21 28 73 68 5f  79 25 2b 41 25 2a 34 29  |:. !(sh_y%+A%*4)|
000002c0  3c 30 20 84 20 21 28 73  68 5f 79 25 2b 41 25 2a  |<0 . !(sh_y%+A%*|
000002d0  34 29 3e 6d 61 78 5f 79  25 20 8c 20 21 28 73 68  |4)>max_y% . !(sh|
000002e0  5f 64 79 25 2b 41 25 2a  34 29 3d 2d 21 28 73 68  |_dy%+A%*4)=-!(sh|
000002f0  5f 64 79 25 2b 41 25 2a  34 29 3a 21 28 73 68 5f  |_dy%+A%*4):!(sh_|
00000300  79 25 2b 41 25 2a 34 29  2b 3d 21 28 73 68 5f 64  |y%+A%*4)+=!(sh_d|
00000310  79 25 2b 41 25 2a 34 29  0d 00 be 29 f0 20 42 25  |y%+A%*4)...). B%|
00000320  2c 21 28 73 68 5f 78 25  2b 41 25 2a 34 29 2c 21  |,!(sh_x%+A%*4),!|
00000330  28 73 68 5f 79 25 2b 41  25 2a 34 29 3a 42 25 3d  |(sh_y%+A%*4):B%=|
00000340  35 0d 00 c8 17 ed 3a f0  20 35 2c 21 73 68 5f 78  |5.....:. 5,!sh_x|
00000350  25 2c 21 73 68 5f 79 25  0d 00 d2 1b e7 20 6e 6f  |%,!sh_y%..... no|
00000360  77 5f 67 6f 69 6e 67 25  3e 31 32 30 30 30 20 8c  |w_going%>12000 .|
00000370  20 3d b9 0d 00 dc 0b 73  68 5f 66 25 3d a3 0d 00  | =.....sh_f%=...|
00000380  e6 06 3d 31 0d 00 f0 04  0d 00 fa 10 dd a4 73 68  |..=1..........sh|
00000390  61 70 65 5f 73 74 6f 70  0d 01 04 39 f2 66 72 65  |ape_stop...9.fre|
000003a0  65 28 73 68 5f 78 25 29  3a f2 66 72 65 65 28 73  |e(sh_x%):.free(s|
000003b0  68 5f 79 25 29 3a f2 66  72 65 65 28 73 68 5f 64  |h_y%):.free(sh_d|
000003c0  78 25 29 3a f2 66 72 65  65 28 73 68 5f 64 79 25  |x%):.free(sh_dy%|
000003d0  29 0d 01 0e 06 3d 30 0d  01 18 04 0d ff           |)....=0......|
000003dd