-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrotate.bas
More file actions
executable file
·46 lines (40 loc) · 831 Bytes
/
rotate.bas
File metadata and controls
executable file
·46 lines (40 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
nop=120 'number of pixels
ox=159
oy=99
an=(22/7)/180
dim sprite(nop,3)
for t=1 to nop
randomize timer
sprite (t,1)=int(rnd*16)'radius
sprite (t,2)=int(rnd*359)'degrees
sprite (t,3)=int(rnd*100)'color
next
screen 13
gosub drawit
routinne:
a$=inkey$
if a$=chr$(0)+chr$(72) gosub turnleft
if a$=chr$(0)+chr$(77) gosub turnright
'not sure about scancodes
if a$=chr$(27) then end
goto routinne
turnleft:
for t=1 to nop
sprite (t,2)=sprite(t,2)+5
if sprite (t,2)>360 then sprite(t,2)=sprite(t,2)-360
next
gosub drawit
return
turnright:
for t=1 to nop
sprite (t,2)=sprite(t,2)-5
if sprite (t,2)<0 then sprite(t,2)=sprite(t,2)+360
next
gosub drawit
return
drawit:
cls
for t=1 to nop
pset (ox+(sprite(t,1)*cos(sprite(t,2)*an),oy-(sprite(t,1)*sin(sprite(t,2)*an)),sprite(t,3)
next
return