Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras » PDScheme/!BackDrops/!RunImage

PDScheme/!BackDrops/!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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras
Filename: PDScheme/!BackDrops/!RunImage
Read OK:
File size: 0335 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM BackDrops - random backdrop selector
   20REM LEN Andrew J Booker (April 96)
   30:
   40DIM data% 950,no%(80),mem% 4
   50!mem%=3:SYS "OS_Word",14,mem%
   60X%=!mem%
   70IF X%=0 THENX%=-1
   80IF X%>0 THENX%=-X%
  110X%=RND(X%)
  120OSCLI "Load BackDrops:Data "+STR$~data%
  130no%=data%?937
  140IF no%=255 THEN
  150  count%=0
  160  FOR loop%=0 TO ?data%
  170    IF ((?(data%+12+loop%*12))AND1)=1 THEN no%(count%)=loop%:count%+=1
  180  NEXT
  190  CASE count% OF
  200  WHEN 0:no%=0
  210  WHEN 1:no%=no%(0)
  220  OTHERWISE:no%=no%(RND(count%)-1)
  230  ENDCASE
  240ENDIF
  250IF no%>0 THEN
  260  name$=FNctrltermstr(data%+1+no%*12)
  270  flags%=((?(data%+12+no%*12))>>6)
  280  CASE flags% OF
  290  WHEN 0:opt$="-tile"
  300  WHEN 1:opt$="-scale"
  310  OTHERWISE:opt$="-centre"
  320  ENDCASE
  330  OSCLI "BackDrop "+opt$+" BackDrops:Sprites."+name$
  340ENDIF
  350END
  360:
  370:
  380DEFFNctrltermstr(addr%)
  390x$=""
  400WHILE ?addr%>31
  410x$+=CHR$(?addr%)
  420addr%+=1
  430ENDWHILE
  440=x$

*� BackDrops - random backdrop selector
"� � Andrew J Booker (April 96)
:
(� data% 950,no%(80),mem% 4
2 !mem%=3:ș "OS_Word",14,mem%
<X%=!mem%
F� X%=0 �X%=-1
P� X%>0 �X%=-X%
nX%=�(X%)
x$� "Load BackDrops:Data "+�~data%
�no%=data%?937
�� no%=255 �
�  count%=0
�  � loop%=0 � ?data%
�D    � ((?(data%+12+loop%*12))�1)=1 � no%(count%)=loop%:count%+=1
�  �
�  Ȏ count% �
�  � 0:no%=0
�  � 1:no%=no%(0)
�  :no%=no%(�(count%)-1)
�  �
��
�
� no%>0 �
(  name$=�ctrltermstr(data%+1+no%*12)
&  flags%=((?(data%+12+no%*12))>>6)
  Ȏ flags% �
"  � 0:opt$="-tile"
,  � 1:opt$="-scale"
6  :opt$="-centre"
@  �
J4  � "BackDrop "+opt$+" BackDrops:Sprites."+name$
T�
^�
h:
r:
|ݤctrltermstr(addr%)
�	x$=""
�ȕ ?addr%>31
�x$+=�(?addr%)
�addr%+=1
��
�=x$
�
00000000  0d 00 0a 2a f4 20 42 61  63 6b 44 72 6f 70 73 20  |...*. BackDrops |
00000010  2d 20 72 61 6e 64 6f 6d  20 62 61 63 6b 64 72 6f  |- random backdro|
00000020  70 20 73 65 6c 65 63 74  6f 72 0d 00 14 22 f4 20  |p selector...". |
00000030  a9 20 41 6e 64 72 65 77  20 4a 20 42 6f 6f 6b 65  |. Andrew J Booke|
00000040  72 20 28 41 70 72 69 6c  20 39 36 29 0d 00 1e 05  |r (April 96)....|
00000050  3a 0d 00 28 1e de 20 64  61 74 61 25 20 39 35 30  |:..(.. data% 950|
00000060  2c 6e 6f 25 28 38 30 29  2c 6d 65 6d 25 20 34 0d  |,no%(80),mem% 4.|
00000070  00 32 20 21 6d 65 6d 25  3d 33 3a c8 99 20 22 4f  |.2 !mem%=3:.. "O|
00000080  53 5f 57 6f 72 64 22 2c  31 34 2c 6d 65 6d 25 0d  |S_Word",14,mem%.|
00000090  00 3c 0c 58 25 3d 21 6d  65 6d 25 0d 00 46 11 e7  |.<.X%=!mem%..F..|
000000a0  20 58 25 3d 30 20 8c 58  25 3d 2d 31 0d 00 50 12  | X%=0 .X%=-1..P.|
000000b0  e7 20 58 25 3e 30 20 8c  58 25 3d 2d 58 25 0d 00  |. X%>0 .X%=-X%..|
000000c0  6e 0c 58 25 3d b3 28 58  25 29 0d 00 78 24 ff 20  |n.X%=.(X%)..x$. |
000000d0  22 4c 6f 61 64 20 42 61  63 6b 44 72 6f 70 73 3a  |"Load BackDrops:|
000000e0  44 61 74 61 20 22 2b c3  7e 64 61 74 61 25 0d 00  |Data "+.~data%..|
000000f0  82 11 6e 6f 25 3d 64 61  74 61 25 3f 39 33 37 0d  |..no%=data%?937.|
00000100  00 8c 0f e7 20 6e 6f 25  3d 32 35 35 20 8c 0d 00  |.... no%=255 ...|
00000110  96 0e 20 20 63 6f 75 6e  74 25 3d 30 0d 00 a0 18  |..  count%=0....|
00000120  20 20 e3 20 6c 6f 6f 70  25 3d 30 20 b8 20 3f 64  |  . loop%=0 . ?d|
00000130  61 74 61 25 0d 00 aa 44  20 20 20 20 e7 20 28 28  |ata%...D    . ((|
00000140  3f 28 64 61 74 61 25 2b  31 32 2b 6c 6f 6f 70 25  |?(data%+12+loop%|
00000150  2a 31 32 29 29 80 31 29  3d 31 20 8c 20 6e 6f 25  |*12)).1)=1 . no%|
00000160  28 63 6f 75 6e 74 25 29  3d 6c 6f 6f 70 25 3a 63  |(count%)=loop%:c|
00000170  6f 75 6e 74 25 2b 3d 31  0d 00 b4 07 20 20 ed 0d  |ount%+=1....  ..|
00000180  00 be 11 20 20 c8 8e 20  63 6f 75 6e 74 25 20 ca  |...  .. count% .|
00000190  0d 00 c8 0f 20 20 c9 20  30 3a 6e 6f 25 3d 30 0d  |....  . 0:no%=0.|
000001a0  00 d2 14 20 20 c9 20 31  3a 6e 6f 25 3d 6e 6f 25  |...  . 1:no%=no%|
000001b0  28 30 29 0d 00 dc 1c 20  20 7f 3a 6e 6f 25 3d 6e  |(0)....  .:no%=n|
000001c0  6f 25 28 b3 28 63 6f 75  6e 74 25 29 2d 31 29 0d  |o%(.(count%)-1).|
000001d0  00 e6 07 20 20 cb 0d 00  f0 05 cd 0d 00 fa 0d e7  |...  ...........|
000001e0  20 6e 6f 25 3e 30 20 8c  0d 01 04 28 20 20 6e 61  | no%>0 ....(  na|
000001f0  6d 65 24 3d a4 63 74 72  6c 74 65 72 6d 73 74 72  |me$=.ctrltermstr|
00000200  28 64 61 74 61 25 2b 31  2b 6e 6f 25 2a 31 32 29  |(data%+1+no%*12)|
00000210  0d 01 0e 26 20 20 66 6c  61 67 73 25 3d 28 28 3f  |...&  flags%=((?|
00000220  28 64 61 74 61 25 2b 31  32 2b 6e 6f 25 2a 31 32  |(data%+12+no%*12|
00000230  29 29 3e 3e 36 29 0d 01  18 11 20 20 c8 8e 20 66  |))>>6)....  .. f|
00000240  6c 61 67 73 25 20 ca 0d  01 22 16 20 20 c9 20 30  |lags% ...".  . 0|
00000250  3a 6f 70 74 24 3d 22 2d  74 69 6c 65 22 0d 01 2c  |:opt$="-tile"..,|
00000260  17 20 20 c9 20 31 3a 6f  70 74 24 3d 22 2d 73 63  |.  . 1:opt$="-sc|
00000270  61 6c 65 22 0d 01 36 16  20 20 7f 3a 6f 70 74 24  |ale"..6.  .:opt$|
00000280  3d 22 2d 63 65 6e 74 72  65 22 0d 01 40 07 20 20  |="-centre"..@.  |
00000290  cb 0d 01 4a 34 20 20 ff  20 22 42 61 63 6b 44 72  |...J4  . "BackDr|
000002a0  6f 70 20 22 2b 6f 70 74  24 2b 22 20 42 61 63 6b  |op "+opt$+" Back|
000002b0  44 72 6f 70 73 3a 53 70  72 69 74 65 73 2e 22 2b  |Drops:Sprites."+|
000002c0  6e 61 6d 65 24 0d 01 54  05 cd 0d 01 5e 05 e0 0d  |name$..T....^...|
000002d0  01 68 05 3a 0d 01 72 05  3a 0d 01 7c 18 dd a4 63  |.h.:..r.:..|...c|
000002e0  74 72 6c 74 65 72 6d 73  74 72 28 61 64 64 72 25  |trltermstr(addr%|
000002f0  29 0d 01 86 09 78 24 3d  22 22 0d 01 90 10 c8 95  |)....x$=""......|
00000300  20 3f 61 64 64 72 25 3e  33 31 0d 01 9a 11 78 24  | ?addr%>31....x$|
00000310  2b 3d bd 28 3f 61 64 64  72 25 29 0d 01 a4 0c 61  |+=.(?addr%)....a|
00000320  64 64 72 25 2b 3d 31 0d  01 ae 05 ce 0d 01 b8 07  |ddr%+=1.........|
00000330  3d 78 24 0d ff                                    |=x$..|
00000335