home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STFORMAT / STF18A.MSA / SIDE_2_DOT2DOT_DOT2DOTS.LST < prev    next >
File List  |  1990-11-04  |  32KB  |  1,540 lines

  1. '
  2. ' *********************************************************************
  3. '                            D O T - 2 - D O T S
  4. '                         A Dot-To-Dot Puzzle Game
  5. '                            for Young Children
  6. '                    yet another kidprg in GFA Basic from
  7. '                               D.A. Brumleve
  8. '                         Copyright 1989 by ST-LOG
  9. ' **********************************************************************
  10. '                               Version 1.9
  11. '                            February 20, 1989
  12. ' **********************************************************************
  13. '                                REFERENCE
  14. ' **********************************************************************
  15. ' VARIABLES
  16. ' Aa%
  17. ' Ab%
  18. ' Ac%
  19. ' Ad%
  20. ' Addx$
  21. ' Addx%()
  22. ' Addy$
  23. ' Addy%()
  24. ' Alrt$
  25. ' Backgrnd%
  26. ' Bb%
  27. ' C$
  28. ' C%
  29. ' Cbutton%
  30. ' Cc%
  31. ' D$
  32. ' D%
  33. ' Dd$
  34. ' Ddd$
  35. ' Dn%
  36. ' Dottype%
  37. ' Dummy%
  38. ' Dur%
  39. ' Exi$
  40. ' Foregrnd%
  41. ' Game%()
  42. ' Ggx%
  43. ' Hel$
  44. ' Hh%
  45. ' I%
  46. ' Ii%
  47. ' Jj%
  48. ' K%
  49. ' Low$
  50. ' Mm%
  51. ' Muse$
  52. ' N%
  53. ' Nding$
  54. ' Nding%
  55. ' New$
  56. ' Nn%
  57. ' No_more%
  58. ' Nt%
  59. ' Num$
  60. ' Numc%
  61. ' Oct%
  62. ' Oo%
  63. ' P$
  64. ' Palette%()
  65. ' Pdot%
  66. ' Pri$
  67. ' Print_it%
  68. ' Recno%
  69. ' Record_already_chosen%()
  70. ' Reda$
  71. ' Redi$
  72. ' Redj$
  73. ' Redm$
  74. ' Redm1$
  75. ' Redm2$
  76. ' Redmm$
  77. ' Redw$
  78. ' Redww$
  79. ' Redww1$
  80. ' Redww2$
  81. ' Rez%
  82. ' Rr%
  83. ' Screen$
  84. ' Selector$
  85. ' T$
  86. ' Tt%
  87. ' Uc$
  88. ' Uc%
  89. ' Upp$
  90. ' Whitea$
  91. ' Whitei$
  92. ' Whitej$
  93. ' Whitem$
  94. ' Whitem1$
  95. ' Whitem2$
  96. ' Whitemm$
  97. ' Whitew$
  98. ' Whiteww$
  99. ' Whiteww1$
  100. ' Whiteww2$
  101. ' Won$
  102. ' X$
  103. ' X%()
  104. ' Y$
  105. ' Y%()
  106. ' Y1%
  107. ' Y2%
  108. ' Z$
  109. ' Z%
  110. ' Zn%
  111. '
  112. ' ********************* INITIALIZE AND SET UP SCREEN **********************
  113. Rez%=Xbios(4)
  114. Showm
  115. If Rez%<>0
  116.   Alrt$=" |This kidprg requires|low resolution."
  117.   Alert 3,Alrt$,1,"Oops!",Dummy%
  118.   End
  119. Endif
  120. If Not Exist("dot2dots.dat")
  121.   Alert 3," |You must have DOT2DOTS.DAT|on your disk to run this|program!",1," Oops! ",Dummy%
  122.   Alert 1," |You can use DOTMAKER.PRG to|create a DOT2DOTS.DAT file.",1,"Thanks!",Dummy%
  123.   End
  124. Endif
  125. Dim X%(27),Y%(27),Palette%(15),Game%(27),Addx%(100),Addy%(100),Record_already_chosen%(200)
  126. @Save_palette
  127. Hidem
  128. @Black_screen
  129. @Mouse_sprite
  130. Cls
  131. @Main_screen
  132. @Clear_arrays
  133. D%=1
  134. Numc%=11
  135. Dottype%=1
  136. Nding%=0
  137. Pdot%=0
  138. K%=0
  139. @Load_it
  140. Deffill 9
  141. Fill 6,144
  142. Showm
  143. '
  144. ' ***************************** MAIN LOOP ***************************
  145. Do
  146.   Mouse Aa%,Bb%,Cbutton%
  147.   If Cbutton%>0
  148.     If Aa%>0 And Aa%<50
  149.       ' *** exit
  150.       If Bb%>0 And Bb%<16
  151.         Deffill 2
  152.         Fill 6,1
  153.         @Select_sound
  154.         Sget Screen$
  155.         @Let_go
  156.         Numc%=2
  157.         @Alert_box2
  158.         @Alert_box3
  159.         Deftext 1,0,0,6
  160.         Text 89,85,"Do you really want"
  161.         Text 88,105,"     to stop?"
  162.         @Alert_check
  163.         If Ab%>74 And Ab%<154
  164.           @Finale_sound
  165.           Cls
  166.           @R_palette
  167.           End
  168.         Else
  169.           Sput Screen$
  170.         Endif
  171.         Pause 15
  172.         Deffill 11
  173.         Fill 6,1
  174.       Endif
  175.       ' *** help
  176.       If Bb%>20 And Bb%<36
  177.         Deffill 4
  178.         Fill 6,21
  179.         @Select_sound
  180.         @Let_go
  181.         Sget Screen$
  182.         Numc%=4
  183.         K%=0
  184.         @Help_alert
  185.         @Help_alert2
  186.         @Help1
  187.         @Help_alert_check
  188.         Sput Screen$
  189.         Pause 15
  190.         Deffill 11
  191.         Fill 6,21
  192.       Endif
  193.       ' *** print
  194.       If Bb%>40 And Bb%<56
  195.         Deffill 3
  196.         Fill 6,55
  197.         @Select_sound
  198.         Sget Screen$
  199.         Pause 15
  200.         Numc%=3
  201.         @Alert_box2
  202.         @Alert_box3
  203.         Deftext 1,0,0,6
  204.         Text 87,85,"  Do you want to"
  205.         Text 88,105,"print this puzzle?"
  206.         @Alert_check
  207.         If Ab%>74 And Ab%<154
  208.           Print_it%=1
  209.         Else
  210.           Print_it%=0
  211.         Endif
  212.         If Print_it%=1
  213.           @Print_it
  214.         Else
  215.           Sput Screen$
  216.         Endif
  217.         @Let_go
  218.         Pdot%=0
  219.         Pause 15
  220.         Deffill 11
  221.         Fill 6,55
  222.       Endif
  223.       ' *** new
  224.       If Bb%>91 And Bb%<107
  225.         Deffill 5
  226.         Fill 6,92
  227.         @Select_sound
  228.         @Clear_dot_box
  229.         @Clear_arrays
  230.         @Load_it
  231.         @Let_go
  232.         Deffill 11
  233.         Fill 6,92
  234.         Showm
  235.       Endif
  236.       ' *** numbered dots
  237.       If Bb%>143 And Bb%<159 And Dottype%<>1
  238.         Deffill 11
  239.         Fill 6,164
  240.         Fill 6,184
  241.         Deffill 9
  242.         Fill 6,144
  243.         Dottype%=1
  244.         @Select_sound
  245.         @Restore_numbers
  246.         Showm
  247.         @Let_go
  248.       Endif
  249.       ' *** upper case letters in dots
  250.       If Bb%>163 And Bb%<179 And Dottype%<>2
  251.         Deffill 11
  252.         Fill 6,144
  253.         Fill 6,184
  254.         Deffill 9
  255.         Fill 6,164
  256.         @Select_sound
  257.         Dottype%=2
  258.         @Restore_numbers
  259.         Showm
  260.         @Let_go
  261.       Endif
  262.       ' *** lower case letters in dots
  263.       If Bb%>183 And Bb%<199 And Dottype%<>5
  264.         Deffill 11
  265.         Fill 6,144
  266.         Fill 6,164
  267.         Deffill 9
  268.         Fill 6,184
  269.         @Select_sound
  270.         Dottype%=3
  271.         @Restore_numbers
  272.         Showm
  273.         @Let_go
  274.       Endif
  275.     Endif
  276.     ' *** try to guess the next dot
  277.     If Aa%>60 And Bb%>0 And Aa%<319 And Bb%<199
  278.       If Aa%>X%(D%)-8 And Bb%>Y%(D%)-8 And Aa%<X%(D%)+8 And Bb%<Y%(D%)+8
  279.         Sound 1,15,4,4,8
  280.         Sound 1,15,1,5,4
  281.         Sound 1,0,0,0,0
  282.         If D%>1
  283.           Draw X%(D%-1),Y%(D%-1) To X%(D%),Y%(D%)
  284.         Endif
  285.         If Dn%=D%
  286.           If Nding%=1
  287.             Draw X%(Dn%),Y%(Dn%) To X%(1),Y%(1)
  288.             Deffill 2
  289.             Pcircle X%(1),Y%(1),7
  290.             Color 1
  291.             Circle X%(1),Y%(1),7
  292.             Deftext 1,1,0,4
  293.             If Dottype%=1
  294.               Text X%(1)-3,Y%(1)+2,"1"
  295.             Endif
  296.             If Dottype%=2
  297.               Text X%(1)-3,Y%(1)+2,"A"
  298.             Endif
  299.             If Dottype%=3
  300.               Put X%(1)-3,Y%(1)-1,Reda$
  301.             Endif
  302.           Endif
  303.         Endif
  304.         Deffill 2
  305.         Pcircle X%(D%),Y%(D%),7
  306.         Color 1
  307.         Circle X%(D%),Y%(D%),7
  308.         Deftext 1,1,0,4
  309.         If Dottype%=1
  310.           If D%=20
  311.             Ddd$="2O"
  312.             Text X%(D%)-6,Y%(D%)+2,Ddd$
  313.             Goto Skipit8
  314.           Endif
  315.           If D%=10
  316.             Ddd$="1O"
  317.             Text X%(D%)-6,Y%(D%)+2,Ddd$
  318.             Goto Skipit8
  319.           Endif
  320.           If Len(Str$(D%))=1
  321.             Tt%=3
  322.           Else
  323.             Tt%=6
  324.           Endif
  325.           Text X%(D%)-Tt%,Y%(D%)+2,D%
  326.           Skipit8:
  327.         Endif
  328.         If Dottype%=2
  329.           Uc%=D%+64
  330.           Uc$=Chr$(Uc%)
  331.           If Uc$="M"
  332.             Put X%(D%)-4,Y%(D%)-2,Redmm$
  333.             Goto Skipit5
  334.           Endif
  335.           If Uc$="W"
  336.             Put X%(D%)-4,Y%(D%)-2,Redww$
  337.             Goto Skipit5
  338.           Endif
  339.           Text X%(D%)-3,Y%(D%)+2,Uc$
  340.           Skipit5:
  341.         Endif
  342.         If Dottype%=3
  343.           Uc%=D%+96
  344.           Uc$=Chr$(Uc%)
  345.           If Uc$="a"
  346.             Put X%(D%)-3,Y%(D%)-1,Reda$
  347.             Goto Skip3
  348.           Endif
  349.           If Uc$="m"
  350.             Put X%(D%)-3,Y%(D%)-1,Redm$
  351.             Goto Skip3
  352.           Endif
  353.           If Uc$="i"
  354.             Put X%(D%)-1,Y%(D%)-3,Redi$
  355.             Goto Skip3
  356.           Endif
  357.           If Uc$="j"
  358.             Put X%(D%)-3,Y%(D%)-3,Redj$
  359.             Goto Skip3
  360.           Endif
  361.           If Uc$="w"
  362.             Put X%(D%)-3,Y%(D%)-1,Redw$
  363.             Goto Skip3
  364.           Endif
  365.           Text X%(D%)-3,Y%(D%)+2,Uc$
  366.           Skip3:
  367.         Endif
  368.         Game%(D%)=1
  369.         If D%>1
  370.           Pcircle X%(D%-1),Y%(D%-1),7
  371.           Circle X%(D%-1),Y%(D%-1),7
  372.           Deftext 1,1,0,4
  373.           If Dottype%=1
  374.             If D%-1=20
  375.               Ddd$="2O"
  376.               Text X%(D%-1)-6,Y%(D%-1)+2,Ddd$
  377.               Goto Skipit9
  378.             Endif
  379.             If D%-1=10
  380.               Ddd$="1O"
  381.               Text X%(D%-1)-6,Y%(D%-1)+2,Ddd$
  382.               Goto Skipit9
  383.             Endif
  384.             If Len(Str$(D%-1))=1
  385.               Tt%=3
  386.             Else
  387.               Tt%=6
  388.             Endif
  389.             Text X%(D%-1)-Tt%,Y%(D%-1)+2,D%-1
  390.             Skipit9:
  391.           Endif
  392.           If Dottype%=2
  393.             Uc%=(D%-1)+64
  394.             Uc$=Chr$(Uc%)
  395.             If Uc$="M"
  396.               Put X%(D%-1)-4,Y%(D%-1)-2,Redmm$
  397.               Goto Skipit6
  398.             Endif
  399.             If Uc$="W"
  400.               Put X%(D%-1)-4,Y%(D%-1)-2,Redww$
  401.               Goto Skipit6
  402.             Endif
  403.             Text X%(D%-1)-3,Y%(D%-1)+2,Uc$
  404.             Skipit6:
  405.           Endif
  406.           If Dottype%=3
  407.             Uc%=(D%-1)+96
  408.             Uc$=Chr$(Uc%)
  409.             If Uc$="a"
  410.               Put X%(D%-1)-3,Y%(D%-1)-1,Reda$
  411.               Goto Skip2
  412.             Endif
  413.             If Uc$="m"
  414.               Put X%(D%-1)-3,Y%(D%-1)-1,Redm$
  415.               Goto Skip2
  416.             Endif
  417.             If Uc$="i"
  418.               Put X%(D%-1)-1,Y%(D%-1)-3,Redi$
  419.               Goto Skip2
  420.             Endif
  421.             If Uc$="j"
  422.               Put X%(D%-1)-3,Y%(D%-1)-3,Redj$
  423.               Goto Skip2
  424.             Endif
  425.             If Uc$="w"
  426.               Put X%(D%-1)-3,Y%(D%-1)-1,Redw$
  427.               Goto Skip2
  428.             Endif
  429.             Text X%(D%-1)-3,Y%(D%-1)+2,Uc$
  430.             Skip2:
  431.           Endif
  432.         Endif
  433.         Inc D%
  434.         If D%>Dn%
  435.           @Wonit
  436.         Endif
  437.         @Let_go
  438.       Else
  439.         If Dn%>D%+1 Or Dn%=D%
  440.           Sound 1,15,3,3,8
  441.           Sound 1,15,1,3,16
  442.           Sound 1,0,0,0,0
  443.           @Let_go
  444.         Endif
  445.       Endif
  446.     Endif
  447.   Endif
  448. Loop
  449. '
  450. ' *********************** REWARD FOR COMPLETE DOT-TO-DOT ******************
  451. Procedure Wonit
  452.   Hidem
  453.   @Congrats_sound
  454.   Deffill 11
  455.   Pbox 0,0,50,199
  456.   Color 1
  457.   Box 0,0,50,199
  458.   Deftext 1,0,0,6
  459.   Text 5,12,"Color"
  460.   Text 5,22," the"
  461.   Text 2,32,"Puzzle"
  462.   Restore Won_data
  463.   For I%=1 To 8
  464.     Read Y1%,Y2%,C%
  465.     Box 5,Y1%,45,Y2%
  466.     Deffill C%
  467.     Pbox 7,Y1%+2,43,Y2%-2
  468.     Box 7,Y1%+2,43,Y2%-2
  469.   Next I%
  470.   Deftext 1,0,0,6
  471.   Text 9,189,"DONE"
  472.   Get 0,0,50,199,Won$
  473.   Cc%=2
  474.   Deffill 2
  475.   Fill 6,39
  476.   @Clear_numbers
  477.   @Restore_extra_lines
  478.   Showm
  479.   Do
  480.     Mouse Hh%,Ii%,Jj%
  481.     Exit If Jj%>0 And Hh%>5 And Hh%<45 And Ii%>178 And Ii%<194
  482.     If Jj%>0 And Hh%>5 And Hh%<45
  483.       Restore Won_data
  484.       For I%=1 To 8
  485.         Read Y1%,Y2%,C%
  486.         If Ii%>Y1% And Ii%<Y2%
  487.           Cc%=C%
  488.           Put 0,0,Won$
  489.           Deffill Cc%
  490.           Fill 6,Y1%+1
  491.           If Cc%=11
  492.             Deffill 9
  493.             Fill 6,Y1%+1
  494.           Endif
  495.           @Select_sound
  496.         Endif
  497.       Next I%
  498.       @Let_go
  499.     Endif
  500.     If Jj%>0 And Hh%>60 And Hh%<319 And Ii%>0 And Ii%<199
  501.       If Point(Hh%,Ii%)<>1
  502.         @Other_sound
  503.         Deffill Cc%
  504.         Fill Hh%,Ii%
  505.         @Let_go
  506.       Endif
  507.     Endif
  508.   Loop
  509.   Deffill 9
  510.   Fill 6,179
  511.   @Select_sound
  512.   Pause 15
  513.   Put 0,0,Selector$
  514.   @Restore_numbers
  515.   Showm
  516.   @Let_go
  517. Return
  518. '
  519. ' ******************************** PRINT ***********************************
  520. Procedure Print_it
  521.   @Alert_box1
  522.   If Out?(0)=-1
  523.     @Black_screen
  524.     Cls
  525.     Color 1
  526.     If Pdot%=1
  527.       ' *** print dots only
  528.       Deffill 11
  529.       Pbox 60,0,319,199
  530.       Color 1
  531.       Box 60,0,319,199
  532.       @Restore_extra_lines
  533.       @Restore_numbers
  534.       Get 60,0,319,199,P$
  535.       Cls
  536.       Put 30,0,P$
  537.       Setcolor 0,7,7,7
  538.       Setcolor 15,0,0,0
  539.       Setcolor 10,7,7,7
  540.       Hardcopy
  541.     Else
  542.       ' *** print lines only
  543.       Deffill 11
  544.       Pbox 60,0,319,199
  545.       Color 1
  546.       Box 60,0,319,199
  547.       @Clear_numbers
  548.       @Restore_extra_lines
  549.       Get 60,0,319,199,P$
  550.       Cls
  551.       Put 30,0,P$
  552.       Setcolor 0,7,7,7
  553.       Setcolor 15,0,0,0
  554.       Setcolor 10,7,7,7
  555.       Hardcopy
  556.     Endif
  557.     @Black_screen
  558.     Cls
  559.   Else
  560.     Numc%=3
  561.     K%=0
  562.     Pause 15
  563.     @Buzz_sound
  564.     @Help_alert
  565.     @Help_alert2
  566.     @Print_dialog
  567.     Showm
  568.     @Help_alert_check
  569.   Endif
  570.   Sput Screen$
  571.   @Set_color
  572.   Showm
  573. Return
  574. '
  575. ' *************************** LOAD AND SELECT DOT-TO-DOT *******************
  576. Procedure Load_it
  577.   Hidem
  578.   Open "r",#1,"dot2dots.dat",255
  579.   Field #1,1 As Nding$,1 As D$,1 As Z$,100 As Addx$,100 As Addy$,26 As X$,26 As Y$
  580.   Rr%=Lof(#1)/255
  581.   Recno%=Random(Rr%)+1
  582.   No_more%=0
  583.   Try_again:
  584.   For I%=1 To Rr%
  585.     Exit If Record_already_chosen%(I%)=0
  586.     If I%=Rr% And Record_already_chosen%(Rr%)=1
  587.       No_more%=1
  588.     Endif
  589.     Exit If No_more%=1
  590.   Next I%
  591.   If No_more%=1
  592.     @Clear_records
  593.   Endif
  594.   Recno%=Random(Rr%)+1
  595.   ' *** make sure this record isn't a repeat:
  596.   If Record_already_chosen%(Recno%)=1
  597.     Goto Try_again
  598.   Endif
  599.   Record_already_chosen%(Recno%)=1
  600.   Get #1,Recno%
  601.   Dn%=Asc(D$)
  602.   Zn%=Asc(Z$)
  603.   Z%=Zn%
  604.   Nding%=Asc(Nding$)
  605.   Color 1
  606.   Ggx%=1
  607.   For I%=1 To Zn%
  608.     Addx%(I%)=Asc(Mid$(Addx$,I%,1))+72
  609.     Addy%(I%)=Asc(Mid$(Addy$,I%,1))+15
  610.     If Ggx%=2
  611.       Draw Addx%(I%)-K%,Addy%(I%) To Addx%(I%-1)-K%,Addy%(I%-1)
  612.     Endif
  613.     If Ggx%=1
  614.       Ggx%=2
  615.     Else
  616.       Ggx%=1
  617.     Endif
  618.   Next I%
  619.   For I%=1 To Dn%
  620.     X%(I%)=Asc(Mid$(X$,I%,1))+72
  621.     Y%(I%)=Asc(Mid$(Y$,I%,1))+15
  622.     Deffill 11
  623.     Pcircle X%(I%)-K%,Y%(I%),7
  624.     Circle X%(I%)-K%,Y%(I%),7
  625.     Deftext 1,1,0,4
  626.     If Dottype%=1
  627.       If I%=20
  628.         Ddd$="2O"
  629.         Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
  630.         Goto Skipit11
  631.       Endif
  632.       If I%=10
  633.         Ddd$="1O"
  634.         Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
  635.         Goto Skipit11
  636.       Endif
  637.       If Len(Str$(I%))=1
  638.         Tt%=3
  639.       Else
  640.         Tt%=6
  641.       Endif
  642.       Text X%(I%)-Tt%-K%,Y%(I%)+2,I%
  643.       Skipit11:
  644.     Endif
  645.     If Dottype%=2
  646.       Uc%=I%+64
  647.       Uc$=Chr$(Uc%)
  648.       If Uc$="M"
  649.         Put X%(I%)-4-K%,Y%(I%)-2,Whitemm$
  650.         Goto Skipit2
  651.       Endif
  652.       If Uc$="W"
  653.         Put X%(I%)-4-K%,Y%(I%)-2,Whiteww$
  654.         Goto Skipit2
  655.       Endif
  656.       Text X%(I%)-3-K%,Y%(I%)+2,Uc$
  657.       Skipit2:
  658.     Endif
  659.     If Dottype%=3
  660.       Uc%=I%+96
  661.       Uc$=Chr$(Uc%)
  662.       If Uc$="a"
  663.         Put X%(I%)-3-K%,Y%(I%)-1,Whitea$
  664.         Goto Skipit
  665.       Endif
  666.       If Uc$="m"
  667.         Put X%(I%)-3-K%,Y%(I%)-1,Whitem$
  668.         Goto Skipit
  669.       Endif
  670.       If Uc$="i"
  671.         Put X%(I%)-1-K%,Y%(I%)-3,Whitei$
  672.         Goto Skipit
  673.       Endif
  674.       If Uc$="j"
  675.         Put X%(I%)-3-K%,Y%(I%)-3,Whitej$
  676.         Goto Skipit
  677.       Endif
  678.       If Uc$="w"
  679.         Put X%(I%)-3-K%,Y%(I%)-1,Whitew$
  680.         Goto Skipit
  681.       Endif
  682.       Text X%(I%)-3-K%,Y%(I%)+2,Uc$
  683.       Skipit:
  684.     Endif
  685.   Next I%
  686.   Close #1
  687. Return
  688. '
  689. ' ***************** CLEAR/RESTORE SCREEN AREAS AND VARIABLES ***************
  690. Procedure Clear_dot_box
  691.   Deffill 11
  692.   Pbox 61,1,318,198
  693. Return
  694. '
  695. Procedure Clear_arrays
  696.   For I%=1 To 27
  697.     X%(I%)=0
  698.     Y%(I%)=0
  699.     Game%(I%)=0
  700.   Next I%
  701.   For I%=1 To 100
  702.     Addx%(I%)=0
  703.     Addy%(I%)=0
  704.   Next I%
  705.   D%=1
  706.   Dn%=0
  707.   Z%=1
  708. Return
  709. '
  710. Procedure Clear_numbers
  711.   Color 1
  712.   For I%=1 To Dn%
  713.     Deffill 11
  714.     Pcircle X%(I%)-K%,Y%(I%),7
  715.     If I%>1
  716.       Draw X%(I%)-K%,Y%(I%) To X%(I%-1)-K%,Y%(I%-1)
  717.     Endif
  718.   Next I%
  719.   If Nding%=1
  720.     Draw X%(1)-K%,Y%(1) To X%(Dn%)-K%,Y%(Dn%)
  721.   Endif
  722. Return
  723. '
  724. Procedure Restore_extra_lines
  725.   Ggx%=1
  726.   For I%=1 To Z%
  727.     If Ggx%=2
  728.       Draw Addx%(I%)-K%,Addy%(I%) To Addx%(I%-1)-K%,Addy%(I%-1)
  729.     Endif
  730.     If Ggx%=1
  731.       Ggx%=2
  732.     Else
  733.       Ggx%=1
  734.     Endif
  735.   Next I%
  736. Return
  737. '
  738. Procedure Clear_records
  739.   For I%=1 To 200
  740.     Record_already_chosen%(I%)=0
  741.   Next I%
  742. Return
  743. '
  744. Procedure Restore_numbers
  745.   Hidem
  746.   For I%=1 To Dn%
  747.     If Game%(I%)=0
  748.       Numc%=11
  749.     Else
  750.       Numc%=2
  751.     Endif
  752.     If Pdot%=1
  753.       Numc%=11
  754.     Endif
  755.     Deffill Numc%
  756.     Pcircle X%(I%)-K%,Y%(I%),7
  757.     Color 1
  758.     Circle X%(I%)-K%,Y%(I%),7
  759.     Deftext 1,1,0,4
  760.     If Dottype%=1
  761.       If I%=20
  762.         Ddd$="2O"
  763.         Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
  764.         Goto Skipit10
  765.       Endif
  766.       If I%=10
  767.         Ddd$="1O"
  768.         Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
  769.         Goto Skipit10
  770.       Endif
  771.       If Len(Str$(I%))=1
  772.         Tt%=3
  773.       Else
  774.         Tt%=6
  775.       Endif
  776.       Text X%(I%)-Tt%-K%,Y%(I%)+2,I%
  777.       Skipit10:
  778.     Endif
  779.     If Dottype%=2
  780.       Uc%=I%+64
  781.       Uc$=Chr$(Uc%)
  782.       If Uc$="M"
  783.         If Numc%=11
  784.           Dd$=Whitemm$
  785.         Else
  786.           Dd$=Redmm$
  787.         Endif
  788.         Put X%(I%)-4-K%,Y%(I%)-2,Dd$
  789.         Goto Skipit3
  790.       Endif
  791.       If Uc$="W"
  792.         If Numc%=11
  793.           Dd$=Whiteww$
  794.         Else
  795.           Dd$=Redww$
  796.         Endif
  797.         Put X%(I%)-4-K%,Y%(I%)-2,Dd$
  798.         Goto Skipit3
  799.       Endif
  800.       Text X%(I%)-3-K%,Y%(I%)+2,Uc$
  801.       Skipit3:
  802.     Endif
  803.     If Dottype%=3
  804.       Uc%=I%+96
  805.       Uc$=Chr$(Uc%)
  806.       If Uc$="a"
  807.         If Numc%=11
  808.           Dd$=Whitea$
  809.         Else
  810.           Dd$=Reda$
  811.         Endif
  812.         Put X%(I%)-3-K%,Y%(I%)-1,Dd$
  813.         Goto Skip
  814.       Endif
  815.       If Uc$="m"
  816.         If Numc%=11
  817.           Dd$=Whitem$
  818.         Else
  819.           Dd$=Redm$
  820.         Endif
  821.         Put X%(I%)-3-K%,Y%(I%)-1,Dd$
  822.         Goto Skip
  823.       Endif
  824.       If Uc$="i"
  825.         If Numc%=11
  826.           Dd$=Whitei$
  827.         Else
  828.           Dd$=Redi$
  829.         Endif
  830.         Put X%(I%)-1-K%,Y%(I%)-3,Dd$
  831.         Goto Skip
  832.       Endif
  833.       If Uc$="j"
  834.         If Numc%=11
  835.           Dd$=Whitej$
  836.         Else
  837.           Dd$=Redj$
  838.         Endif
  839.         Put X%(I%)-3-K%,Y%(I%)-3,Dd$
  840.         Goto Skip
  841.       Endif
  842.       If Uc$="w"
  843.         If Numc%=11
  844.           Dd$=Whitew$
  845.         Else
  846.           Dd$=Redw$
  847.         Endif
  848.         Put X%(I%)-3-K%,Y%(I%)-1,Dd$
  849.         Goto Skip
  850.       Endif
  851.       Text X%(I%)-3-K%,Y%(I%)+2,Uc$
  852.       Skip:
  853.     Endif
  854.   Next I%
  855. Return
  856. '
  857. ' ************************ COLOR PALETTE ACTIVITIES **********************
  858. Procedure Set_color
  859.   Setcolor 0,4,4,4            !=Color# 0
  860.   Setcolor 15,0,0,0           !=Color# 1--black
  861.   Setcolor 1,7,0,0            !=Color# 2--red
  862.   Setcolor 2,0,6,0            !=Color# 3--(print) green
  863.   Setcolor 4,7,4,0            !=Color# 4--(help) orange
  864.   Setcolor 6,7,6,0            !=Color# 5--gold
  865.   Setcolor 3,7,7,0            !=Color# 6--yellow
  866.   Setcolor 5,0,5,7            !=Color# 7--blue
  867.   Setcolor 7,4,4,4            !=Color# 8
  868.   Setcolor 8,3,3,3            !=Color# 9
  869.   Setcolor 9,7,3,3            !=Color# 10
  870.   Setcolor 10,7,7,7           !=Color# 11--white
  871.   Setcolor 12,3,3,7           !=Color# 12
  872.   Setcolor 14,3,7,7           !=Color# 13
  873.   Setcolor 11,7,7,3           !=Color# 14
  874.   Setcolor 13,7,3,7           !=Color# 15
  875. Return
  876. '
  877. Procedure Save_palette
  878.   For I%=0 To 15
  879.     Palette%(I%)=Xbios(7,W:I%,W:-1)
  880.   Next I%
  881. Return
  882. '
  883. Procedure R_palette
  884.   For I%=0 To 15
  885.     Setcolor I%,Palette%(I%)
  886.   Next I%
  887. Return
  888. '
  889. Procedure Black_screen
  890.   For I%=0 To 15
  891.     Setcolor I%,4,4,4
  892.   Next I%
  893. Return
  894. '
  895. ' ************************** WATCH THE MOUSE **************************
  896. Procedure Let_go
  897.   Repeat
  898.     Mouse Mm%,Nn%,Oo%
  899.   Until Oo%=0
  900. Return
  901. '
  902. Procedure Mouse_sprite
  903.   Let Muse$=Mki$(0)+Mki$(0)
  904.   Let Muse$=Muse$+Mki$(0)
  905.   Let Muse$=Muse$+Mki$(0)
  906.   Let Muse$=Muse$+Mki$(15)
  907.   Restore Mouespite_data
  908.   For I%=1 To 16
  909.     Read Foregrnd%,Backgrnd%
  910.     Let Muse$=Muse$+Mki$(Backgrnd%)+Mki$(Foregrnd%)
  911.   Next I%
  912. Return
  913. '
  914. ' ******************************* SCREENS *****************************
  915. Procedure Main_screen
  916.   Graphmode 2
  917.   Deffill 11
  918.   Pbox 0,0,319,199
  919.   Color 1
  920.   Deftext 1,1,0,4
  921.   Text 10,10,"o"
  922.   Draw 15,10 To 15,7
  923.   Get 10,7,15,10,Whitea$
  924.   Deffill 2
  925.   Pbox 0,0,319,199
  926.   Color 1
  927.   Deftext 1,1,0,4
  928.   Text 10,10,"o"
  929.   Draw 15,10 To 15,7
  930.   Get 10,7,15,10,Reda$
  931.   '
  932.   Deffill 11
  933.   Pbox 0,0,319,199
  934.   Color 1
  935.   Deftext 1,1,0,4
  936.   Text 10,10,"n"
  937.   Deftext 1,1,0,4
  938.   Text 12,10,"n"
  939.   Color 11
  940.   Draw 12,10 To 12,8
  941.   Draw 15,12 To 15,8
  942.   Get 10,7,18,10,Whitem$
  943.   Deffill 2
  944.   Pbox 0,0,319,199
  945.   Color 1
  946.   Deftext 1,1,0,4
  947.   Text 10,10,"n"
  948.   Deftext 1,1,0,4
  949.   Text 12,10,"n"
  950.   Color 2
  951.   Draw 12,10 To 12,8
  952.   Draw 15,12 To 15,8
  953.   Get 10,7,17,10,Redm$
  954.   '
  955.   Deffill 11
  956.   Pbox 0,0,319,199
  957.   Color 1
  958.   Deftext 1,1,0,4
  959.   Text 10,10,"j"
  960.   Color 11
  961.   Draw 13,7 To 14,7
  962.   Get 10,6,14,12,Whitej$
  963.   Deffill 2
  964.   Pbox 0,0,319,199
  965.   Color 1
  966.   Deftext 1,1,0,4
  967.   Text 10,10,"j"
  968.   Color 2
  969.   Draw 13,7 To 14,7
  970.   Get 10,6,14,12,Redj$
  971.   '
  972.   Deffill 11
  973.   Pbox 0,0,319,199
  974.   Color 1
  975.   Deftext 1,1,0,4
  976.   Text 10,10,"M"
  977.   Get 10,6,13,10,Whitem1$
  978.   Get 12,6,15,10,Whitem2$
  979.   Deffill 11
  980.   Pbox 0,0,319,199
  981.   Put 10,6,Whitem1$
  982.   Put 14,6,Whitem2$
  983.   Draw 13,9 To 14,9
  984.   Draw 12,6
  985.   Draw 15,6
  986.   Color 11
  987.   Draw 12,8
  988.   Draw 15,8
  989.   Get 10,6,17,10,Whitemm$
  990.   '
  991.   Deffill 2
  992.   Pbox 0,0,319,199
  993.   Color 1
  994.   Deftext 1,1,0,4
  995.   Text 10,10,"M"
  996.   Get 10,6,13,10,Redm1$
  997.   Get 12,6,15,10,Redm2$
  998.   Deffill 2
  999.   Pbox 0,0,319,199
  1000.   Put 10,6,Redm1$
  1001.   Put 14,6,Redm2$
  1002.   Draw 13,9 To 14,9
  1003.   Draw 12,6
  1004.   Draw 15,6
  1005.   Color 2
  1006.   Draw 12,8
  1007.   Draw 15,8
  1008.   Get 10,6,17,10,Redmm$
  1009.   '
  1010.   Cls
  1011.   Deffill 11
  1012.   Pbox 0,0,319,199
  1013.   Color 1
  1014.   Deftext 1,1,0,4
  1015.   Text 10,10,"W"
  1016.   Get 10,6,13,10,Whiteww1$
  1017.   Get 12,6,15,10,Whiteww2$
  1018.   Pause 200
  1019.   Deffill 11
  1020.   Pbox 0,0,319,199
  1021.   Put 10,6,Whiteww1$
  1022.   Put 14,6,Whiteww2$
  1023.   Draw 13,7 To 14,7
  1024.   Draw 12,10
  1025.   Draw 15,10
  1026.   Color 11
  1027.   Draw 12,8
  1028.   Draw 15,8
  1029.   Get 10,6,17,10,Whiteww$
  1030.   Deffill 2
  1031.   Pbox 0,0,319,199
  1032.   Color 1
  1033.   Deftext 1,1,0,4
  1034.   Text 10,10,"W"
  1035.   Get 10,6,13,10,Redww1$
  1036.   Get 12,6,15,10,Redww2$
  1037.   Deffill 2
  1038.   Pbox 0,0,319,199
  1039.   Put 10,6,Redww1$
  1040.   Put 14,6,Redww2$
  1041.   Draw 13,7 To 14,7
  1042.   Draw 12,10
  1043.   Draw 15,10
  1044.   Color 2
  1045.   Draw 12,8
  1046.   Draw 15,8
  1047.   Get 10,6,17,10,Redww$
  1048.   '
  1049.   Deffill 11
  1050.   Pbox 0,0,319,199
  1051.   Color 1
  1052.   Deftext 1,1,0,4
  1053.   Text 10,10,"i"
  1054.   Draw 12,5 To 13,5
  1055.   Color 11
  1056.   Draw 11,7
  1057.   Draw 11,10
  1058.   Get 12,5,13,10,Whitei$
  1059.   Deffill 2
  1060.   Pbox 0,0,319,199
  1061.   Color 1
  1062.   Deftext 1,1,0,4
  1063.   Text 10,10,"i"
  1064.   Draw 12,5 To 13,5
  1065.   Color 2
  1066.   Draw 11,7
  1067.   Draw 11,10
  1068.   Get 12,5,13,10,Redi$
  1069.   '
  1070.   Deffill 11
  1071.   Pbox 0,0,319,199
  1072.   Color 1
  1073.   Deftext 1,1,0,4
  1074.   Text 10,10,"w"
  1075.   Draw 17,10 To 17,7
  1076.   Draw 16,10 To 16,7
  1077.   Draw 13,7
  1078.   Color 11
  1079.   Draw 10,10
  1080.   Draw 17,10
  1081.   Draw 12,8 To 12,6
  1082.   Draw 15,8 To 15,6
  1083.   Get 10,7,18,10,Whitew$
  1084.   Deffill 2
  1085.   Pbox 0,0,319,199
  1086.   Color 1
  1087.   Deftext 1,1,0,4
  1088.   Text 10,10,"w"
  1089.   Draw 17,10 To 17,7
  1090.   Draw 16,10 To 16,7
  1091.   Draw 13,7
  1092.   Color 2
  1093.   Draw 10,10
  1094.   Draw 17,10
  1095.   Draw 12,8 To 12,6
  1096.   Draw 15,8 To 15,6
  1097.   Get 10,7,18,10,Redw$
  1098.   Cls
  1099.   @Title
  1100.   Color 1
  1101.   Restore Screen_data
  1102.   For I%=1 To 7
  1103.     Read Y1%,Y2%,C%
  1104.     Deffill 11
  1105.     Pbox 0,Y1%,50,Y2%+2
  1106.     Box 0,Y1%,50,Y2%+2
  1107.     Deffill C%
  1108.     Pbox 2,Y1%+2,48,Y2%
  1109.     Box 2,Y1%+2,48,Y2%
  1110.   Next I%
  1111.   Deftext 1,0,0,6
  1112.   Text 10,11,"EXIT"
  1113.   Text 10,31,"HELP"
  1114.   Text 6,51,"PRINT"
  1115.   Text 13,102,"NEW"
  1116.   Circle 24,151,7
  1117.   Circle 24,171,7
  1118.   Circle 24,191,7
  1119.   Deftext 1,1,0,4
  1120.   Text 21,153,"1"
  1121.   Text 21,173,"A"
  1122.   Put 21,190,Whitea$
  1123.   Box 60,0,319,199
  1124.   @Clear_dot_box
  1125.   ' get the little boxes for use in the help option
  1126.   Get 0,0,50,16,Exi$
  1127.   Get 0,20,50,36,Hel$
  1128.   Get 0,40,50,56,Pri$
  1129.   Get 0,91,50,107,New$
  1130.   Get 0,143,50,159,Num$
  1131.   Get 0,163,50,179,Upp$
  1132.   Get 0,183,50,199,Low$
  1133. Return
  1134. '
  1135. Procedure Title
  1136.   K%=30
  1137.   Numc%=9
  1138.   Dottype%=1
  1139.   @Clear_arrays
  1140.   @Clear_records
  1141.   @Title_alert
  1142.   Deftext 2,1,0,13
  1143.   Text 115,30,"DOT-TO-DOTS"
  1144.   Deftext 1,0,0,6
  1145.   T$="              "+Chr$(191)
  1146.   Text 47,50,T$
  1147.   Text 47,50,"Another KIDPRG  in GFA Basic"
  1148.   Deftext 1,0,0,6
  1149.   Text 89,70,"from D.A. Brumleve"
  1150.   C$="   "+Chr$(189)
  1151.   Text 75,89,C$
  1152.   Text 75,90,"    1988 by"
  1153.   Text 70,130,"As published in ST-Log!"
  1154.   Deftext 1,5,0,6
  1155.   Text 75,90,"            ST-LOG"
  1156.   Deftext 1,1,0,4
  1157.   Text 58,110,"           VERSION 1.9"
  1158.   Deftext 2,1,0,4
  1159.   Text 55,150,"A COMPANION PROGRAM, DOTMAKER, WILL"
  1160.   Text 55,160,"ALLOW YOU TO MAKE YOUR OWN PUZZLES."
  1161.   @Help_alert2
  1162.   @Set_color
  1163.   Showm
  1164.   @Help_alert_check
  1165.   Hidem
  1166.   @Title_alert
  1167.   Deftext 2,1,900,13
  1168.   Text 25,144,"DOT-TO-DOTS"
  1169.   Deftext 2,1,2700,13
  1170.   Text 294,58,"DOT-TO-DOTS"
  1171.   @Load_it
  1172.   @Title1
  1173.   @Clear_records
  1174.   Pause 100
  1175.   Cls
  1176. Return
  1177. '
  1178. ' ***************************** TITLE DISPLAY ***************************
  1179. Procedure Title1
  1180.   Hidem
  1181.   For I%=1 To Dn%
  1182.     Sprite Muse$,X%(I%)-30,Y%(I%)
  1183.     Pause 5
  1184.     Sound 1,15,4,4,8
  1185.     Sound 1,15,1,5,4
  1186.     Sound 1,0,0,0,0
  1187.     Sprite Muse$
  1188.     If I%>1
  1189.       Draw X%(I%-1)-K%,Y%(I%-1) To X%(I%)-K%,Y%(I%)
  1190.     Endif
  1191.     Deffill 2
  1192.     Pcircle X%(I%)-K%,Y%(I%),7
  1193.     Color 1
  1194.     Circle X%(I%)-K%,Y%(I%),7
  1195.     Deftext 1,1,0,4
  1196.     If I%=20
  1197.       Ddd$="2O"
  1198.       Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
  1199.       Goto Skipit13
  1200.     Endif
  1201.     If I%=10
  1202.       Ddd$="1O"
  1203.       Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
  1204.       Goto Skipit13
  1205.     Endif
  1206.     If Len(Str$(I%))=1
  1207.       Tt%=3
  1208.     Else
  1209.       Tt%=6
  1210.     Endif
  1211.     Text X%(I%)-Tt%-K%,Y%(I%)+2,I%
  1212.     Skipit13:
  1213.     If I%>1
  1214.       Pcircle X%(I%-1)-K%,Y%(I%-1),7
  1215.       Circle X%(I%-1)-K%,Y%(I%-1),7
  1216.       Deftext 1,1,0,4
  1217.       If I%-1=20
  1218.         Ddd$="2O"
  1219.         Text X%(I%-1)-6-K%,Y%(I%-1)+2,Ddd$
  1220.         Goto Skipit12
  1221.       Endif
  1222.       If I%-1=10
  1223.         Ddd$="1O"
  1224.         Text X%(I%-1)-6-K%,Y%(I%-1)+2,Ddd$
  1225.         Goto Skipit12
  1226.       Endif
  1227.       If Len(Str$(I%-1))=1
  1228.         Tt%=3
  1229.       Else
  1230.         Tt%=6
  1231.       Endif
  1232.       Text X%(I%-1)-Tt%-K%,Y%(I%-1)+2,I%-1
  1233.       Skipit12:
  1234.     Endif
  1235.     Pause 10
  1236.     Game%(I%)=1
  1237.   Next I%
  1238.   Sprite Muse$
  1239.   If Nding%=1
  1240.     Color 1
  1241.     Draw X%(Dn%)-30,Y%(Dn%) To X%(1)-30,Y%(1)
  1242.     Deffill 2
  1243.     Pcircle X%(1)-30,Y%(1),7
  1244.     Pcircle X%(Dn%)-30,Y%(Dn%),7
  1245.     Color 1
  1246.     Circle X%(1)-30,Y%(1),7
  1247.     Circle X%(Dn%)-30,Y%(Dn%),7
  1248.     If Len(Str$(Dn%))=1
  1249.       Tt%=3
  1250.     Else
  1251.       Tt%=6
  1252.     Endif
  1253.     Deftext 1,1,0,4
  1254.     Text X%(1)-33,Y%(1)+2,"1"
  1255.     Text X%(Dn%)-Tt%-30,Y%(Dn%)+2,Dn%
  1256.     Pause 10
  1257.   Endif
  1258.   Pause 100
  1259.   @Clear_numbers
  1260.   @Restore_extra_lines
  1261.   Sprite Muse$,33,3
  1262.   Pause 5
  1263.   Cc%=Random(6)+2
  1264.   If Cc%=5 Or Cc%=7
  1265.     Cc%=12
  1266.   Endif
  1267.   If Cc%=8
  1268.     Cc%=9
  1269.   Endif
  1270.   @Other_sound
  1271.   Sprite Muse$
  1272.   Deffill Cc%
  1273.   Fill 33,3
  1274.   @Restore_numbers
  1275.   Pause 150
  1276. Return
  1277. '
  1278. ' ***************************** DIALOGS *******************************
  1279. Procedure Help1
  1280.   Put 66,12,Exi$
  1281.   Put 66,35,Hel$
  1282.   Put 66,58,Pri$
  1283.   Put 66,81,New$
  1284.   Put 66,104,Num$
  1285.   Put 66,127,Upp$
  1286.   Put 66,150,Low$
  1287.   Deftext 1,0,0,6
  1288.   Text 117,18,"Click EXIT to quit the"
  1289.   Text 117,28,"program."
  1290.   Text 117,41,"Click HELP to see this"
  1291.   Text 117,51,"screen."
  1292.   Text 117,64,"Click PRINT to print a"
  1293.   Text 117,74,"puzzle."
  1294.   Text 117,87,"Click NEW to start a"
  1295.   Text 117,97,"new puzzle."
  1296.   Text 117,110,"This option puts numbers"
  1297.   Text 117,120,"in the dots."
  1298.   Text 117,133,"This option puts upper-"
  1299.   Text 117,143,"case letters in the dots."
  1300.   Text 117,156,"This option puts lower-"
  1301.   Text 117,166,"case letters in the dots."
  1302. Return
  1303. '
  1304. Procedure Alert_box1
  1305.   @Alert_box2
  1306.   Deffill 11
  1307.   Pbox 74,80,154,120
  1308.   Pbox 165,80,245,120
  1309.   Color 1
  1310.   Box 74,80,154,120
  1311.   Box 75+1,81+1,153-1,119-1
  1312.   Box 165,80,245,120
  1313.   Box 166+1,81+1,244-1,119-1
  1314.   Deftext 1,0,0,6
  1315.   Text 78,135,"Dots Only"
  1316.   Text 166,135,"Lines Only"
  1317.   Text 135,70,"Print:"
  1318.   Draw 175+3,90 To 235-3,100
  1319.   Draw 235-3,100 To 200,110
  1320.   Draw 200,110 To 175+3,90
  1321.   Circle 84+3,90,7
  1322.   Circle 144-3,100,7
  1323.   Circle 109,110,7
  1324.   Deftext 1,1,0,4
  1325.   If Dottype%=1
  1326.     Text 84,90+2,"1"
  1327.     Text 144-6,102,"2"
  1328.     Text 106,112,"3"
  1329.   Endif
  1330.   If Dottype%=2
  1331.     Text 84,90+2,"A"
  1332.     Text 144-6,102,"B"
  1333.     Text 106,112,"C"
  1334.   Endif
  1335.   If Dottype%=3
  1336.     Put 84,90-1,Whitea$
  1337.     Text 144-6,102,"b"
  1338.     Text 106,112,"c"
  1339.   Endif
  1340.   Repeat
  1341.     Mouse Ab%,Ac%,Ad%
  1342.   Until Ad%>0 And Ac%>80 And Ac%<120 And ((Ab%>74 And Ab%<154) Or (Ab%>165 And Ab%<245))
  1343.   @Let_go
  1344.   If Ab%>74 And Ab%<154
  1345.     Deffill 3
  1346.     Fill 75,81
  1347.     Pdot%=1
  1348.   Else
  1349.     Deffill 3
  1350.     Fill 166,81
  1351.     Pdot%=0
  1352.   Endif
  1353.   @Alert_sound
  1354.   Pause 15
  1355. Return
  1356. '
  1357. Procedure Alert_box2
  1358.   Deffill 11
  1359.   Pbox 65,50,254,149
  1360.   Color 1
  1361.   Box 65,50,254,149
  1362.   Box 66,51,253,148
  1363.   Box 68,53,251,146
  1364.   Deffill Numc%
  1365.   Pbox 69,54,250,145
  1366. Return
  1367. '
  1368. Procedure Alert_box3
  1369.   Deffill 11
  1370.   Pbox 74,124,154,140
  1371.   Pbox 165,124,245,140
  1372.   Color 1
  1373.   Box 74,124,154,140
  1374.   Box 76,126,152,138
  1375.   Box 165,124,245,140
  1376.   Box 167,126,243,138
  1377.   Deftext 1,0,0,6
  1378.   Text 100,135,"Yes."
  1379.   Text 195,135,"No."
  1380. Return
  1381. '
  1382. Procedure Alert_check
  1383.   Repeat
  1384.     Mouse Ab%,Ac%,Ad%
  1385.   Until Ad%>0 And Ac%>124 And Ac%<140 And ((Ab%>74 And Ab%<154) Or (Ab%>165 And Ab%<245))
  1386.   Deffill Numc%
  1387.   If Ab%>74 And Ab%<154
  1388.     Fill 75,125
  1389.   Else
  1390.     Fill 166,125
  1391.   Endif
  1392.   @Alert_sound
  1393.   Pause 15
  1394.   @Let_go
  1395. Return
  1396. '
  1397. Procedure Title_alert
  1398.   Color 1
  1399.   Box 30,0,289,199
  1400.   Box 31,1,288,198
  1401.   Deffill 11
  1402.   Pbox 32,2,287,197
  1403. Return
  1404. '
  1405. Procedure Help_alert
  1406.   Deffill 11
  1407.   Pbox 61,1,318,198
  1408.   Color 1
  1409.   Box 61,1,318,198
  1410.   Deffill Numc%
  1411.   Pbox 63,3,316,196
  1412.   Box 63,3,316,196
  1413. Return
  1414. '
  1415. Procedure Help_alert2
  1416.   Deffill 11
  1417.   Pbox 100-K%,175,279-K%,191
  1418.   Color 1
  1419.   Box 61-K%,1,318-K%,198
  1420.   Box 100-K%,175,279-K%,191
  1421.   Box 102-K%,177,277-K%,189
  1422.   Deftext 1,0,0,6
  1423.   Text 117-K%,186,"     CONTINUE"
  1424. Return
  1425. '
  1426. Procedure Help_alert_check
  1427.   Repeat
  1428.     Mouse Ab%,Ac%,Ad%
  1429.   Until Ad%>0 And Ac%>175 And Ac%<191 And Ab%>100-K% And Ab%<279-K%
  1430.   Deffill Numc%
  1431.   Fill 101-K%,176
  1432.   @Alert_sound
  1433.   Pause 15
  1434.   @Let_go
  1435. Return
  1436. '
  1437. Procedure Print_dialog
  1438.   Deftext 1,0,0,6
  1439.   Text 66,68,"      Something is wrong!"
  1440.   Text 66,88,"      Is your printer on?"
  1441.   Text 69,108,"      Is it connected to"
  1442.   Text 69,118,"        your computer?"
  1443. Return
  1444. '
  1445. ' ******************************* SOUNDS *********************************
  1446. Procedure Congrats_sound
  1447.   Get 0,0,50,199,Selector$
  1448.   Deffill 0
  1449.   Deftext 2,0,0,32
  1450.   For I%=1 To 5
  1451.     Pbox 0,0,50,199
  1452.     Text 20,45,"W"
  1453.     Sound 1,15,1,4,8
  1454.     Text 20,105,"O"
  1455.     Sound 1,15,5,4,8
  1456.     Text 20,165,"W"
  1457.     Sound 1,15,8,4,8
  1458.     Sound 1,0,0,0,8
  1459.   Next I%
  1460.   Pause 200
  1461.   Put 0,0,Selector$
  1462. Return
  1463. '
  1464. Procedure Select_sound
  1465.   Sound 1,15,6,3,2
  1466.   Sound 1,15,6,4,2
  1467.   Sound 1,15,8,4,6
  1468.   Sound 1,0,0,0,0
  1469. Return
  1470. '
  1471. Procedure Other_sound
  1472.   Sound 1,15,6,4,2
  1473.   Sound 1,15,1,4,5
  1474.   Sound 1,0,0,0,0
  1475. Return
  1476. '
  1477. Procedure Buzz_sound
  1478.   Sound 1,15,1,1,10
  1479.   Sound 1,0,0,0,0
  1480. Return
  1481. '
  1482. Procedure Finale_sound
  1483.   Hidem
  1484.   Pause 15
  1485.   Restore Finale_data
  1486.   Read N%
  1487.   For I%=1 To N%
  1488.     Read Nt%,Oct%,Dur%
  1489.     Sound 1,15,Nt%,Oct%,Dur%
  1490.     Sound 1,0,0,0,0
  1491.     Pause 5
  1492.   Next I%
  1493. Return
  1494. '
  1495. Procedure Alert_sound
  1496.   Sound 1,15,10,3,2
  1497.   Sound 1,0,0,0,0
  1498. Return
  1499. '
  1500. ' ******************************* DATA ********************************
  1501. Finale_data:
  1502. Data 7
  1503. Data 6,4,16
  1504. Data 1,4,8
  1505. Data 1,4,8
  1506. Data 3,4,16
  1507. Data 1,4,32
  1508. Data 5,4,16
  1509. Data 6,4,64
  1510. '
  1511. Screen_data:
  1512. ' exit:
  1513. Data 0,14,2
  1514. ' help:
  1515. Data 20,34,4
  1516. ' print:
  1517. Data 40,54,3
  1518. ' new:
  1519. Data 91,105,5
  1520. ' numbers:
  1521. Data 143,157,11
  1522. ' uppercase:
  1523. Data 163,177,11
  1524. ' lowercase:
  1525. Data 183,197,11
  1526. '
  1527. Won_data:
  1528. Data 38,54,2
  1529. Data 58,74,3
  1530. Data 78,94,4
  1531. Data 98,114,6
  1532. Data 118,134,9
  1533. Data 138,154,12
  1534. Data 158,174,11
  1535. Data 178,194,11
  1536. '
  1537. Mouespite_data:
  1538. Data 0,49152,16384,40960,24576,36864,28672,34816,30720,33792,31744,33280,32256,33024,32512,32896
  1539. Data 32640,32832,31744,33760,27648,37376,17920,43264,1536,51456,768,33920,768,1152,0,896
  1540.