Home » Archimedes archive » Acorn User » AU 1994-04.adf » !StarInfo_StarInfo » 3D/Gutteridge

3D/Gutteridge

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 1994-04.adf » !StarInfo_StarInfo
Filename: 3D/Gutteridge
Read OK:
File size: 06EE bytes
Load address: 0000
Exec address: 0000
File contents
   10REM     >3D
   20REM By  Bryan Creer, Modified to convert from Sprite Files by Steve Gutteridge
   30REM (c) AU December 1993/April 1994
   40:
   50MODE 8
   60INPUT "Name of sprite to convert   : "in$
   70PROCsprites(in$)
   80SYS "OS_SpriteOp",40+512,sprite%,first% TO ,,,width,height,mask,mode
   90IF width<>640 OR height<>256 OR mode<>15 THEN
  100  PRINT "Sprite must be in Mode 15, be 640 pixels wide and 256 pixels high."
  110  STOP
  120ENDIF
  130PRINT "(C)olour or (B)lack & White : ";:m$=GET$:PRINT m$
  140INPUT "Save output as              : "out$
  150CLS
  160IF m$="C" OR m$="c" THEN MODE 12
  170
  180ORIGIN 640,512
  190OFF
  200e%=384
  210l%=2000
  220depth%=l%/400
  230sx%=0:sy%=0
  240IF m$="C" OR m$="c" THEN
  250COLOUR 0,0,0,0
  260COLOUR 01,112,112,0
  270COLOUR 02,240,240,0
  280COLOUR 03,048,112,0
  290COLOUR 04,112,240,0
  300COLOUR 05,000,112,0
  310COLOUR 06,000,240,0
  320COLOUR 07,000,112,048
  330COLOUR 08,000,240,112
  340COLOUR 09,000,112,080
  350COLOUR 10,000,240,176
  360COLOUR 11,000,112,112
  370COLOUR 12,000,240,240
  380COLOUR 13,000,080,112
  390COLOUR 14,000,176,240
  400COLOUR 15,000,112,240
  410ELSE
  420COLOUR 0,0,0,0
  430COLOUR 1,16,16,16
  440COLOUR 2,240,240,240
  450ENDIF
  460FOR x%=-640 TO 636 STEP 2
  470 FOR y%=-512 TO 508 STEP 4
  480  p% = POINT(x%,y%)
  490  s%=FNdistance
  500  IF p% = 0 THEN
  510   IF m$="C" OR m$="c" THEN
  520     c%=2*(1+(y%+448+RND(128))DIV148)-2 + RND(2)
  530   ELSE
  540     c%=RND(2)
  550   ENDIF
  560   GCOL c%
  570   POINT x%,y%
  580   p% = c%
  590  ENDIF
  600  GCOL p%
  610  POINT x%+s%,y%
  620  sy%=sy%+1
  630 NEXT
  640 sx%=sx%+1:sy%=0
  650NEXT
  660SYS "OS_SpriteOp",2,,out$,1
  670VDU 7
  680IFGET
  690ON
  700END
  710:
  720DEF FNdistance
  730SYS "OS_SpriteOp",41+512,sprite%,first%,sx%,sy% TO ,,,,,col%,tin%
  740d%=l%-depth%*(255-(col%*4+(tin% MOD 64)))
  750=e%*d%/(l%+d%)
  760
  770DEF PROCsprites(file$)
  780sp=OPENIN(file$)
  790dim%=EXT#sp+16
  800CLOSE#sp
  810DIM sprite% dim%
  820!sprite%=dim%
  830sprite%!4=0
  840sprite%!8=16
  850sprite%!12=16
  860SYS "OS_SpriteOp",256+10,sprite%,file$
  870SYS "OS_SpriteOp",256+8,sprite% TO ,,,,first%
  880first%=sprite%+first%
  890ENDPROC


�     >3D
P� By  Bryan Creer, Modified to convert from Sprite Files by Steve Gutteridge
%� (c) AU December 1993/April 1994
(:
2� 8
<)� "Name of sprite to convert   : "in$
F�sprites(in$)
PFș "OS_SpriteOp",40+512,sprite%,first% � ,,,width,height,mask,mode
Z+� width<>640 � height<>256 � mode<>15 �
dL  � "Sprite must be in Mode 15, be 640 pixels wide and 256 pixels high."
n  �
x�
�1� "(C)olour or (B)lack & White : ";:m$=�:� m$
�*� "Save output as              : "out$
��
�� m$="C" � m$="c" � � 12
�
�ȑ 640,512
��
�
e%=384
�l%=2000
�depth%=l%/400
�sx%=0:sy%=0
�� m$="C" � m$="c" �
�
� 0,0,0,0
� 01,112,112,0
� 02,240,240,0
� 03,048,112,0
"� 04,112,240,0
,� 05,000,112,0
6� 06,000,240,0
@� 07,000,112,048
J� 08,000,240,112
T� 09,000,112,080
^� 10,000,240,176
h� 11,000,112,112
r� 12,000,240,240
|� 13,000,080,112
�� 14,000,176,240
�� 15,000,112,240
��
�
� 0,0,0,0
�� 1,16,16,16
�� 2,240,240,240
��
�� x%=-640 � 636 � 2
� � y%=-512 � 508 � 4
�  p% = �x%,y%)
�  s%=�distance
�  � p% = 0 �
�   � m$="C" � m$="c" �
.     c%=2*(1+(y%+448+�(128))�148)-2 + �(2)
   �
     c%=�(2)
&   �
0   � c%
:   Ȓ x%,y%
D   p% = c%
N  �
X
  � p%
b  Ȓ x%+s%,y%
l  sy%=sy%+1
v �
� sx%=sx%+1:sy%=0
��
�ș "OS_SpriteOp",2,,out$,1
�� 7
��
��
��
�:
�� �distance
�Cș "OS_SpriteOp",41+512,sprite%,first%,sx%,sy% � ,,,,,col%,tin%
�+d%=l%-depth%*(255-(col%*4+(tin% � 64)))
�=e%*d%/(l%+d%)
�
� �sprites(file$)
sp=�(file$)
dim%=�#sp+16
 �#sp
*� sprite% dim%
4!sprite%=dim%
>sprite%!4=0
Hsprite%!8=16
Rsprite%!12=16
\)ș "OS_SpriteOp",256+10,sprite%,file$
f/ș "OS_SpriteOp",256+8,sprite% � ,,,,first%
pfirst%=sprite%+first%
z�
�
00000000  0d 00 0a 0d f4 20 20 20  20 20 3e 33 44 0d 00 14  |.....     >3D...|
00000010  50 f4 20 42 79 20 20 42  72 79 61 6e 20 43 72 65  |P. By  Bryan Cre|
00000020  65 72 2c 20 4d 6f 64 69  66 69 65 64 20 74 6f 20  |er, Modified to |
00000030  63 6f 6e 76 65 72 74 20  66 72 6f 6d 20 53 70 72  |convert from Spr|
00000040  69 74 65 20 46 69 6c 65  73 20 62 79 20 53 74 65  |ite Files by Ste|
00000050  76 65 20 47 75 74 74 65  72 69 64 67 65 0d 00 1e  |ve Gutteridge...|
00000060  25 f4 20 28 63 29 20 41  55 20 44 65 63 65 6d 62  |%. (c) AU Decemb|
00000070  65 72 20 31 39 39 33 2f  41 70 72 69 6c 20 31 39  |er 1993/April 19|
00000080  39 34 0d 00 28 05 3a 0d  00 32 07 eb 20 38 0d 00  |94..(.:..2.. 8..|
00000090  3c 29 e8 20 22 4e 61 6d  65 20 6f 66 20 73 70 72  |<). "Name of spr|
000000a0  69 74 65 20 74 6f 20 63  6f 6e 76 65 72 74 20 20  |ite to convert  |
000000b0  20 3a 20 22 69 6e 24 0d  00 46 11 f2 73 70 72 69  | : "in$..F..spri|
000000c0  74 65 73 28 69 6e 24 29  0d 00 50 46 c8 99 20 22  |tes(in$)..PF.. "|
000000d0  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 34 30 2b  |OS_SpriteOp",40+|
000000e0  35 31 32 2c 73 70 72 69  74 65 25 2c 66 69 72 73  |512,sprite%,firs|
000000f0  74 25 20 b8 20 2c 2c 2c  77 69 64 74 68 2c 68 65  |t% . ,,,width,he|
00000100  69 67 68 74 2c 6d 61 73  6b 2c 6d 6f 64 65 0d 00  |ight,mask,mode..|
00000110  5a 2b e7 20 77 69 64 74  68 3c 3e 36 34 30 20 84  |Z+. width<>640 .|
00000120  20 68 65 69 67 68 74 3c  3e 32 35 36 20 84 20 6d  | height<>256 . m|
00000130  6f 64 65 3c 3e 31 35 20  8c 0d 00 64 4c 20 20 f1  |ode<>15 ...dL  .|
00000140  20 22 53 70 72 69 74 65  20 6d 75 73 74 20 62 65  | "Sprite must be|
00000150  20 69 6e 20 4d 6f 64 65  20 31 35 2c 20 62 65 20  | in Mode 15, be |
00000160  36 34 30 20 70 69 78 65  6c 73 20 77 69 64 65 20  |640 pixels wide |
00000170  61 6e 64 20 32 35 36 20  70 69 78 65 6c 73 20 68  |and 256 pixels h|
00000180  69 67 68 2e 22 0d 00 6e  07 20 20 fa 0d 00 78 05  |igh."..n.  ...x.|
00000190  cd 0d 00 82 31 f1 20 22  28 43 29 6f 6c 6f 75 72  |....1. "(C)olour|
000001a0  20 6f 72 20 28 42 29 6c  61 63 6b 20 26 20 57 68  | or (B)lack & Wh|
000001b0  69 74 65 20 3a 20 22 3b  3a 6d 24 3d be 3a f1 20  |ite : ";:m$=.:. |
000001c0  6d 24 0d 00 8c 2a e8 20  22 53 61 76 65 20 6f 75  |m$...*. "Save ou|
000001d0  74 70 75 74 20 61 73 20  20 20 20 20 20 20 20 20  |tput as         |
000001e0  20 20 20 20 20 3a 20 22  6f 75 74 24 0d 00 96 05  |     : "out$....|
000001f0  db 0d 00 a0 1c e7 20 6d  24 3d 22 43 22 20 84 20  |...... m$="C" . |
00000200  6d 24 3d 22 63 22 20 8c  20 eb 20 31 32 0d 00 aa  |m$="c" . . 12...|
00000210  04 0d 00 b4 0e c8 91 20  36 34 30 2c 35 31 32 0d  |....... 640,512.|
00000220  00 be 05 87 0d 00 c8 0a  65 25 3d 33 38 34 0d 00  |........e%=384..|
00000230  d2 0b 6c 25 3d 32 30 30  30 0d 00 dc 11 64 65 70  |..l%=2000....dep|
00000240  74 68 25 3d 6c 25 2f 34  30 30 0d 00 e6 0f 73 78  |th%=l%/400....sx|
00000250  25 3d 30 3a 73 79 25 3d  30 0d 00 f0 17 e7 20 6d  |%=0:sy%=0..... m|
00000260  24 3d 22 43 22 20 84 20  6d 24 3d 22 63 22 20 8c  |$="C" . m$="c" .|
00000270  0d 00 fa 0d fb 20 30 2c  30 2c 30 2c 30 0d 01 04  |..... 0,0,0,0...|
00000280  12 fb 20 30 31 2c 31 31  32 2c 31 31 32 2c 30 0d  |.. 01,112,112,0.|
00000290  01 0e 12 fb 20 30 32 2c  32 34 30 2c 32 34 30 2c  |.... 02,240,240,|
000002a0  30 0d 01 18 12 fb 20 30  33 2c 30 34 38 2c 31 31  |0..... 03,048,11|
000002b0  32 2c 30 0d 01 22 12 fb  20 30 34 2c 31 31 32 2c  |2,0..".. 04,112,|
000002c0  32 34 30 2c 30 0d 01 2c  12 fb 20 30 35 2c 30 30  |240,0..,.. 05,00|
000002d0  30 2c 31 31 32 2c 30 0d  01 36 12 fb 20 30 36 2c  |0,112,0..6.. 06,|
000002e0  30 30 30 2c 32 34 30 2c  30 0d 01 40 14 fb 20 30  |000,240,0..@.. 0|
000002f0  37 2c 30 30 30 2c 31 31  32 2c 30 34 38 0d 01 4a  |7,000,112,048..J|
00000300  14 fb 20 30 38 2c 30 30  30 2c 32 34 30 2c 31 31  |.. 08,000,240,11|
00000310  32 0d 01 54 14 fb 20 30  39 2c 30 30 30 2c 31 31  |2..T.. 09,000,11|
00000320  32 2c 30 38 30 0d 01 5e  14 fb 20 31 30 2c 30 30  |2,080..^.. 10,00|
00000330  30 2c 32 34 30 2c 31 37  36 0d 01 68 14 fb 20 31  |0,240,176..h.. 1|
00000340  31 2c 30 30 30 2c 31 31  32 2c 31 31 32 0d 01 72  |1,000,112,112..r|
00000350  14 fb 20 31 32 2c 30 30  30 2c 32 34 30 2c 32 34  |.. 12,000,240,24|
00000360  30 0d 01 7c 14 fb 20 31  33 2c 30 30 30 2c 30 38  |0..|.. 13,000,08|
00000370  30 2c 31 31 32 0d 01 86  14 fb 20 31 34 2c 30 30  |0,112..... 14,00|
00000380  30 2c 31 37 36 2c 32 34  30 0d 01 90 14 fb 20 31  |0,176,240..... 1|
00000390  35 2c 30 30 30 2c 31 31  32 2c 32 34 30 0d 01 9a  |5,000,112,240...|
000003a0  05 cc 0d 01 a4 0d fb 20  30 2c 30 2c 30 2c 30 0d  |....... 0,0,0,0.|
000003b0  01 ae 10 fb 20 31 2c 31  36 2c 31 36 2c 31 36 0d  |.... 1,16,16,16.|
000003c0  01 b8 13 fb 20 32 2c 32  34 30 2c 32 34 30 2c 32  |.... 2,240,240,2|
000003d0  34 30 0d 01 c2 05 cd 0d  01 cc 17 e3 20 78 25 3d  |40.......... x%=|
000003e0  2d 36 34 30 20 b8 20 36  33 36 20 88 20 32 0d 01  |-640 . 636 . 2..|
000003f0  d6 18 20 e3 20 79 25 3d  2d 35 31 32 20 b8 20 35  |.. . y%=-512 . 5|
00000400  30 38 20 88 20 34 0d 01  e0 12 20 20 70 25 20 3d  |08 . 4....  p% =|
00000410  20 b0 78 25 2c 79 25 29  0d 01 ea 12 20 20 73 25  | .x%,y%)....  s%|
00000420  3d a4 64 69 73 74 61 6e  63 65 0d 01 f4 10 20 20  |=.distance....  |
00000430  e7 20 70 25 20 3d 20 30  20 8c 0d 01 fe 1a 20 20  |. p% = 0 .....  |
00000440  20 e7 20 6d 24 3d 22 43  22 20 84 20 6d 24 3d 22  | . m$="C" . m$="|
00000450  63 22 20 8c 0d 02 08 2e  20 20 20 20 20 63 25 3d  |c" .....     c%=|
00000460  32 2a 28 31 2b 28 79 25  2b 34 34 38 2b b3 28 31  |2*(1+(y%+448+.(1|
00000470  32 38 29 29 81 31 34 38  29 2d 32 20 2b 20 b3 28  |28)).148)-2 + .(|
00000480  32 29 0d 02 12 08 20 20  20 cc 0d 02 1c 10 20 20  |2)....   .....  |
00000490  20 20 20 63 25 3d b3 28  32 29 0d 02 26 08 20 20  |   c%=.(2)..&.  |
000004a0  20 cd 0d 02 30 0b 20 20  20 e6 20 63 25 0d 02 3a  | ...0.   . c%..:|
000004b0  0f 20 20 20 c8 92 20 78  25 2c 79 25 0d 02 44 0e  |.   .. x%,y%..D.|
000004c0  20 20 20 70 25 20 3d 20  63 25 0d 02 4e 07 20 20  |   p% = c%..N.  |
000004d0  cd 0d 02 58 0a 20 20 e6  20 70 25 0d 02 62 11 20  |...X.  . p%..b. |
000004e0  20 c8 92 20 78 25 2b 73  25 2c 79 25 0d 02 6c 0f  | .. x%+s%,y%..l.|
000004f0  20 20 73 79 25 3d 73 79  25 2b 31 0d 02 76 06 20  |  sy%=sy%+1..v. |
00000500  ed 0d 02 80 14 20 73 78  25 3d 73 78 25 2b 31 3a  |..... sx%=sx%+1:|
00000510  73 79 25 3d 30 0d 02 8a  05 ed 0d 02 94 1e c8 99  |sy%=0...........|
00000520  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 32  | "OS_SpriteOp",2|
00000530  2c 2c 6f 75 74 24 2c 31  0d 02 9e 07 ef 20 37 0d  |,,out$,1..... 7.|
00000540  02 a8 06 e7 a5 0d 02 b2  05 ee 0d 02 bc 05 e0 0d  |................|
00000550  02 c6 05 3a 0d 02 d0 0f  dd 20 a4 64 69 73 74 61  |...:..... .dista|
00000560  6e 63 65 0d 02 da 43 c8  99 20 22 4f 53 5f 53 70  |nce...C.. "OS_Sp|
00000570  72 69 74 65 4f 70 22 2c  34 31 2b 35 31 32 2c 73  |riteOp",41+512,s|
00000580  70 72 69 74 65 25 2c 66  69 72 73 74 25 2c 73 78  |prite%,first%,sx|
00000590  25 2c 73 79 25 20 b8 20  2c 2c 2c 2c 2c 63 6f 6c  |%,sy% . ,,,,,col|
000005a0  25 2c 74 69 6e 25 0d 02  e4 2b 64 25 3d 6c 25 2d  |%,tin%...+d%=l%-|
000005b0  64 65 70 74 68 25 2a 28  32 35 35 2d 28 63 6f 6c  |depth%*(255-(col|
000005c0  25 2a 34 2b 28 74 69 6e  25 20 83 20 36 34 29 29  |%*4+(tin% . 64))|
000005d0  29 0d 02 ee 12 3d 65 25  2a 64 25 2f 28 6c 25 2b  |)....=e%*d%/(l%+|
000005e0  64 25 29 0d 02 f8 04 0d  03 02 15 dd 20 f2 73 70  |d%)......... .sp|
000005f0  72 69 74 65 73 28 66 69  6c 65 24 29 0d 03 0c 0f  |rites(file$)....|
00000600  73 70 3d 8e 28 66 69 6c  65 24 29 0d 03 16 10 64  |sp=.(file$)....d|
00000610  69 6d 25 3d a2 23 73 70  2b 31 36 0d 03 20 08 d9  |im%=.#sp+16.. ..|
00000620  23 73 70 0d 03 2a 12 de  20 73 70 72 69 74 65 25  |#sp..*.. sprite%|
00000630  20 64 69 6d 25 0d 03 34  11 21 73 70 72 69 74 65  | dim%..4.!sprite|
00000640  25 3d 64 69 6d 25 0d 03  3e 0f 73 70 72 69 74 65  |%=dim%..>.sprite|
00000650  25 21 34 3d 30 0d 03 48  10 73 70 72 69 74 65 25  |%!4=0..H.sprite%|
00000660  21 38 3d 31 36 0d 03 52  11 73 70 72 69 74 65 25  |!8=16..R.sprite%|
00000670  21 31 32 3d 31 36 0d 03  5c 29 c8 99 20 22 4f 53  |!12=16..\).. "OS|
00000680  5f 53 70 72 69 74 65 4f  70 22 2c 32 35 36 2b 31  |_SpriteOp",256+1|
00000690  30 2c 73 70 72 69 74 65  25 2c 66 69 6c 65 24 0d  |0,sprite%,file$.|
000006a0  03 66 2f c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |.f/.. "OS_Sprite|
000006b0  4f 70 22 2c 32 35 36 2b  38 2c 73 70 72 69 74 65  |Op",256+8,sprite|
000006c0  25 20 b8 20 2c 2c 2c 2c  66 69 72 73 74 25 0d 03  |% . ,,,,first%..|
000006d0  70 19 66 69 72 73 74 25  3d 73 70 72 69 74 65 25  |p.first%=sprite%|
000006e0  2b 66 69 72 73 74 25 0d  03 7a 05 e1 0d ff        |+first%..z....|
000006ee