PUSHIT

   In this puzzle game you must get to the exit at the top of the screen.
   You do this by moving blocks out of your way.  But here's the catch,
   blocks that look like + can be pushed left, right, up, & down.  Blocks
   looking like - can only be pushed left or right.  Block looking like !
   can only be pushed up or down.  X blocks can't be pushed at all.  You
   use the arrow keys to move.  There are now three levels for this game.
   Two major reaseons for having so few levels:  1) The levels I make are
   too easy.  2) I made a level editor so you can make you own.

PUSHEDIT

   When you start thr editor, you see a menu asking for a data sorce: New,
   old, or current.  New makes a empty matrix in [A], old asks you for a
   level number and loads that level, current uses what ever is in [A].
   You will then see the edit screen, the level is in the center, with menu
   options on the right.  There is a flashing ? cursor that you move with
   the arrow keys.  Press the number of the menu option you want, for block
   types, the current type is under the text "MODE".  If you choose item 6,
   PUSHIT is ran in a special mode. (Note, only the game included in this
   file has the special mode.)  If you produce a level you like and want to
   install it into PUSHLEVS you must open PUSHLEVS in the program editor.
   Scroll down to the space right befor 'If L>x' (where x is a number).
   Type 'If L=x' (where x is one more than the last level), on the next
   line recall matrix [A], put -> [A] after the recalled matrix.  Then
   change 'If L>x' to on more than it was.  Run PUSHIT to test the
   installation. If you tested the game, matrix[A] problily changed, there
   should be a back up in matrix[B].

Waring note:
   I have been having the most interesting troubles with this game.  The
   game PUSHIT as a TI-82 image on my computer will not convert to an ascii
   file (I typed it in as you see below), but the ascii file here converts
   perfectly into an TI-82 image, that will not convert to an ascii file.
   I don't know what's wrong.  This only happens with the PUSHIT game, the
   editor and level programs don't behave this way (good thing too).  Any
   one with any insight on this, please tell me.




   ===
    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=PUSHEDIT 2.0 By Mike Tilstra
\NAME=PUSHEDIT
\FILE=PUSHEDIT.82p
1\->\N
ClrHome
Menu("PUSHEDIT","NEW MATRIX",A,"OPEN LEVEL",B,"USE [A]",C
Lbl A
{10,16}\->\dim [A]
Fill(0,[A]
For(X,1,16
1\->\[A](1,X
1\->\[A](10,X
End
For(X,1,10
1\->\[A](X,1
1\->\[A](X,16
End
0\->\[A](1,8)
Goto C
Lbl B
Input "ENTER LEVEL NUM? ",L
prgmPUSHLEVS
Lbl C
getKey
AxesOff
FnOff 
PlotsOff 
ClrDraw
For(X,1,10
For(X,1,16
[A](X,Y,)\->\\@\
(X-1)*6\->\D
(Y-1)*4\->\E
If \@\=1
Text(D,E,"X"
If \@\=2
Text(D,E," !"
If \@\=3
Text(D,E,"-"
If \@\=4
Text(D,E,"+"
End:End
Text(48,28,"\@\"
Text(54,0,"PUSHEDIT 2.0 MIKE T"
Text(0,70,"MODE"
Text(0,90,N
Text(6,72,"1: X"
Text(12,72,"2:  !"
Text(18,72,"3: -"
Text(24,72,"4: +"
Text(30,72,"5: DEL"
Text(36,72,"6: TEST"
Text(42,72,"7: QUIT"

1\->\C:1\->\D
0\->\G
While G=0
getKey\->\K
If K=24
D-1\->\D
If K=26
D+1\->\D
If K=25
C-1\->\C
If K=34
C+1\->\C
If C>9:9\->\C
If C<2:2\->\C
If D>15:15\->\D
If D<2:2\->\D
Text((C-1)*6,(D-1)*4,"?"
If K\>=\92 and K\<=\94
K-91\->\N
If K\>=\82 and K\<=\84
K-78\->\N
If N=5:0\->\N
If N=6
Then
11072\->\X
9999999\->\L
[A]\->\[B]
prgmPUSHIT
0\->\X
End
If K=105
N\->\[A](C,D)
[A](C,D)\->\\@\
(C-1)*6\->\A
(D-1)*4\->\B
If \@\=1
Text(A,B,"X"
If \@\=2
Text(A,B," !"
If \@\=3
Text(A,B,"-"
If \@\=4
Text(A,B,"+"
If \@\=0
Text(A,B,"   "
If C=8 and D=8
Text(A,B,"\@\"
Text(0,90,N

End
ClrDraw
ClrHome
Stop
MIKE TILSTRA
\STOP82\


\START82\
\COMMENT=PUSHIT 1.1.0 by Mike Tilstra
\NAME=PUSHIT
\FILE=PUSHIT.82p
ClrHome
If X\<>\11072
Then
Output(1,6,"PUSHIT"
Output(2,6,"1.1.0"
Output(6,7,"BY"
Output(7,2,"MIKE TILSTRA"
Pause 
1\->\L
End
AxesOff
PlotsOff 
FnOff 
4\->\M
Lbl A
If X\<>\11072
prgmPUSHLEVS
0\->\Z
ClrDraw
For(X,1,10
For(Y,1,16
[A](X,Y)\->\\@\
(X-1)*6\->\D
(Y-1)*4\->\E
If \@\=1
Text(D,E,"X"
If \@\=2
Text(D,E," !"
If \@\=3
Text(D,E,"-"
If \@\=4
Text(D,E,"+"
End:End
8\->\B:9\->\A
Text(12,72,"LEVEL"
Text(18,78,L
Text(24,68,"RETRIES"

Lbl 1
getKey\->\K
If K=24
Then
If [A](A,B-1)=3 or [A](A,B-1)=4
Then
1\->\T
Repeat S=0 or S=99
[A](A,B-T)\->\S
If S=1 or S=2 or B-T\<=\1
99\->\S
T+1\->\T
End
T-2\->\T
If S=0
Then
For(X,T,1,\(-)\1
B-X-1\->\Y
[A](A,Y+1)\->\[A](A,Y)
(A-1)*6\->\D
(Y-1)*4\->\E
If [A](A,Y)=3
Text(D,E,"-"
If [A](A,Y)=4
Text(D,E,"+"
End
0\->\[A](A,B-1)
Text((A-1)*6,(B-1)*4,"   "
B-1\->\B
End
Else
If [A](A,B-1)=0
Then
Text((A-1)*6,(B-1)*4,"   "
B-1\->\B
End
End
End


If K=26
Then
If [A](A,B+1)=3 or [A](A,B+1)=4
Then
1\->\T
Repeat S=0 or S=99
[A](A,B+T)\->\S
If S=1 or S=2 or B-T\>=\16
99\->\S
T+1\->\T
End
T-2\->\T
If S=0
Then
For(X,T,1,\(-)\1
B+X+1\->\Y
[A](A,Y-1)\->\[A](A,Y)
(A-1)*6\->\D
(Y-1)*4\->\E
If [A](A,Y)=3
Text(D,E,"-"
If [A](A,Y)=4
Text(D,E,"+"
End
0\->\[A](A,B+1)
Text((A-1)*6,(B-1)*4,"   "
B+1\->\B
End
Else
If [A](A,B+1)=0
Then
Text((A-1)*6,(B-1)*4,"   "
B+1\->\B
End
End
End


If K=25
Then
If [A](A-1,B)=2 or [A](A-1,B)=4
Then
1\->\T
Repeat S=0 or S=99
[A](A-T,B)\->\S
If S=1 or S=2 or A-T\<=\1
99\->\S
T+1\->\T
End
T-2\->\T
If S=0
Then
For(X,T,1,\(-)\1
A-X-1\->\Y
[A](Y+1,B)\->\[A](Y,B)
(Y-1)*6\->\D
(B-1)*4\->\E
If [A](Y,B)=2
Text(D,E," !"
If [A](Y,B)=4
Text(D,E,"+"
End
0\->\[A](A-1,B)
Text((A-1)*6,(B-1)*4,"   "
A-1\->\A
End
Else
If [A](A-1,B)=0
Then
Text((A-1)*6,(B-1)*4,"   "
A-1\->\A
End
End
End


If K=34
Then
If [A](A+1,B)=2 or [A](A+1,B)=4
Then
1\->\T
Repeat S=0 or S=99
[A](A+T,B)\->\S
If S=1 or S=2 or A-T\>=\10
99\->\S
T+1\->\T
End
T-2\->\T
If S=0
Then
For(X,T,1,\(-)\1
A+X+1\->\Y
[A](Y-1,B)\->\[A](Y,B)
(Y-1)*6\->\D
(B-1)*4\->\E
If [A](Y,B)=2
Text(D,E," !"
If [A](Y,B)=4
Text(D,E,"+"
End
0\->\[A](A+1,B)
Text((A-1)*6,(B-1)*4,"   "
A+1\->\A
End
Else
If [A](A+1,B)=0
Then
Text((A-1)*6,(B-1)*4,"   "
A+1\->\A
End
End
End


If K=45
Then
M-1\->\M
1\->\Z
End
If M\<=\0
Then
ClrHome
Disp "YOU USED UP ALL"
Disp "YOUR RETRIES."
Disp "LEVEL:"
Output(3,9,L
Return
Stop
End

If A=1 and B=8
Then
ClrHome
Disp "YOU CLEARED IT!!"
Disp "LEVEL  :"
Disp "RETRIES:"
Output(2,10,L
Output(3,10,M
Pause 
L+1\->\L
1\->\Z
End
If Z=1
Goto A
Text((A-1)*6,(B-1)*4,"\@\"
Text(30,78,M

Goto 1

Stop
MIKE TILSTRA
\STOP82\


\START82\
\COMMENT=Levels for PUSHIT
\NAME=PUSHLEVS
\FILE=PUSHLEVS.82p
If L=1
[[1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1][1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1][1,0\#\
,0,0,0,2,3,4,3,2,0,0,0,0,0,1][1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1][1,0,0,0,\#\
0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0\#\
,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,\#\
0,0,0,0,0,0,1][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]\->\[A]
If L=2
[[1,1,1,1,1,1,1,0,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