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 >
Wrap
File List
|
1990-11-04
|
32KB
|
1,540 lines
'
' *********************************************************************
' D O T - 2 - D O T S
' A Dot-To-Dot Puzzle Game
' for Young Children
' yet another kidprg in GFA Basic from
' D.A. Brumleve
' Copyright 1989 by ST-LOG
' **********************************************************************
' Version 1.9
' February 20, 1989
' **********************************************************************
' REFERENCE
' **********************************************************************
' VARIABLES
' Aa%
' Ab%
' Ac%
' Ad%
' Addx$
' Addx%()
' Addy$
' Addy%()
' Alrt$
' Backgrnd%
' Bb%
' C$
' C%
' Cbutton%
' Cc%
' D$
' D%
' Dd$
' Ddd$
' Dn%
' Dottype%
' Dummy%
' Dur%
' Exi$
' Foregrnd%
' Game%()
' Ggx%
' Hel$
' Hh%
' I%
' Ii%
' Jj%
' K%
' Low$
' Mm%
' Muse$
' N%
' Nding$
' Nding%
' New$
' Nn%
' No_more%
' Nt%
' Num$
' Numc%
' Oct%
' Oo%
' P$
' Palette%()
' Pdot%
' Pri$
' Print_it%
' Recno%
' Record_already_chosen%()
' Reda$
' Redi$
' Redj$
' Redm$
' Redm1$
' Redm2$
' Redmm$
' Redw$
' Redww$
' Redww1$
' Redww2$
' Rez%
' Rr%
' Screen$
' Selector$
' T$
' Tt%
' Uc$
' Uc%
' Upp$
' Whitea$
' Whitei$
' Whitej$
' Whitem$
' Whitem1$
' Whitem2$
' Whitemm$
' Whitew$
' Whiteww$
' Whiteww1$
' Whiteww2$
' Won$
' X$
' X%()
' Y$
' Y%()
' Y1%
' Y2%
' Z$
' Z%
' Zn%
'
' ********************* INITIALIZE AND SET UP SCREEN **********************
Rez%=Xbios(4)
Showm
If Rez%<>0
Alrt$=" |This kidprg requires|low resolution."
Alert 3,Alrt$,1,"Oops!",Dummy%
End
Endif
If Not Exist("dot2dots.dat")
Alert 3," |You must have DOT2DOTS.DAT|on your disk to run this|program!",1," Oops! ",Dummy%
Alert 1," |You can use DOTMAKER.PRG to|create a DOT2DOTS.DAT file.",1,"Thanks!",Dummy%
End
Endif
Dim X%(27),Y%(27),Palette%(15),Game%(27),Addx%(100),Addy%(100),Record_already_chosen%(200)
@Save_palette
Hidem
@Black_screen
@Mouse_sprite
Cls
@Main_screen
@Clear_arrays
D%=1
Numc%=11
Dottype%=1
Nding%=0
Pdot%=0
K%=0
@Load_it
Deffill 9
Fill 6,144
Showm
'
' ***************************** MAIN LOOP ***************************
Do
Mouse Aa%,Bb%,Cbutton%
If Cbutton%>0
If Aa%>0 And Aa%<50
' *** exit
If Bb%>0 And Bb%<16
Deffill 2
Fill 6,1
@Select_sound
Sget Screen$
@Let_go
Numc%=2
@Alert_box2
@Alert_box3
Deftext 1,0,0,6
Text 89,85,"Do you really want"
Text 88,105," to stop?"
@Alert_check
If Ab%>74 And Ab%<154
@Finale_sound
Cls
@R_palette
End
Else
Sput Screen$
Endif
Pause 15
Deffill 11
Fill 6,1
Endif
' *** help
If Bb%>20 And Bb%<36
Deffill 4
Fill 6,21
@Select_sound
@Let_go
Sget Screen$
Numc%=4
K%=0
@Help_alert
@Help_alert2
@Help1
@Help_alert_check
Sput Screen$
Pause 15
Deffill 11
Fill 6,21
Endif
' *** print
If Bb%>40 And Bb%<56
Deffill 3
Fill 6,55
@Select_sound
Sget Screen$
Pause 15
Numc%=3
@Alert_box2
@Alert_box3
Deftext 1,0,0,6
Text 87,85," Do you want to"
Text 88,105,"print this puzzle?"
@Alert_check
If Ab%>74 And Ab%<154
Print_it%=1
Else
Print_it%=0
Endif
If Print_it%=1
@Print_it
Else
Sput Screen$
Endif
@Let_go
Pdot%=0
Pause 15
Deffill 11
Fill 6,55
Endif
' *** new
If Bb%>91 And Bb%<107
Deffill 5
Fill 6,92
@Select_sound
@Clear_dot_box
@Clear_arrays
@Load_it
@Let_go
Deffill 11
Fill 6,92
Showm
Endif
' *** numbered dots
If Bb%>143 And Bb%<159 And Dottype%<>1
Deffill 11
Fill 6,164
Fill 6,184
Deffill 9
Fill 6,144
Dottype%=1
@Select_sound
@Restore_numbers
Showm
@Let_go
Endif
' *** upper case letters in dots
If Bb%>163 And Bb%<179 And Dottype%<>2
Deffill 11
Fill 6,144
Fill 6,184
Deffill 9
Fill 6,164
@Select_sound
Dottype%=2
@Restore_numbers
Showm
@Let_go
Endif
' *** lower case letters in dots
If Bb%>183 And Bb%<199 And Dottype%<>5
Deffill 11
Fill 6,144
Fill 6,164
Deffill 9
Fill 6,184
@Select_sound
Dottype%=3
@Restore_numbers
Showm
@Let_go
Endif
Endif
' *** try to guess the next dot
If Aa%>60 And Bb%>0 And Aa%<319 And Bb%<199
If Aa%>X%(D%)-8 And Bb%>Y%(D%)-8 And Aa%<X%(D%)+8 And Bb%<Y%(D%)+8
Sound 1,15,4,4,8
Sound 1,15,1,5,4
Sound 1,0,0,0,0
If D%>1
Draw X%(D%-1),Y%(D%-1) To X%(D%),Y%(D%)
Endif
If Dn%=D%
If Nding%=1
Draw X%(Dn%),Y%(Dn%) To X%(1),Y%(1)
Deffill 2
Pcircle X%(1),Y%(1),7
Color 1
Circle X%(1),Y%(1),7
Deftext 1,1,0,4
If Dottype%=1
Text X%(1)-3,Y%(1)+2,"1"
Endif
If Dottype%=2
Text X%(1)-3,Y%(1)+2,"A"
Endif
If Dottype%=3
Put X%(1)-3,Y%(1)-1,Reda$
Endif
Endif
Endif
Deffill 2
Pcircle X%(D%),Y%(D%),7
Color 1
Circle X%(D%),Y%(D%),7
Deftext 1,1,0,4
If Dottype%=1
If D%=20
Ddd$="2O"
Text X%(D%)-6,Y%(D%)+2,Ddd$
Goto Skipit8
Endif
If D%=10
Ddd$="1O"
Text X%(D%)-6,Y%(D%)+2,Ddd$
Goto Skipit8
Endif
If Len(Str$(D%))=1
Tt%=3
Else
Tt%=6
Endif
Text X%(D%)-Tt%,Y%(D%)+2,D%
Skipit8:
Endif
If Dottype%=2
Uc%=D%+64
Uc$=Chr$(Uc%)
If Uc$="M"
Put X%(D%)-4,Y%(D%)-2,Redmm$
Goto Skipit5
Endif
If Uc$="W"
Put X%(D%)-4,Y%(D%)-2,Redww$
Goto Skipit5
Endif
Text X%(D%)-3,Y%(D%)+2,Uc$
Skipit5:
Endif
If Dottype%=3
Uc%=D%+96
Uc$=Chr$(Uc%)
If Uc$="a"
Put X%(D%)-3,Y%(D%)-1,Reda$
Goto Skip3
Endif
If Uc$="m"
Put X%(D%)-3,Y%(D%)-1,Redm$
Goto Skip3
Endif
If Uc$="i"
Put X%(D%)-1,Y%(D%)-3,Redi$
Goto Skip3
Endif
If Uc$="j"
Put X%(D%)-3,Y%(D%)-3,Redj$
Goto Skip3
Endif
If Uc$="w"
Put X%(D%)-3,Y%(D%)-1,Redw$
Goto Skip3
Endif
Text X%(D%)-3,Y%(D%)+2,Uc$
Skip3:
Endif
Game%(D%)=1
If D%>1
Pcircle X%(D%-1),Y%(D%-1),7
Circle X%(D%-1),Y%(D%-1),7
Deftext 1,1,0,4
If Dottype%=1
If D%-1=20
Ddd$="2O"
Text X%(D%-1)-6,Y%(D%-1)+2,Ddd$
Goto Skipit9
Endif
If D%-1=10
Ddd$="1O"
Text X%(D%-1)-6,Y%(D%-1)+2,Ddd$
Goto Skipit9
Endif
If Len(Str$(D%-1))=1
Tt%=3
Else
Tt%=6
Endif
Text X%(D%-1)-Tt%,Y%(D%-1)+2,D%-1
Skipit9:
Endif
If Dottype%=2
Uc%=(D%-1)+64
Uc$=Chr$(Uc%)
If Uc$="M"
Put X%(D%-1)-4,Y%(D%-1)-2,Redmm$
Goto Skipit6
Endif
If Uc$="W"
Put X%(D%-1)-4,Y%(D%-1)-2,Redww$
Goto Skipit6
Endif
Text X%(D%-1)-3,Y%(D%-1)+2,Uc$
Skipit6:
Endif
If Dottype%=3
Uc%=(D%-1)+96
Uc$=Chr$(Uc%)
If Uc$="a"
Put X%(D%-1)-3,Y%(D%-1)-1,Reda$
Goto Skip2
Endif
If Uc$="m"
Put X%(D%-1)-3,Y%(D%-1)-1,Redm$
Goto Skip2
Endif
If Uc$="i"
Put X%(D%-1)-1,Y%(D%-1)-3,Redi$
Goto Skip2
Endif
If Uc$="j"
Put X%(D%-1)-3,Y%(D%-1)-3,Redj$
Goto Skip2
Endif
If Uc$="w"
Put X%(D%-1)-3,Y%(D%-1)-1,Redw$
Goto Skip2
Endif
Text X%(D%-1)-3,Y%(D%-1)+2,Uc$
Skip2:
Endif
Endif
Inc D%
If D%>Dn%
@Wonit
Endif
@Let_go
Else
If Dn%>D%+1 Or Dn%=D%
Sound 1,15,3,3,8
Sound 1,15,1,3,16
Sound 1,0,0,0,0
@Let_go
Endif
Endif
Endif
Endif
Loop
'
' *********************** REWARD FOR COMPLETE DOT-TO-DOT ******************
Procedure Wonit
Hidem
@Congrats_sound
Deffill 11
Pbox 0,0,50,199
Color 1
Box 0,0,50,199
Deftext 1,0,0,6
Text 5,12,"Color"
Text 5,22," the"
Text 2,32,"Puzzle"
Restore Won_data
For I%=1 To 8
Read Y1%,Y2%,C%
Box 5,Y1%,45,Y2%
Deffill C%
Pbox 7,Y1%+2,43,Y2%-2
Box 7,Y1%+2,43,Y2%-2
Next I%
Deftext 1,0,0,6
Text 9,189,"DONE"
Get 0,0,50,199,Won$
Cc%=2
Deffill 2
Fill 6,39
@Clear_numbers
@Restore_extra_lines
Showm
Do
Mouse Hh%,Ii%,Jj%
Exit If Jj%>0 And Hh%>5 And Hh%<45 And Ii%>178 And Ii%<194
If Jj%>0 And Hh%>5 And Hh%<45
Restore Won_data
For I%=1 To 8
Read Y1%,Y2%,C%
If Ii%>Y1% And Ii%<Y2%
Cc%=C%
Put 0,0,Won$
Deffill Cc%
Fill 6,Y1%+1
If Cc%=11
Deffill 9
Fill 6,Y1%+1
Endif
@Select_sound
Endif
Next I%
@Let_go
Endif
If Jj%>0 And Hh%>60 And Hh%<319 And Ii%>0 And Ii%<199
If Point(Hh%,Ii%)<>1
@Other_sound
Deffill Cc%
Fill Hh%,Ii%
@Let_go
Endif
Endif
Loop
Deffill 9
Fill 6,179
@Select_sound
Pause 15
Put 0,0,Selector$
@Restore_numbers
Showm
@Let_go
Return
'
' ******************************** PRINT ***********************************
Procedure Print_it
@Alert_box1
If Out?(0)=-1
@Black_screen
Cls
Color 1
If Pdot%=1
' *** print dots only
Deffill 11
Pbox 60,0,319,199
Color 1
Box 60,0,319,199
@Restore_extra_lines
@Restore_numbers
Get 60,0,319,199,P$
Cls
Put 30,0,P$
Setcolor 0,7,7,7
Setcolor 15,0,0,0
Setcolor 10,7,7,7
Hardcopy
Else
' *** print lines only
Deffill 11
Pbox 60,0,319,199
Color 1
Box 60,0,319,199
@Clear_numbers
@Restore_extra_lines
Get 60,0,319,199,P$
Cls
Put 30,0,P$
Setcolor 0,7,7,7
Setcolor 15,0,0,0
Setcolor 10,7,7,7
Hardcopy
Endif
@Black_screen
Cls
Else
Numc%=3
K%=0
Pause 15
@Buzz_sound
@Help_alert
@Help_alert2
@Print_dialog
Showm
@Help_alert_check
Endif
Sput Screen$
@Set_color
Showm
Return
'
' *************************** LOAD AND SELECT DOT-TO-DOT *******************
Procedure Load_it
Hidem
Open "r",#1,"dot2dots.dat",255
Field #1,1 As Nding$,1 As D$,1 As Z$,100 As Addx$,100 As Addy$,26 As X$,26 As Y$
Rr%=Lof(#1)/255
Recno%=Random(Rr%)+1
No_more%=0
Try_again:
For I%=1 To Rr%
Exit If Record_already_chosen%(I%)=0
If I%=Rr% And Record_already_chosen%(Rr%)=1
No_more%=1
Endif
Exit If No_more%=1
Next I%
If No_more%=1
@Clear_records
Endif
Recno%=Random(Rr%)+1
' *** make sure this record isn't a repeat:
If Record_already_chosen%(Recno%)=1
Goto Try_again
Endif
Record_already_chosen%(Recno%)=1
Get #1,Recno%
Dn%=Asc(D$)
Zn%=Asc(Z$)
Z%=Zn%
Nding%=Asc(Nding$)
Color 1
Ggx%=1
For I%=1 To Zn%
Addx%(I%)=Asc(Mid$(Addx$,I%,1))+72
Addy%(I%)=Asc(Mid$(Addy$,I%,1))+15
If Ggx%=2
Draw Addx%(I%)-K%,Addy%(I%) To Addx%(I%-1)-K%,Addy%(I%-1)
Endif
If Ggx%=1
Ggx%=2
Else
Ggx%=1
Endif
Next I%
For I%=1 To Dn%
X%(I%)=Asc(Mid$(X$,I%,1))+72
Y%(I%)=Asc(Mid$(Y$,I%,1))+15
Deffill 11
Pcircle X%(I%)-K%,Y%(I%),7
Circle X%(I%)-K%,Y%(I%),7
Deftext 1,1,0,4
If Dottype%=1
If I%=20
Ddd$="2O"
Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
Goto Skipit11
Endif
If I%=10
Ddd$="1O"
Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
Goto Skipit11
Endif
If Len(Str$(I%))=1
Tt%=3
Else
Tt%=6
Endif
Text X%(I%)-Tt%-K%,Y%(I%)+2,I%
Skipit11:
Endif
If Dottype%=2
Uc%=I%+64
Uc$=Chr$(Uc%)
If Uc$="M"
Put X%(I%)-4-K%,Y%(I%)-2,Whitemm$
Goto Skipit2
Endif
If Uc$="W"
Put X%(I%)-4-K%,Y%(I%)-2,Whiteww$
Goto Skipit2
Endif
Text X%(I%)-3-K%,Y%(I%)+2,Uc$
Skipit2:
Endif
If Dottype%=3
Uc%=I%+96
Uc$=Chr$(Uc%)
If Uc$="a"
Put X%(I%)-3-K%,Y%(I%)-1,Whitea$
Goto Skipit
Endif
If Uc$="m"
Put X%(I%)-3-K%,Y%(I%)-1,Whitem$
Goto Skipit
Endif
If Uc$="i"
Put X%(I%)-1-K%,Y%(I%)-3,Whitei$
Goto Skipit
Endif
If Uc$="j"
Put X%(I%)-3-K%,Y%(I%)-3,Whitej$
Goto Skipit
Endif
If Uc$="w"
Put X%(I%)-3-K%,Y%(I%)-1,Whitew$
Goto Skipit
Endif
Text X%(I%)-3-K%,Y%(I%)+2,Uc$
Skipit:
Endif
Next I%
Close #1
Return
'
' ***************** CLEAR/RESTORE SCREEN AREAS AND VARIABLES ***************
Procedure Clear_dot_box
Deffill 11
Pbox 61,1,318,198
Return
'
Procedure Clear_arrays
For I%=1 To 27
X%(I%)=0
Y%(I%)=0
Game%(I%)=0
Next I%
For I%=1 To 100
Addx%(I%)=0
Addy%(I%)=0
Next I%
D%=1
Dn%=0
Z%=1
Return
'
Procedure Clear_numbers
Color 1
For I%=1 To Dn%
Deffill 11
Pcircle X%(I%)-K%,Y%(I%),7
If I%>1
Draw X%(I%)-K%,Y%(I%) To X%(I%-1)-K%,Y%(I%-1)
Endif
Next I%
If Nding%=1
Draw X%(1)-K%,Y%(1) To X%(Dn%)-K%,Y%(Dn%)
Endif
Return
'
Procedure Restore_extra_lines
Ggx%=1
For I%=1 To Z%
If Ggx%=2
Draw Addx%(I%)-K%,Addy%(I%) To Addx%(I%-1)-K%,Addy%(I%-1)
Endif
If Ggx%=1
Ggx%=2
Else
Ggx%=1
Endif
Next I%
Return
'
Procedure Clear_records
For I%=1 To 200
Record_already_chosen%(I%)=0
Next I%
Return
'
Procedure Restore_numbers
Hidem
For I%=1 To Dn%
If Game%(I%)=0
Numc%=11
Else
Numc%=2
Endif
If Pdot%=1
Numc%=11
Endif
Deffill Numc%
Pcircle X%(I%)-K%,Y%(I%),7
Color 1
Circle X%(I%)-K%,Y%(I%),7
Deftext 1,1,0,4
If Dottype%=1
If I%=20
Ddd$="2O"
Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
Goto Skipit10
Endif
If I%=10
Ddd$="1O"
Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
Goto Skipit10
Endif
If Len(Str$(I%))=1
Tt%=3
Else
Tt%=6
Endif
Text X%(I%)-Tt%-K%,Y%(I%)+2,I%
Skipit10:
Endif
If Dottype%=2
Uc%=I%+64
Uc$=Chr$(Uc%)
If Uc$="M"
If Numc%=11
Dd$=Whitemm$
Else
Dd$=Redmm$
Endif
Put X%(I%)-4-K%,Y%(I%)-2,Dd$
Goto Skipit3
Endif
If Uc$="W"
If Numc%=11
Dd$=Whiteww$
Else
Dd$=Redww$
Endif
Put X%(I%)-4-K%,Y%(I%)-2,Dd$
Goto Skipit3
Endif
Text X%(I%)-3-K%,Y%(I%)+2,Uc$
Skipit3:
Endif
If Dottype%=3
Uc%=I%+96
Uc$=Chr$(Uc%)
If Uc$="a"
If Numc%=11
Dd$=Whitea$
Else
Dd$=Reda$
Endif
Put X%(I%)-3-K%,Y%(I%)-1,Dd$
Goto Skip
Endif
If Uc$="m"
If Numc%=11
Dd$=Whitem$
Else
Dd$=Redm$
Endif
Put X%(I%)-3-K%,Y%(I%)-1,Dd$
Goto Skip
Endif
If Uc$="i"
If Numc%=11
Dd$=Whitei$
Else
Dd$=Redi$
Endif
Put X%(I%)-1-K%,Y%(I%)-3,Dd$
Goto Skip
Endif
If Uc$="j"
If Numc%=11
Dd$=Whitej$
Else
Dd$=Redj$
Endif
Put X%(I%)-3-K%,Y%(I%)-3,Dd$
Goto Skip
Endif
If Uc$="w"
If Numc%=11
Dd$=Whitew$
Else
Dd$=Redw$
Endif
Put X%(I%)-3-K%,Y%(I%)-1,Dd$
Goto Skip
Endif
Text X%(I%)-3-K%,Y%(I%)+2,Uc$
Skip:
Endif
Next I%
Return
'
' ************************ COLOR PALETTE ACTIVITIES **********************
Procedure Set_color
Setcolor 0,4,4,4 !=Color# 0
Setcolor 15,0,0,0 !=Color# 1--black
Setcolor 1,7,0,0 !=Color# 2--red
Setcolor 2,0,6,0 !=Color# 3--(print) green
Setcolor 4,7,4,0 !=Color# 4--(help) orange
Setcolor 6,7,6,0 !=Color# 5--gold
Setcolor 3,7,7,0 !=Color# 6--yellow
Setcolor 5,0,5,7 !=Color# 7--blue
Setcolor 7,4,4,4 !=Color# 8
Setcolor 8,3,3,3 !=Color# 9
Setcolor 9,7,3,3 !=Color# 10
Setcolor 10,7,7,7 !=Color# 11--white
Setcolor 12,3,3,7 !=Color# 12
Setcolor 14,3,7,7 !=Color# 13
Setcolor 11,7,7,3 !=Color# 14
Setcolor 13,7,3,7 !=Color# 15
Return
'
Procedure Save_palette
For I%=0 To 15
Palette%(I%)=Xbios(7,W:I%,W:-1)
Next I%
Return
'
Procedure R_palette
For I%=0 To 15
Setcolor I%,Palette%(I%)
Next I%
Return
'
Procedure Black_screen
For I%=0 To 15
Setcolor I%,4,4,4
Next I%
Return
'
' ************************** WATCH THE MOUSE **************************
Procedure Let_go
Repeat
Mouse Mm%,Nn%,Oo%
Until Oo%=0
Return
'
Procedure Mouse_sprite
Let Muse$=Mki$(0)+Mki$(0)
Let Muse$=Muse$+Mki$(0)
Let Muse$=Muse$+Mki$(0)
Let Muse$=Muse$+Mki$(15)
Restore Mouespite_data
For I%=1 To 16
Read Foregrnd%,Backgrnd%
Let Muse$=Muse$+Mki$(Backgrnd%)+Mki$(Foregrnd%)
Next I%
Return
'
' ******************************* SCREENS *****************************
Procedure Main_screen
Graphmode 2
Deffill 11
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"o"
Draw 15,10 To 15,7
Get 10,7,15,10,Whitea$
Deffill 2
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"o"
Draw 15,10 To 15,7
Get 10,7,15,10,Reda$
'
Deffill 11
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"n"
Deftext 1,1,0,4
Text 12,10,"n"
Color 11
Draw 12,10 To 12,8
Draw 15,12 To 15,8
Get 10,7,18,10,Whitem$
Deffill 2
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"n"
Deftext 1,1,0,4
Text 12,10,"n"
Color 2
Draw 12,10 To 12,8
Draw 15,12 To 15,8
Get 10,7,17,10,Redm$
'
Deffill 11
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"j"
Color 11
Draw 13,7 To 14,7
Get 10,6,14,12,Whitej$
Deffill 2
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"j"
Color 2
Draw 13,7 To 14,7
Get 10,6,14,12,Redj$
'
Deffill 11
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"M"
Get 10,6,13,10,Whitem1$
Get 12,6,15,10,Whitem2$
Deffill 11
Pbox 0,0,319,199
Put 10,6,Whitem1$
Put 14,6,Whitem2$
Draw 13,9 To 14,9
Draw 12,6
Draw 15,6
Color 11
Draw 12,8
Draw 15,8
Get 10,6,17,10,Whitemm$
'
Deffill 2
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"M"
Get 10,6,13,10,Redm1$
Get 12,6,15,10,Redm2$
Deffill 2
Pbox 0,0,319,199
Put 10,6,Redm1$
Put 14,6,Redm2$
Draw 13,9 To 14,9
Draw 12,6
Draw 15,6
Color 2
Draw 12,8
Draw 15,8
Get 10,6,17,10,Redmm$
'
Cls
Deffill 11
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"W"
Get 10,6,13,10,Whiteww1$
Get 12,6,15,10,Whiteww2$
Pause 200
Deffill 11
Pbox 0,0,319,199
Put 10,6,Whiteww1$
Put 14,6,Whiteww2$
Draw 13,7 To 14,7
Draw 12,10
Draw 15,10
Color 11
Draw 12,8
Draw 15,8
Get 10,6,17,10,Whiteww$
Deffill 2
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"W"
Get 10,6,13,10,Redww1$
Get 12,6,15,10,Redww2$
Deffill 2
Pbox 0,0,319,199
Put 10,6,Redww1$
Put 14,6,Redww2$
Draw 13,7 To 14,7
Draw 12,10
Draw 15,10
Color 2
Draw 12,8
Draw 15,8
Get 10,6,17,10,Redww$
'
Deffill 11
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"i"
Draw 12,5 To 13,5
Color 11
Draw 11,7
Draw 11,10
Get 12,5,13,10,Whitei$
Deffill 2
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"i"
Draw 12,5 To 13,5
Color 2
Draw 11,7
Draw 11,10
Get 12,5,13,10,Redi$
'
Deffill 11
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"w"
Draw 17,10 To 17,7
Draw 16,10 To 16,7
Draw 13,7
Color 11
Draw 10,10
Draw 17,10
Draw 12,8 To 12,6
Draw 15,8 To 15,6
Get 10,7,18,10,Whitew$
Deffill 2
Pbox 0,0,319,199
Color 1
Deftext 1,1,0,4
Text 10,10,"w"
Draw 17,10 To 17,7
Draw 16,10 To 16,7
Draw 13,7
Color 2
Draw 10,10
Draw 17,10
Draw 12,8 To 12,6
Draw 15,8 To 15,6
Get 10,7,18,10,Redw$
Cls
@Title
Color 1
Restore Screen_data
For I%=1 To 7
Read Y1%,Y2%,C%
Deffill 11
Pbox 0,Y1%,50,Y2%+2
Box 0,Y1%,50,Y2%+2
Deffill C%
Pbox 2,Y1%+2,48,Y2%
Box 2,Y1%+2,48,Y2%
Next I%
Deftext 1,0,0,6
Text 10,11,"EXIT"
Text 10,31,"HELP"
Text 6,51,"PRINT"
Text 13,102,"NEW"
Circle 24,151,7
Circle 24,171,7
Circle 24,191,7
Deftext 1,1,0,4
Text 21,153,"1"
Text 21,173,"A"
Put 21,190,Whitea$
Box 60,0,319,199
@Clear_dot_box
' get the little boxes for use in the help option
Get 0,0,50,16,Exi$
Get 0,20,50,36,Hel$
Get 0,40,50,56,Pri$
Get 0,91,50,107,New$
Get 0,143,50,159,Num$
Get 0,163,50,179,Upp$
Get 0,183,50,199,Low$
Return
'
Procedure Title
K%=30
Numc%=9
Dottype%=1
@Clear_arrays
@Clear_records
@Title_alert
Deftext 2,1,0,13
Text 115,30,"DOT-TO-DOTS"
Deftext 1,0,0,6
T$=" "+Chr$(191)
Text 47,50,T$
Text 47,50,"Another KIDPRG in GFA Basic"
Deftext 1,0,0,6
Text 89,70,"from D.A. Brumleve"
C$=" "+Chr$(189)
Text 75,89,C$
Text 75,90," 1988 by"
Text 70,130,"As published in ST-Log!"
Deftext 1,5,0,6
Text 75,90," ST-LOG"
Deftext 1,1,0,4
Text 58,110," VERSION 1.9"
Deftext 2,1,0,4
Text 55,150,"A COMPANION PROGRAM, DOTMAKER, WILL"
Text 55,160,"ALLOW YOU TO MAKE YOUR OWN PUZZLES."
@Help_alert2
@Set_color
Showm
@Help_alert_check
Hidem
@Title_alert
Deftext 2,1,900,13
Text 25,144,"DOT-TO-DOTS"
Deftext 2,1,2700,13
Text 294,58,"DOT-TO-DOTS"
@Load_it
@Title1
@Clear_records
Pause 100
Cls
Return
'
' ***************************** TITLE DISPLAY ***************************
Procedure Title1
Hidem
For I%=1 To Dn%
Sprite Muse$,X%(I%)-30,Y%(I%)
Pause 5
Sound 1,15,4,4,8
Sound 1,15,1,5,4
Sound 1,0,0,0,0
Sprite Muse$
If I%>1
Draw X%(I%-1)-K%,Y%(I%-1) To X%(I%)-K%,Y%(I%)
Endif
Deffill 2
Pcircle X%(I%)-K%,Y%(I%),7
Color 1
Circle X%(I%)-K%,Y%(I%),7
Deftext 1,1,0,4
If I%=20
Ddd$="2O"
Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
Goto Skipit13
Endif
If I%=10
Ddd$="1O"
Text X%(I%)-6-K%,Y%(I%)+2,Ddd$
Goto Skipit13
Endif
If Len(Str$(I%))=1
Tt%=3
Else
Tt%=6
Endif
Text X%(I%)-Tt%-K%,Y%(I%)+2,I%
Skipit13:
If I%>1
Pcircle X%(I%-1)-K%,Y%(I%-1),7
Circle X%(I%-1)-K%,Y%(I%-1),7
Deftext 1,1,0,4
If I%-1=20
Ddd$="2O"
Text X%(I%-1)-6-K%,Y%(I%-1)+2,Ddd$
Goto Skipit12
Endif
If I%-1=10
Ddd$="1O"
Text X%(I%-1)-6-K%,Y%(I%-1)+2,Ddd$
Goto Skipit12
Endif
If Len(Str$(I%-1))=1
Tt%=3
Else
Tt%=6
Endif
Text X%(I%-1)-Tt%-K%,Y%(I%-1)+2,I%-1
Skipit12:
Endif
Pause 10
Game%(I%)=1
Next I%
Sprite Muse$
If Nding%=1
Color 1
Draw X%(Dn%)-30,Y%(Dn%) To X%(1)-30,Y%(1)
Deffill 2
Pcircle X%(1)-30,Y%(1),7
Pcircle X%(Dn%)-30,Y%(Dn%),7
Color 1
Circle X%(1)-30,Y%(1),7
Circle X%(Dn%)-30,Y%(Dn%),7
If Len(Str$(Dn%))=1
Tt%=3
Else
Tt%=6
Endif
Deftext 1,1,0,4
Text X%(1)-33,Y%(1)+2,"1"
Text X%(Dn%)-Tt%-30,Y%(Dn%)+2,Dn%
Pause 10
Endif
Pause 100
@Clear_numbers
@Restore_extra_lines
Sprite Muse$,33,3
Pause 5
Cc%=Random(6)+2
If Cc%=5 Or Cc%=7
Cc%=12
Endif
If Cc%=8
Cc%=9
Endif
@Other_sound
Sprite Muse$
Deffill Cc%
Fill 33,3
@Restore_numbers
Pause 150
Return
'
' ***************************** DIALOGS *******************************
Procedure Help1
Put 66,12,Exi$
Put 66,35,Hel$
Put 66,58,Pri$
Put 66,81,New$
Put 66,104,Num$
Put 66,127,Upp$
Put 66,150,Low$
Deftext 1,0,0,6
Text 117,18,"Click EXIT to quit the"
Text 117,28,"program."
Text 117,41,"Click HELP to see this"
Text 117,51,"screen."
Text 117,64,"Click PRINT to print a"
Text 117,74,"puzzle."
Text 117,87,"Click NEW to start a"
Text 117,97,"new puzzle."
Text 117,110,"This option puts numbers"
Text 117,120,"in the dots."
Text 117,133,"This option puts upper-"
Text 117,143,"case letters in the dots."
Text 117,156,"This option puts lower-"
Text 117,166,"case letters in the dots."
Return
'
Procedure Alert_box1
@Alert_box2
Deffill 11
Pbox 74,80,154,120
Pbox 165,80,245,120
Color 1
Box 74,80,154,120
Box 75+1,81+1,153-1,119-1
Box 165,80,245,120
Box 166+1,81+1,244-1,119-1
Deftext 1,0,0,6
Text 78,135,"Dots Only"
Text 166,135,"Lines Only"
Text 135,70,"Print:"
Draw 175+3,90 To 235-3,100
Draw 235-3,100 To 200,110
Draw 200,110 To 175+3,90
Circle 84+3,90,7
Circle 144-3,100,7
Circle 109,110,7
Deftext 1,1,0,4
If Dottype%=1
Text 84,90+2,"1"
Text 144-6,102,"2"
Text 106,112,"3"
Endif
If Dottype%=2
Text 84,90+2,"A"
Text 144-6,102,"B"
Text 106,112,"C"
Endif
If Dottype%=3
Put 84,90-1,Whitea$
Text 144-6,102,"b"
Text 106,112,"c"
Endif
Repeat
Mouse Ab%,Ac%,Ad%
Until Ad%>0 And Ac%>80 And Ac%<120 And ((Ab%>74 And Ab%<154) Or (Ab%>165 And Ab%<245))
@Let_go
If Ab%>74 And Ab%<154
Deffill 3
Fill 75,81
Pdot%=1
Else
Deffill 3
Fill 166,81
Pdot%=0
Endif
@Alert_sound
Pause 15
Return
'
Procedure Alert_box2
Deffill 11
Pbox 65,50,254,149
Color 1
Box 65,50,254,149
Box 66,51,253,148
Box 68,53,251,146
Deffill Numc%
Pbox 69,54,250,145
Return
'
Procedure Alert_box3
Deffill 11
Pbox 74,124,154,140
Pbox 165,124,245,140
Color 1
Box 74,124,154,140
Box 76,126,152,138
Box 165,124,245,140
Box 167,126,243,138
Deftext 1,0,0,6
Text 100,135,"Yes."
Text 195,135,"No."
Return
'
Procedure Alert_check
Repeat
Mouse Ab%,Ac%,Ad%
Until Ad%>0 And Ac%>124 And Ac%<140 And ((Ab%>74 And Ab%<154) Or (Ab%>165 And Ab%<245))
Deffill Numc%
If Ab%>74 And Ab%<154
Fill 75,125
Else
Fill 166,125
Endif
@Alert_sound
Pause 15
@Let_go
Return
'
Procedure Title_alert
Color 1
Box 30,0,289,199
Box 31,1,288,198
Deffill 11
Pbox 32,2,287,197
Return
'
Procedure Help_alert
Deffill 11
Pbox 61,1,318,198
Color 1
Box 61,1,318,198
Deffill Numc%
Pbox 63,3,316,196
Box 63,3,316,196
Return
'
Procedure Help_alert2
Deffill 11
Pbox 100-K%,175,279-K%,191
Color 1
Box 61-K%,1,318-K%,198
Box 100-K%,175,279-K%,191
Box 102-K%,177,277-K%,189
Deftext 1,0,0,6
Text 117-K%,186," CONTINUE"
Return
'
Procedure Help_alert_check
Repeat
Mouse Ab%,Ac%,Ad%
Until Ad%>0 And Ac%>175 And Ac%<191 And Ab%>100-K% And Ab%<279-K%
Deffill Numc%
Fill 101-K%,176
@Alert_sound
Pause 15
@Let_go
Return
'
Procedure Print_dialog
Deftext 1,0,0,6
Text 66,68," Something is wrong!"
Text 66,88," Is your printer on?"
Text 69,108," Is it connected to"
Text 69,118," your computer?"
Return
'
' ******************************* SOUNDS *********************************
Procedure Congrats_sound
Get 0,0,50,199,Selector$
Deffill 0
Deftext 2,0,0,32
For I%=1 To 5
Pbox 0,0,50,199
Text 20,45,"W"
Sound 1,15,1,4,8
Text 20,105,"O"
Sound 1,15,5,4,8
Text 20,165,"W"
Sound 1,15,8,4,8
Sound 1,0,0,0,8
Next I%
Pause 200
Put 0,0,Selector$
Return
'
Procedure Select_sound
Sound 1,15,6,3,2
Sound 1,15,6,4,2
Sound 1,15,8,4,6
Sound 1,0,0,0,0
Return
'
Procedure Other_sound
Sound 1,15,6,4,2
Sound 1,15,1,4,5
Sound 1,0,0,0,0
Return
'
Procedure Buzz_sound
Sound 1,15,1,1,10
Sound 1,0,0,0,0
Return
'
Procedure Finale_sound
Hidem
Pause 15
Restore Finale_data
Read N%
For I%=1 To N%
Read Nt%,Oct%,Dur%
Sound 1,15,Nt%,Oct%,Dur%
Sound 1,0,0,0,0
Pause 5
Next I%
Return
'
Procedure Alert_sound
Sound 1,15,10,3,2
Sound 1,0,0,0,0
Return
'
' ******************************* DATA ********************************
Finale_data:
Data 7
Data 6,4,16
Data 1,4,8
Data 1,4,8
Data 3,4,16
Data 1,4,32
Data 5,4,16
Data 6,4,64
'
Screen_data:
' exit:
Data 0,14,2
' help:
Data 20,34,4
' print:
Data 40,54,3
' new:
Data 91,105,5
' numbers:
Data 143,157,11
' uppercase:
Data 163,177,11
' lowercase:
Data 183,197,11
'
Won_data:
Data 38,54,2
Data 58,74,3
Data 78,94,4
Data 98,114,6
Data 118,134,9
Data 138,154,12
Data 158,174,11
Data 178,194,11
'
Mouespite_data:
Data 0,49152,16384,40960,24576,36864,28672,34816,30720,33792,31744,33280,32256,33024,32512,32896
Data 32640,32832,31744,33760,27648,37376,17920,43264,1536,51456,768,33920,768,1152,0,896