home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 82
/
082.d81
/
journal
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
82 lines
5 poke52,48:poke56,48:clr
10 rem first clear sprite memory
20 fort=0to63:poke12288+t,0:next
30 :
40 rem next poke in a ball shape
50 poke12288,56:poke12291,124:poke12294,124:poke12297,56
60 :
70 rem now set background/border to black
80 poke53280,0:poke53281,0
90 :
100 rem set x and y for sprite 0
110 x=53248:y=53249
120 :
130 rem m is our multiplier to convert radians to regular numbers
140 m=.0174532925
150 :
160 rem set up sprite pointers, etc.
170 pokex+21,1:poke2040,192:pokex+39,2
180 :
190 rem set to lowercase letters and clear screen
200 print"[147][129] [205]ark [202]ordan's [193]ngulizer"
210 :
220 rem position sprite at 55,220 -- near the bottom left of screen
230 pokex,55:pokey,220
240 :
250 rem let user determine angle to move sprite
260 print"[154][215]hat angle? ([159]1 - 89[154]) ";:l=2:gosub50000:an=val(q9$)
265 ifan<1oran>89thenprint"[145] [145]":goto260
270 :
280 rem and how far to move
285 print
290 print"[154][200]ow far right? ([159]1 - 200[154]) ";:l=3:gosub50000:b=val(q9$)
295 ifb<1orb>200thenprint"[145] [145]":goto290
300 :
310 rem find the tan and sin
320 ta=tan(an*m):si=sin(x*m)
330 :
340 rem calculate vertical side (a) and hypotenuse (c)
350 a=b*ta:c=-(a/si)
360 :
370 rem print all three sides lengths
380 print"[154][216]="a,"[154][217]="b:print"[154][200]ypotenuse="c
390 :
400 rem set create factors for moving sprite on (NULL) axis
410 yy=0:aa=a/b
420 :
430 rem move sprite however far user determined for length (x) via loop
440 fori=1tob
450 :
460 rem add y factor each time through
470 yy=yy+aa
480 :
490 rem move sprite over 1 each time through loop
500 pokex,peek(x)+1
510 :
520 rem move sprite up factored amount each time through loop
530 ifyy>220theni=b:goto560
535 pokey,220-yy
540 :
550 rem finish loop
560 next
570 :
580 rem finish with loop to allow repeat
590 print"[159] ([193][159])gain? ([204][159])oadstar?
600 [161]a$:[139]a$[179][177]"a"[175]a$[179][177]"l"[167]600
610 [139]a$[178]"a"[167]200
620 [151]x[170]21,0:[159]15,8,15,"r0:hello connect=hello connect":[132]15,er:[160]15
630 [139]er[179][177]63[167][128]
640 [153]"loadstopload"[199](34)"hello connect"[199](34)",8"
650 [153]"run"
660 [151]631,13:[151]632,13:[151]198,2:[128]
10000 [159]15,8,15,"s0:journal":[160]15:[148]"journal",8:[128]
50000 q9$[178]"":u9[178]53280:[151]198,0
50010 [161]a$
50020 [151]646,[187](1)[172]15[170]1:[153]"tocmd";:[139]a$[178]""[167]50010
50030 [139]a$[178][199](13)[167][153]" ":[142]
50040 [139](a$[178][199](20)[175][195](q9$))[167]q9$[178][200](q9$,[195](q9$)[171]1):[137]50080
50050 [139][195](q9$)[177][178]l[167]t9%[178][194](u9):[151]u9,1:[151]u9,t9%:[137]50010
50060 [139]a$[179]" "[176](a$[177][199](127)[175]a$[179][199](160))[176]a$[178][199](34)[167]50010
50070 q9$[178]q9$[170]a$
50080 [153]""a$;:[137]50010