home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 82 / 082.d81 / journal (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  82 lines

  1. 5 poke52,48:poke56,48:clr
  2. 10 rem first clear sprite memory
  3. 20 fort=0to63:poke12288+t,0:next
  4. 30 :
  5. 40 rem next poke in a ball shape
  6. 50 poke12288,56:poke12291,124:poke12294,124:poke12297,56
  7. 60 :
  8. 70 rem now set background/border to black
  9. 80 poke53280,0:poke53281,0
  10. 90 :
  11. 100 rem set x and y for sprite 0
  12. 110 x=53248:y=53249
  13. 120 :
  14. 130 rem m is our multiplier to convert radians to regular numbers
  15. 140 m=.0174532925
  16. 150 :
  17. 160 rem set up sprite pointers, etc.
  18. 170 pokex+21,1:poke2040,192:pokex+39,2
  19. 180 :
  20. 190 rem set to lowercase letters and clear screen
  21. 200 print"[147][129]        [205]ark [202]ordan's [193]ngulizer"
  22. 210 :
  23. 220 rem position sprite at 55,220 -- near the bottom left of screen
  24. 230 pokex,55:pokey,220
  25. 240 :
  26. 250 rem let user determine angle to move sprite
  27. 260 print"[154][215]hat angle? ([159]1 - 89[154]) ";:l=2:gosub50000:an=val(q9$)
  28. 265 ifan<1oran>89thenprint"[145]                               [145]":goto260
  29. 270 :
  30. 280 rem and how far to move
  31. 285 print
  32. 290 print"[154][200]ow far right? ([159]1 - 200[154]) ";:l=3:gosub50000:b=val(q9$)
  33. 295 ifb<1orb>200thenprint"[145]                               [145]":goto290
  34. 300 :
  35. 310 rem find the tan and sin
  36. 320 ta=tan(an*m):si=sin(x*m)
  37. 330 :
  38. 340 rem calculate vertical side (a) and hypotenuse (c)
  39. 350 a=b*ta:c=-(a/si)
  40. 360 :
  41. 370 rem print all three sides lengths
  42. 380 print"[154][216]="a,"[154][217]="b:print"[154][200]ypotenuse="c
  43. 390 :
  44. 400 rem set create factors for moving sprite on (NULL) axis
  45. 410 yy=0:aa=a/b
  46. 420 :
  47. 430 rem move sprite however far user determined for length (x) via loop
  48. 440 fori=1tob
  49. 450 :
  50. 460 rem add y factor each time through
  51. 470 yy=yy+aa
  52. 480 :
  53. 490 rem move sprite over 1 each time through loop
  54. 500 pokex,peek(x)+1
  55. 510 :
  56. 520 rem move sprite up factored amount each time through loop
  57. 530 ifyy>220theni=b:goto560
  58. 535 pokey,220-yy
  59. 540 :
  60. 550 rem finish loop
  61. 560 next
  62. 570 :
  63. 580 rem finish with loop to allow repeat
  64. 590 print"[159]       ([193][159])gain?    ([204][159])oadstar?
  65. 600 [161]a$:[139]a$[179][177]"a"[175]a$[179][177]"l"[167]600
  66. 610 [139]a$[178]"a"[167]200
  67. 620 [151]x[170]21,0:[159]15,8,15,"r0:hello connect=hello connect":[132]15,er:[160]15
  68. 630 [139]er[179][177]63[167][128]
  69. 640 [153]"loadstopload"[199](34)"hello connect"[199](34)",8"
  70. 650 [153]"run"
  71. 660 [151]631,13:[151]632,13:[151]198,2:[128]
  72. 10000 [159]15,8,15,"s0:journal":[160]15:[148]"journal",8:[128]
  73. 50000 q9$[178]"":u9[178]53280:[151]198,0
  74. 50010 [161]a$
  75. 50020 [151]646,[187](1)[172]15[170]1:[153]"tocmd";:[139]a$[178]""[167]50010
  76. 50030 [139]a$[178][199](13)[167][153]" ":[142]
  77. 50040 [139](a$[178][199](20)[175][195](q9$))[167]q9$[178][200](q9$,[195](q9$)[171]1):[137]50080
  78. 50050 [139][195](q9$)[177][178]l[167]t9%[178][194](u9):[151]u9,1:[151]u9,t9%:[137]50010
  79. 50060 [139]a$[179]" "[176](a$[177][199](127)[175]a$[179][199](160))[176]a$[178][199](34)[167]50010
  80. 50070 q9$[178]q9$[170]a$
  81. 50080 [153]""a$;:[137]50010
  82.