Home » Archimedes archive » Acorn User » AU 1998-05 A.adf » Regulars » StarInfo/Vibe/ROTATE

StarInfo/Vibe/ROTATE

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 1998-05 A.adf » Regulars
Filename: StarInfo/Vibe/ROTATE
Read OK:
File size: 0337 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > ROTATE
   20
   30REM This program demonstrates a call to the
   40REM spritesystem, which can rotate a sprite
   50REM around the lower left corner.
   60
   70MODE31:OFF
   80DIM SPR &1000,MAT 24
   90SPR!0=&FFF:SPR!4=0:SPR!8=16:SPR!12=16
  100
  110SYS"OS_SpriteOp",256+15,SPR,"TEST",0,256,12,31
  120SYS"OS_SpriteOp",256+29,SPR,"TEST"
  130SYS"OS_SpriteOp",256+60,SPR,"TEST"
  140GCOL4:RECTANGLE FILL 200,0,384,23:GCOL7
  150VDU5:MOVE240,19:PRINT"This is a TEST!!";:VDU4
  160GCOL5:LINE 0,0,512,0
  170SYS"OS_SpriteOp",256+61,SPR,"TEST"
  180GCOL0:RECTANGLE FILL 0,0,512,24
  190GCOL15:RECTANGLE FILL 200,0,384,23:LINE 0,0,512,0
  200SYS"OS_SpriteOp",256+61,SPR,0
  210FOR N%=0TO360STEP10
  220PROCROT(800,600,N%,"TEST")
  230NEXT
  240END
  250
  260DEFPROCROT(X%,Y%,A%,SP$)
  270LOCAL T,SI%,CO%
  280T=RAD(A%):SI%=65536*SINT::CO%=65536*COST
  290MAT!00=CO%:MAT!04=SI%:MAT!08=-SI%:MAT!12=CO%
  300MAT!16=256*X%:MAT!20=256*Y%
  310SYS"OS_SpriteOp",256+56,SPR,SP$,0,,8,MAT
  320ENDPROC

� > ROTATE

-� This program demonstrates a call to the
(-� spritesystem, which can rotate a sprite
2#� around the lower left corner.
<
F	�31:�
P� SPR &1000,MAT 24
Z)SPR!0=&FFF:SPR!4=0:SPR!8=16:SPR!12=16
d
n1ș"OS_SpriteOp",256+15,SPR,"TEST",0,256,12,31
x%ș"OS_SpriteOp",256+29,SPR,"TEST"
�%ș"OS_SpriteOp",256+60,SPR,"TEST"
��4:ȓ Ȑ 200,0,384,23:�7
�&�5:�240,19:�"This is a TEST!!";:�4
��5:� 0,0,512,0
�%ș"OS_SpriteOp",256+61,SPR,"TEST"
��0:ȓ Ȑ 0,0,512,24
�&�15:ȓ Ȑ 200,0,384,23:� 0,0,512,0
� ș"OS_SpriteOp",256+61,SPR,0
�� N%=0�360�10
��ROT(800,600,N%,"TEST")
��
��
�
��ROT(X%,Y%,A%,SP$)
� T,SI%,CO%
&T=�(A%):SI%=65536*�T::CO%=65536*�T
"0MAT!00=CO%:MAT!04=SI%:MAT!08=-SI%:MAT!12=CO%
,MAT!16=256*X%:MAT!20=256*Y%
6+ș"OS_SpriteOp",256+56,SPR,SP$,0,,8,MAT
@�
�
00000000  0d 00 0a 0e f4 20 3e 20  52 4f 54 41 54 45 0d 00  |..... > ROTATE..|
00000010  14 04 0d 00 1e 2d f4 20  54 68 69 73 20 70 72 6f  |.....-. This pro|
00000020  67 72 61 6d 20 64 65 6d  6f 6e 73 74 72 61 74 65  |gram demonstrate|
00000030  73 20 61 20 63 61 6c 6c  20 74 6f 20 74 68 65 0d  |s a call to the.|
00000040  00 28 2d f4 20 73 70 72  69 74 65 73 79 73 74 65  |.(-. spritesyste|
00000050  6d 2c 20 77 68 69 63 68  20 63 61 6e 20 72 6f 74  |m, which can rot|
00000060  61 74 65 20 61 20 73 70  72 69 74 65 0d 00 32 23  |ate a sprite..2#|
00000070  f4 20 61 72 6f 75 6e 64  20 74 68 65 20 6c 6f 77  |. around the low|
00000080  65 72 20 6c 65 66 74 20  63 6f 72 6e 65 72 2e 0d  |er left corner..|
00000090  00 3c 04 0d 00 46 09 eb  33 31 3a 87 0d 00 50 16  |.<...F..31:...P.|
000000a0  de 20 53 50 52 20 26 31  30 30 30 2c 4d 41 54 20  |. SPR &1000,MAT |
000000b0  32 34 0d 00 5a 29 53 50  52 21 30 3d 26 46 46 46  |24..Z)SPR!0=&FFF|
000000c0  3a 53 50 52 21 34 3d 30  3a 53 50 52 21 38 3d 31  |:SPR!4=0:SPR!8=1|
000000d0  36 3a 53 50 52 21 31 32  3d 31 36 0d 00 64 04 0d  |6:SPR!12=16..d..|
000000e0  00 6e 31 c8 99 22 4f 53  5f 53 70 72 69 74 65 4f  |.n1.."OS_SpriteO|
000000f0  70 22 2c 32 35 36 2b 31  35 2c 53 50 52 2c 22 54  |p",256+15,SPR,"T|
00000100  45 53 54 22 2c 30 2c 32  35 36 2c 31 32 2c 33 31  |EST",0,256,12,31|
00000110  0d 00 78 25 c8 99 22 4f  53 5f 53 70 72 69 74 65  |..x%.."OS_Sprite|
00000120  4f 70 22 2c 32 35 36 2b  32 39 2c 53 50 52 2c 22  |Op",256+29,SPR,"|
00000130  54 45 53 54 22 0d 00 82  25 c8 99 22 4f 53 5f 53  |TEST"...%.."OS_S|
00000140  70 72 69 74 65 4f 70 22  2c 32 35 36 2b 36 30 2c  |priteOp",256+60,|
00000150  53 50 52 2c 22 54 45 53  54 22 0d 00 8c 1c e6 34  |SPR,"TEST".....4|
00000160  3a c8 93 20 c8 90 20 32  30 30 2c 30 2c 33 38 34  |:.. .. 200,0,384|
00000170  2c 32 33 3a e6 37 0d 00  96 26 ef 35 3a ec 32 34  |,23:.7...&.5:.24|
00000180  30 2c 31 39 3a f1 22 54  68 69 73 20 69 73 20 61  |0,19:."This is a|
00000190  20 54 45 53 54 21 21 22  3b 3a ef 34 0d 00 a0 12  | TEST!!";:.4....|
000001a0  e6 35 3a 86 20 30 2c 30  2c 35 31 32 2c 30 0d 00  |.5:. 0,0,512,0..|
000001b0  aa 25 c8 99 22 4f 53 5f  53 70 72 69 74 65 4f 70  |.%.."OS_SpriteOp|
000001c0  22 2c 32 35 36 2b 36 31  2c 53 50 52 2c 22 54 45  |",256+61,SPR,"TE|
000001d0  53 54 22 0d 00 b4 17 e6  30 3a c8 93 20 c8 90 20  |ST".....0:.. .. |
000001e0  30 2c 30 2c 35 31 32 2c  32 34 0d 00 be 26 e6 31  |0,0,512,24...&.1|
000001f0  35 3a c8 93 20 c8 90 20  32 30 30 2c 30 2c 33 38  |5:.. .. 200,0,38|
00000200  34 2c 32 33 3a 86 20 30  2c 30 2c 35 31 32 2c 30  |4,23:. 0,0,512,0|
00000210  0d 00 c8 20 c8 99 22 4f  53 5f 53 70 72 69 74 65  |... .."OS_Sprite|
00000220  4f 70 22 2c 32 35 36 2b  36 31 2c 53 50 52 2c 30  |Op",256+61,SPR,0|
00000230  0d 00 d2 11 e3 20 4e 25  3d 30 b8 33 36 30 88 31  |..... N%=0.360.1|
00000240  30 0d 00 dc 1b f2 52 4f  54 28 38 30 30 2c 36 30  |0.....ROT(800,60|
00000250  30 2c 4e 25 2c 22 54 45  53 54 22 29 0d 00 e6 05  |0,N%,"TEST")....|
00000260  ed 0d 00 f0 05 e0 0d 00  fa 04 0d 01 04 17 dd f2  |................|
00000270  52 4f 54 28 58 25 2c 59  25 2c 41 25 2c 53 50 24  |ROT(X%,Y%,A%,SP$|
00000280  29 0d 01 0e 0f ea 20 54  2c 53 49 25 2c 43 4f 25  |)..... T,SI%,CO%|
00000290  0d 01 18 26 54 3d b2 28  41 25 29 3a 53 49 25 3d  |...&T=.(A%):SI%=|
000002a0  36 35 35 33 36 2a b5 54  3a 3a 43 4f 25 3d 36 35  |65536*.T::CO%=65|
000002b0  35 33 36 2a 9b 54 0d 01  22 30 4d 41 54 21 30 30  |536*.T.."0MAT!00|
000002c0  3d 43 4f 25 3a 4d 41 54  21 30 34 3d 53 49 25 3a  |=CO%:MAT!04=SI%:|
000002d0  4d 41 54 21 30 38 3d 2d  53 49 25 3a 4d 41 54 21  |MAT!08=-SI%:MAT!|
000002e0  31 32 3d 43 4f 25 0d 01  2c 1f 4d 41 54 21 31 36  |12=CO%..,.MAT!16|
000002f0  3d 32 35 36 2a 58 25 3a  4d 41 54 21 32 30 3d 32  |=256*X%:MAT!20=2|
00000300  35 36 2a 59 25 0d 01 36  2b c8 99 22 4f 53 5f 53  |56*Y%..6+.."OS_S|
00000310  70 72 69 74 65 4f 70 22  2c 32 35 36 2b 35 36 2c  |priteOp",256+56,|
00000320  53 50 52 2c 53 50 24 2c  30 2c 2c 38 2c 4d 41 54  |SPR,SP$,0,,8,MAT|
00000330  0d 01 40 05 e1 0d ff                              |..@....|
00000337