home *** CD-ROM | disk | FTP | other *** search
File List | 1991-04-03 | 10.8 KB | 545 lines |
- ' ========================================================================
- ' = MIRROR für GFA-Basic 2.0-2.01 =
- ' = von Wolfgang Hübner, Wiesbaden =
- ' = (c) 1989 ATARImagazin (4'89) =
- ' ========================================================================
- '
- '
- Defmouse 3
- Dim Shield$(3),Swupp$(20,8),X%(11,8),Y%(11,8),Sco%(2),Dead%(2),Shoot!(2,6)
- Dim Stone!(6,6),Gx%(2),Gy%(2)
- '
- ' Spiegel Zeichnen
- '
- For I%=0 To 3
- If I%<2
- Deffill 1,2,2
- Else
- Deffill 1,2,5
- Endif
- Defline 1,1
- Pcircle 25,25,15
- Defline 1,3
- If I%=0
- Line 10,10,40,40
- Endif
- If I%=1
- Line 10,40,40,10
- Endif
- If I%=2
- Line 10,10,40,40
- Defline 1,1
- Graphmode 3
- Line 11,11,39,39
- Graphmode 1
- Endif
- If I%=3
- Line 10,40,40,10
- Defline 1,1
- Graphmode 3
- Line 11,39,39,11
- Graphmode 1
- Endif
- Get 2,2,48,48,Shield$(I%)
- Cls
- Next I%
- '
- ' Scoresteine zeichnen
- '
- Dim Score$(8)
- Deftext 1,0,0,32
- Defline 1,1
- Deffill 1,0
- Graphmode 3
- For J%=0 To 8
- Text 11+J%*50,37,Chr$(17+J%)+Chr$(16)
- Text 10+J%*50,36,Chr$(17+J%)+Chr$(16)
- Text 10+J%*50,37,Chr$(17+J%)+Chr$(16)
- Get 8+J%*50,0,45+J%*50,50,Score$(J%)
- Next J%
- Graphmode 1
- For I%=0 To 20
- Cls
- For J%=0 To 8
- Put 8+J%*50,0,Score$(J%)
- Box 5+I%+J%*50,5+I%,45-I%+J%*50,45-I%
- Get 5+I%+J%*50,5+I%,45-I%+J%*50,45-I%,Swupp$(I%,J%)
- Next J%
- Next I%
- Erase Score$()
- '
- ' Bild Aufbauen
- '
- Cls
- Deffill 1,3,8
- Pbox 400,0,639,399
- Deffill 1,0
- Pbox 412,12,628,388
- Box 415,15,625,385
- Box 416,16,624,384
- Graphmode 3
- Deftext 1,0,0,32
- A$="MIRROR"
- Text 425,45,190,A$
- Text 426,46,190,A$
- Text 425,46,190,A$
- Graphmode 1
- Deftext 1,0,0,6
- Text 421,380,200,Chr$(189)+" 1989 by Wolfgang Hübner"
- '
- ' Neuanfang
- '
- Again:
- '
- Graphmode 1
- Repeat
- Print At(1,1);
- Input "Schwierigkeit (1/2)";Bad%
- Until Bad%=1 Or Bad%=2
- Dec Bad%
- Repeat
- Print At(1,1);
- Input "Anzahl der Spiegel im Spiel (15-36)";Anzahl%
- Until Anzahl%>14 And Anzahl%<37
- '
- Deffill 1,2,4
- Pbox 0,0,400,399
- '
- Clr E%,Anz%
- Tell%=((Tell%-1) Xor 1)+1
- Arrayfill Sco%(),0
- Arrayfill X%(),0
- Arrayfill Y%(),0
- Arrayfill Shoot!(),0
- Arrayfill Dead%(),0
- Graphmode 1
- '
- ' Scoresteine setzen
- '
- Deffill 1,2,2
- Deftext 1,0,0,32
- For H%=0 To 1
- For N%=0 To 5
- E1%=Random(9)
- X%(E%,E1%)=25+H%*350
- Y%(E%,E1%)=75+N%*50
- Put X%(E%,E1%)-20,Y%(E%,E1%)-20,Swupp$(0,E1%)
- '
- Pbox 55+N%*50,5+H%*350,95+N%*50,45+H%*350
- Graphmode 2
- Text 68+N%*50,37+H%*350,2-H%
- Graphmode 1
- Inc E%
- Next N%
- Next H%
- Deftext 1,0,0,6
- '
- ' Spiegelfeld zeichnen
- '
- Deffill 1,0
- Pbox 49,49,351,351
- Defline 3
- For X%=0 To 6
- Line 50+X%*50,50,50+X%*50,350
- Line 50,X%*50+50,350,X%*50+50
- Next X%
- Defline 1
- '
- ' Spiegel setzen
- '
- Anz%=Anzahl%
- Arrayfill Stone!(),0
- While Anz%>0
- Stx%=Random(6)+1
- Sty%=Random(6)+1
- If Stone!(Stx%,Sty%)=False
- Put Stx%*50+2,Sty%*50+2,Shield$(Random(2+Bad%*2))
- Stone!(Stx%,Sty%)=True
- Dec Anz%
- Endif
- Wend
- '
- Deffill 1,2,8
- Graphmode 3
- Pbox 55,5,95,45
- Pbox 55,355,95,395
- Graphmode 1
- Gx%(1)=1
- Gy%(1)=7
- Gx%(2)=1
- Gy%(2)=0
- Deffill 1,2,2
- Tell%=2
- '
- ' Hauptroutine
- '
- Do
- '
- Clr R%,Merki%,Merkh%,Key%,Out!,Mex%,First!
- '
- Tell%=((Tell%-1) Xor 1)+1
- @Tell
- If Again!=True
- Again!=False
- Goto Again
- Endif
- Graphmode 3
- While Mousek
- Wend
- Repeat
- '
- Mouse Xx%,Yy%,K%
- Xx%=Int(Xx%/50)*50
- Yy%=Int(Yy%/50)*50
- Key$=Upper$(Inkey$)
- While Inkey$<>""
- Wend
- '
- If Key$="Q"
- Alert 3,"| Wirklich Ende ?",1,"Weiter|Neu|Quit",A
- If A=2
- Goto Again
- Endif
- If A=3
- Edit
- Endif
- Endif
- '
- ' Spiegel drehen oder verschieben
- '
- If Xx%=>50 And Xx%<=300 And Yy%>=50 And Yy%<=300 And Out!=False
- Stx%=Xx%/50
- Sty%=Yy%/50
- '
- If K% And Stone!(Stx%,Sty%)=True
- If K%=2 And Sco%(Tell%)=>50 !verschieben
- @Klang(1)
- Sub Sco%(Tell%),50
- @Tell !?
- Get Xx%+2,Yy%+2,Xx%+48,Yy%+48,Shield$
- Stone!(Stx%,Sty%)=False
- Graphmode 1
- Deffill 0
- Pbox Xx%+1,Yy%+1,Xx%+49,Yy%+49
- Deffill 1
- Graphmode 3
- Ok!=False
- Repeat
- Mouse Xx%,Yy%,K%
- Xx%=Int(Xx%/50)*50
- Yy%=Int(Yy%/50)*50
- Stx%=Xx%/50
- Sty%=Yy%/50
- If Xx%=>50 And Xx%<=300 And Yy%>=50 And Yy%<=300
- If Stone!(Stx%,Sty%)=False
- Put Xx%+2,Yy%+2,Shield$,6
- Put Xx%+2,Yy%+2,Shield$,6
- Ok!=True
- Else
- Ok!=False
- Endif
- Else
- Ok!=False
- Endif
- Until K%=0 And Ok!=True
- Put Xx%+2,Yy%+2,Shield$
- Stone!(Xx%/50,Yy%/50)=True
- Out!=True
- @Klang(1)
- Endif
- If K%=1 !drehen
- @Klang(2)
- If First!=False
- If Point(Xx%+10,Yy%+10)
- Key%=0
- Else
- Key%=1
- Endif
- If Point(Xx%+25,Yy%+25)=0 And Bad%=1
- Ugh%=2
- Else
- Ugh%=0
- Endif
- First!=True
- Mx%=Xx%
- My%=Yy%
- Endif
- Inc Key%
- If Xx%<>Mx% Or My%<>Yy%
- Out!=True
- Endif
- If K%<>3 And Out!=False
- Put Xx%+2,Yy%+2,Shield$(Even(Key%)+1+Ugh%)
- While Mousek
- Wend
- Endif
- Endif
- Endif
- '
- Endif
- '
- ' Schwarzes Feld bewegt sich
- '
- If Xx%/50<>Mex% And Xx%=>50 And Xx%<=300
- Mex%=Xx%/50
- Deffill 1,2,8
- Pbox Gx%(Tell%)*50+5,Gy%(Tell%)*50+5,Gx%(Tell%)*50+45,Gy%(Tell%)*50+45
- Gx%(Tell%)=Xx%/50
- Gy%(Tell%)=((Tell%-1) Xor 1)*7
- Pbox Gx%(Tell%)*50+5,Gy%(Tell%)*50+5,Gx%(Tell%)*50+45,Gy%(Tell%)*50+45
- Deffill 1,2,2
- Endif
- '
- Until K% And ((Xx%=>50 And Xx%<=300 And Yy%=350 And Tell%=1) Or (Xx%=>50 And Xx%<=300 And Yy%=0 And Tell%=2))
- '
- ' S C H U S S
- '
- Graphmode 1
- '
- If Gy%(Tell%)=0
- Wx%=0
- Wy%=1
- X%=Gx%(Tell%)*50+25
- Y%=25
- Endif
- If Gy%(Tell%)=7
- Wx%=0
- Wy%=-1
- X%=Gx%(Tell%)*50+25
- Y%=375
- Endif
- '
- Get 0,0,399,399,Monitor$
- @Klang(3)
- Repeat
- For T%=1 To 50
- Add X%,Wx%
- Add Y%,Wy%
- Plot X%,Y%
- For G%=1 To 50
- Next G%
- Next T%
- '
- If Point(X%+3,Y%+3) And Point(X%-3,Y%-3)
- @Klang(4)
- If Wx%=1 And Wy%=0
- Wx%=0
- Wy%=1
- Else
- If Wx%=-1 And Wy%=0
- Wx%=0
- Wy%=-1
- Else
- If Wx%=0 And Wy%=1
- Wx%=1
- Wy%=0
- Else
- If Wx%=0 And Wy%=-1
- Wx%=-1
- Wy%=0
- Endif
- Endif
- Endif
- Endif
- Endif
- If Point(X%+3,Y%-3) And Point(X%-3,Y%+3)
- @Klang(4)
- If Wx%=1 And Wy%=0
- Wx%=0
- Wy%=-1
- Else
- If Wx%=-1 And Wy%=0
- Wx%=0
- Wy%=1
- Else
- If Wx%=0 And Wy%=1
- Wx%=-1
- Wy%=0
- Else
- If Wx%=0 And Wy%=-1
- Wx%=1
- Wy%=0
- Endif
- Endif
- Endif
- Endif
- Endif
- Until X%=25 Or X%=375 Or Y%=25 Or Y%=375
- Put 0,0,Monitor$
- '
- ' Zahlenfeld getroffen?
- '
- If Y%=25 Or Y%=375
- @Shoot
- Goto Out
- Endif
- '
- ' Scorefeld getroffen.
- '
- Clr U%
- For H%=0 To 8
- For I%=0 To 11
- If X%=X%(I%,H%) And Y%=Y%(I%,H%)
- U%=H%
- Merki%=I%
- Merkh%=H%
- Add Sco%(Tell%),(H%+1)*10
- Endif
- Next I%
- Next H%
- '
- Uu%=Random(9)
- X%(Merki%,Merkh%)=0
- Y%(Merki%,Merkh%)=0
- X%(Merki%,Uu%)=X%
- Y%(Merki%,Uu%)=Y%
- '
- ' Scorefeld animieren
- '
- For I%=0 To 40
- @Klang(5)
- If I%<20
- Put X%-20+R%,Y%-20+R%,Swupp$(R%,U%)
- Else
- Put X%-20+R%,Y%-20+R%,Swupp$(R%,Uu%)
- Endif
- If I%<20
- Inc R%
- Else
- Dec R%
- Endif
- For H%=1 To 50
- Next H%
- Next I%
- Out:
- Loop
- '
- ' Infobox aktualisieren
- '
- Procedure Tell
- Print At(59,10);" Player : ";Tell%;" "
- Print At(57,11);"Turn the Mirrors ! "
- If Sco%(Tell%)=>50
- Print At(57,12);"Move the Mirrors !"
- Else
- Print At(57,12);" "
- Endif
- If Sco%(Tell%)=>200
- Print At(58,13);"Kill the Enemy !"
- Else
- Print At(58,13);" "
- Endif
- Print At(55,16);"Score Player 1 : ";Using "####",Sco%(1)
- Print At(55,17);"Score Player 2 : ";Using "####",Sco%(2)
- If Sco%(((Tell%-1) Xor 1)+1)<0
- @Dead(((Tell%-1) Xor 1)+1)
- Endif
- If Sco%(Tell%)<0
- @Dead(Tell%)
- Endif
- Return
- '
- ' Zahlenfeld getroffen
- '
- Procedure Shoot
- Sub Sco%(Tell%),200
- If Y%=25
- G%=2
- Endif
- If Y%=375
- G%=1
- Endif
- If (Y%=25 And Tell%=1) Or (Y%=375 And Tell%=2)
- If X%<>Gx%(((Tell%-1) Xor 1)+1)*50+25
- If Shoot!(G%,(X%-25)/50)=False
- If Sco%(Tell%)=>0
- @Klang(7)
- Pbox X%-20,Y%-20,X%+20,Y%+20
- Shoot!(G%,(X%-25)/50)=True
- Sub Sco%(((Tell%-1) Xor 1)+1),100
- Inc Dead%(G%)
- If Dead%(G%)=5
- @Dead(G%)
- Endif
- Else
- Shit!=True
- Print At(57,22);"Punkte sind Minus !"
- Endif
- Else
- Shit!=True
- Print At(57,22);"Stein war einmal!"
- Endif
- Else
- Shit!=True
- Print At(57,22);"Schwarzer Stein !"
- Endif
- Else
- Shit!=True
- Print At(57,23);"Falsche Seite !"
- Endif
- If Shit!=True
- Shit!=False
- @Klang(6)
- Add Sco%(((Tell%-1) Xor 1)+1),100
- Print At(57,22);" "
- Print At(57,23);" "
- Endif
- Return
- '
- ' Sieger
- '
- Procedure Dead(Tell%)
- @Klang(8)
- Alert 0,"Player "+Str$(((Tell%-1) Xor 1)+1)+"|You've won ! |Once more ?",1,"YEAH|NO",A
- If A=1
- Again!=True
- Else
- End
- Endif
- Return
- '
- ' GOOD SOUNDS
- '
- Procedure Klang(Flag%)
- If Flag%=1
- Sound 1,15,1,1
- Wave 1,1,9,10000
- Endif
- If Flag%=2
- Sound 1,15,1,1
- Wave 8,1,5,600
- Endif
- If Flag%=3
- Sound 1,15,4,4
- Wave 8,1,9,3000
- Endif
- If Flag%=4
- Sound 1,15,1,1
- Wave 1,1,0,6000
- Endif
- If Flag%=5
- Sound 1,15,1,3
- Wave 1,15,0,1000
- Endif
- If Flag%=6
- For I%=1100 To 1300 Step 4
- Sound 1,15,#I%,1
- Next I%
- Wave 0,0
- Endif
- If Flag%=7
- For I%=1600 To 1100 Step -20
- Sound 1,15,#I%,1
- Next I%
- Wave 0,0
- Endif
- If Flag%=8
- For H%=1 To 3
- For I%=1100 To 1300 Step 10
- Sound 1,15,#I%,1
- Next I%
- Next H%
- Wave 0,0
- Endif
- Return
-