home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 36.dms / 36.adf / spelling.bas < prev    next >
BASIC Source File  |  1988-05-22  |  3KB  |  118 lines

  1. 10    ' title
  2. 20    screen 0,4,0:scnclr:print " "
  3. 30    rgb 0,0,0,0:rgb 1,0,0,0:rgb 2,15,0,0:rgb 3,15,10,0:rgb 4,0,0,0:rgb 15,0,0,0
  4. 40    peno 4:box(68,6;240,166),0:print at (11,9);"Created exclusively";at (19,11);"for";at (12,13);"Slipped Disk Inc."
  5. 50    pena 0:box(14,14;153,40),1:print at (4,4);"S P E L L I N G"
  6. 60    box(166,136;288,158),1:print at (23,19);"Robert Sawdey"
  7. 70    pena 2:paint(95,50),1:rgb 4,15,15,2:pena 3:paint(16,16),1:paint(170,140),1:sleep(1000000)*5
  8. 80    for j%=0 to 15:for i%=2 to 4:ask rgb i%,r%,g%,b%
  9. 90    if r%>0 then r%=r%-1
  10. 100   if g%>0 then g%=g%-1
  11. 110   if b%>0 then b%=b%-1
  12. 120   rgb i%,r%,g%,b%:sleep(12000):next i%:next j%
  13. 130   '
  14. 140   '     setup screen & stripes
  15. 150   '
  16. 160   rgb 0,10,0,12:' screen color
  17. 170   rgb 1,15,15,10:'  text color
  18. 180   rgb 2,15,10,15:' border color
  19. 190   rgb 3,15,0,15
  20. 200   rgb 4,15,0,10
  21. 210   rgb 5,15,0,5
  22. 220   rgb 6,15,0,0
  23. 230   rgb 7,10,0,5
  24. 240   rgb 8,5,0,10
  25. 250   rgb 9,0,0,15
  26. 260   rgb 10,0,5,10
  27. 270   rgb 11,0,10,5
  28. 280   rgb 12,5,15,5
  29. 290   rgb 13,10,15,5
  30. 300   rgb 14,15,15,5
  31. 310   rgb 15,15,15,10
  32. 320   scnclr
  33. 330   for i%=2 to 15
  34. 340   pena i%
  35. 350   box(9,(i%*12)-15;319,(i%*12)-3),1
  36. 360   next i%
  37. 370   peno 2 :'  outline pen color
  38. 380   pena 0 :'   foreground pen
  39. 390   penb 1 :'   background pen
  40. 400   box(45,82;187,116),1
  41. 410   '
  42. 420   '    setup voice parameters
  43. 430   '
  44. 440   a%(0)=200   :' pitch(65-320)
  45. 450   a%(1)=0     :' inflect(0-1)
  46. 460   a%(2)=120   :' rate(40-400)
  47. 470   a%(3)=1     :' 0=male 1=fem
  48. 480   a%(4)=25000 :'tuning 5k-28k
  49. 490   a%(5)=64    :' volume(0-64)
  50. 500   a%(6)=10    :'channel(0-11)
  51. 510   a%(7)=1     :' mode(0-1)
  52. 520   a%(8)=0     :' control(0-2)
  53. 530   '
  54. 540   ' student name & word list
  55. 550   '
  56. 560   b$(0%)="student"
  57. 570   b$(1%)="run"
  58. 580   b$(2%)="us"
  59. 590   b$(3%)="bus"
  60. 600   b$(4%)="rub"
  61. 610   b$(5%)="sun"
  62. 620   b$(6%)="tug"
  63. 630   b$(7%)="cut"
  64. 640   b$(8%)="bug"
  65. 650   b$(9%)="cup"
  66. 660   b$(10%)="rug"
  67. 670   '
  68. 680   '    intro
  69. 690   '
  70. 700   print" Spelling Quiz: Type <return> to quit"
  71. 710   a$="Please type your name.":gosub 880
  72. 720   print at (8,13);"";:input;b$(0)
  73. 730   if b$(0)="" then goto 1110
  74. 740   a$="Hello "+b$(0)+". Lets spell.":l%=0:gosub 880
  75. 750   '
  76. 760   '     main test loop
  77. 770   '
  78. 780   l%=l%+1
  79. 790   if l%>10 then goto 960
  80. 800   a$="Please type. "+b$(l%)+"."
  81. 810   gosub 880
  82. 820   print at (8,13); "               "
  83. 830   print at (8,13); "";:input; a$
  84. 840   if a$="" then goto 1150
  85. 850   if a$=b$(l%) then a$="you got it right.":gosub 880:gosub 1010:goto 780
  86. 860   if a$<>b$(l%) then a$="try again.":gosub 880:goto 790
  87. 870   '
  88. 880   '  speakit
  89. 890   '
  90. 900   b$=translate$(a$)
  91. 910   i%=narrate(b$,a%())
  92. 920   return
  93. 930   '
  94. 940   '  congrats
  95. 950   '
  96. 960   gosub 1010:a$="now you are done.":gosub 900
  97. 970   a$="you have spelled all ten words right.":gosub 900:goto 1150
  98. 980   '
  99. 990   ' roll colors
  100. 1000  '
  101. 1010  for j%=1 to 16
  102. 1020  ask rgb 15,rr%,rg%,rb%
  103. 1030  for i%=14 to 0 step -1
  104. 1040  ask rgb i%,r%,g%,b%
  105. 1050  rgb i%+1,r%,g%,b%
  106. 1060  next i%
  107. 1070  rgb 0,rr%,rg%,rb%
  108. 1080  sleep(10000)
  109. 1090  next j%
  110. 1100  return
  111. 1110  '
  112. 1120  ' Clean up & go home
  113. 1130  '
  114. 1140  ' reset rgb
  115. 1150  rgb 0,6,9,15:rgb 1,0,0,0:rgb 2,15,15,15:rgb 3,15,9,10:rgb 4,14,3,0:rgb 5,15,11,0:rgb 6,15,15,2:rgb 7,11,15,0
  116. 1160  rgb 8,5,13,0:rgb 9,0,14,13:rgb 10,7,13,15:rgb 11,12,0,14:rgb 12,15,2,14:rgb 13,15,13,11:rgb 14,12,9,8:rgb 15,11,11,11
  117. 1170  scnclr:print " "
  118.