THETAMAN

   This is Pac-Man for the TI-82.  You move with the arrow keys.  There are
   4 power Dots and a bunch of normal ones.  When you go over all of them
   you go to the next level, there are three different levels that loop.

   ===
    Copyright 1995, Micheal Conrad Tilstra, Tadpol.
    All rights reserved.
    
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:
    
    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions, and the following disclaimer.
    
    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions, and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
    
    3. The name of the author may not be used to endorse or promote products
       derived from this software without specific prior written permission.
    
    THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
    AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    
   ===

\START82\
\COMMENT=ThetaMan 1.3.0 By Mike Tilstra
\NAME=THETAMAN
\FILE=THETAMAN.82p
ClrHome
FullScreen
For(X,8,2,\(-)\1)
Output(X,5,"THETAMAN")
For(Y,1,24):End
Output(X,5,"        ")
End
Output(1,5,"THETAMAN")
Output(2,6,"1.3.0")
Output(4,8,"BY")
Output(5,3,'MIKE TILSTRA")
Pause 

ClrHome
{8,16}\->\dim [A]
0\->\S:1\->\I
Lbl A
6\->\E:8\->\F
0\->\B:0\->\C
0\->\D:0\->\U
0\->\L:0\->\M
4\->\Q:8\->\R
0\->\Z:0\->\V
4\->\K:0\->\G
prgmZTHETLEV

For(X,1,16)
For(Y,1,8)
[A](Y,X)\->\\@\
If \@\=1
Output(Y,X,".")
If \@\=3
Output(Y,X,"*")
If \@\=2
Output(Y,X,"+")
End
End

Lbl 1
0\->\A
getKey\->\A
If A=25
Then
\(-)\1\->\B:0\->\C
End
If A=34
Then
1\->\B:0\->\C
End
If A=24
Then
0\->\B:\(-)\1\->\C
End
If A=26
Then
0\->\B:1\->\C
End
If A=21
Pause 
If E+B\>=\9 or E+B\<=\0
0\->\B
If F+C\>=\17 or F+C\<=\0
0\->\C
If [A](E+B,F+C)=2
Then
0\->\B:0\->\C
End
0\->\[A](E,F)
Output(E,F," ")
E+B\->\E
F+C\->\F
If [A](E,F)=1
D+1\->\D
If [A](E,F)=3
1\->\Z
If [A](E,F)=4
S+500\->\S
Output(E,F,"\@\")
If D=85
Then
ClrHome
Output(1,1,"YOU CLEARED IT!")
Output(3,1,"DOTS :")
Output(3,9,D)
Output(6,1,"----------------")
(D*50)+S\->\S
Output(8,1,"SCORE :")
Output(8,9,S)
I+1\->\I
Pause 
Goto A
End

G+1\->\G
If G=80
Then
4\->\[A](6,8)
Output(6,8,"\y-bar\")
0\->\G
End

If Z\<>\0
Z+1\->\Z
If Z=20
0\->\Z
If Z=0
Then
If V=0
Then
If E>Q
1\->\L
If E<Q
\(-)\1\->\L
1\->\V
Else
If F>R
1\->\M
If F<R
\(-)\1\->\M
0\->\V
End
Else
If V=0
Then
int 3rand-1\->\L
1\->\V
Else
int 3rand-1\->\M
0\->\V
End
End
If Q+L\>=\9 or Q+L\<=\0
0\->\L
If R+M\>=\17 or R+M\<=\0
0\->\M
If [A](Q+L,R)=2
0\->\L
If [A](Q,R+M)=2
0\->\M

If U=0
Output(Q,R," ")
If U=1
Output(Q,R,".")
If U=3
Output(Q,R,"*")
If U=2
Output(Q,R,"+")
If U=4
Output(Q,R,"\y-bar\")
Q+L\->\Q
R+M\->\R
If Q=E and R=F
Then
If Z=0
Then
ClrHome
Output(1,1,"YOU DIED")
Output(3,1,"DOTS :")
Output(3,9,D)
Output(5,1,"----------------")
(D*50)+S\->\S
Output(6,1,"SCORE :")
Output(6,9,S)
Output(8,1,"GAME OVER")
{1,1}\->\dim [A]
Return
Stop
Else
S+200\->\S
0\->\Z
4\->\Q:8\->\R
End
End
[A](Q,R)\->\U
If Z=0
Then
Output(Q,R,"\pi\")
Else
Output(Q,R,"^")
End
Goto 1
Stop
MIKE TILSTRA
\STOP82\


\START82\
\COMMENT=Level file for Thetaman
\NAME=ZTHETLEV
\FILE=ZTHETLEV.82P
Fill(1,[A]
If I\>=\4
I-3\->\I
If I=1
Then
{1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,4,4,5,5,5,6,6,6,6,7,7,7,7,7,7,7,7,7,7,\#\
8,8}\->\\L1\
{5,11,2,3,5,7,8,9,11,13,14,15,2,5,11,15,7,9,7,8,9,2,5,11,15,2,3,5,7,8,9\#\
,11,13,14,15,5,11}\->\\L2\
End
If I=2
Then
{2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,\#\
7,7}\->\\L1\
{3,5,6,7,8,9,10,11,13,2,3,5,11,13,14,15,7,9,7,8,9,2,3,5,11,13,14,15,3,5\#\
,6,7,8,9,10,11,13}\->\\L2\
End
If I=3
Then
{2,2,2,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,7,7,7,7,7,\#\
7,7}\->\\L1\
{7,8,9,3,4,5,11,12,13,14,5,7,9,11,1,2,3,5,7,8,9,11,13,14,15,16,5,7,9,11\#\
,3,4,5,11,12,13,14}\->\\L2\
End
For(X,1,37
2\->\[A](\L1\(X),\L2\(X))
End
3\->\[A](1,1):3\->\[A](1,16)
3\->\[A](8,1):3\->\[A](8,16)
0\->\[A](4,8)
ClrList \L1\,\L2\
Return
Stop
MIKE TILSTRA
\STOP82\
