Path: funic!news.funet.fi!sunic!mcsun!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!spool.mu.edu!sdd.hp.com!hp-pcd!hpcvra.cv.hp.com!rnews!hpcvbbs!akcs.falco
From: akcs.falco@hpcvbbs.UUCP (Andrey Dolgachev)
Newsgroups: comp.sys.handhelds
Subject: Tetris2.1 update for HP48
Keywords: tetris, tetris2, update
Message-ID: <27dffd78:2431comp.sys.handhelds@hpcvbbs.UUCP>
Date: 14 Mar 91 23:40:11 GMT
Lines: 182

O.K., the last posting of Tetris2 had a problem with one or both of the
PIC files.  Therefore, I have posted an update and bug fix.  From now on,
I will simply ASC the GROB's, that should make it easier, and so I ASC'd
the two GROB"s and they're in this post.  The other thing I did is to
make it possible for the user to choose which kinds of dissolves are
wanted.  The variable DLST contains a list of 3 numbers.  The first
number refers to the beginning, the second to the high-score display, and
the last to the return to the stack.  At each of these stages, 3 things
are possible.  If a 0 is in that position in the list, then no dissolve
will happen, it will instantly goes to the next screen.  If a 1 is in
that position, then a bit-wise dissolve takes place.  If a 2 is in that
position, then a tiling effect dissolve will take place.  The default is
{1 1 1} and the variable DLST is the first in the second row of the
TETRIS2 VAR menu (after you press SETUP).  O.K., follow these steps:
  1)  Download the following to your computer.
  2)  Now do either the a or the b steps, with a being easeir (for me)
  3a) Paste the files from the following into your previous TETRIS2
posting.  Only copy the actual programs from the following directory, and
put them between any of the other files.
  4a) Erase the programs which have the same names as the ones that you
just pasted into TETRIS2, the old ones that is.
  5a) Download into your 48, press SETUP and voila.
  3b) Erase the two files PIC1 and PIC2 from your previous posting of
Tetris2.
  4b) Download both postings of Tetris2, this one and the one you just
edited.
  5b) Replace the corresponding programs from the old postings with the
ones from the new one and also put the completely new programs into the
Tetris2 directory.  Press SETUP and voila.

O.K.  That's it, I checked everything and I'll check the actual posting
after I finished.  Hpefully, this will all come together.  Now, an
additional thought.  SETUP strips, or takes away the << and >> from each
program which has its name in TLIST.  The stripping saves 5 bytes per
program, which is nice, but it also means that you cannot edit the
program on the 48.  You can send it to your computer in text mode, but
you can not reveive a stripped program in text mode, unless you put the
<< and >>'s in front and in back of each program.  If you do not want the
progrmas to be stripped, simply take whatever programs you don't want
stripped out of the TLIST listk, making sure that you at least leave the
{ } in the variable.  SETUP just strips the TLIST programs , ASC->'s the
ML and grobs, and orders everything.  O.K., that's it, please give me
feedback on the progra, experiment with the diff. dissolving screens, and
tell me what you would like to see on a future version of Tetris.  BTW,
call the file TETRIS2, and refer to this version as Tetris2.1.

--------------------cut here-----------------
%%HP: T(3)A(D)F(.);
DIR
  SETUP
    \<<
      IF XFIG ASC\->
DEPTH 2 ==
      THEN
"PLEASE PUT ASC\-> IN
OR ABOVE THIS DIR."
1 DISP INFLP DROP2
      ELSE TLIST 1
1 TLIST SIZE
        START GETI
DUP RCL STRIP SWAP
STO
        NEXT DROP2
'XFIG' STO TFIG
ASC\-> 'TFIG' STO
DISS ASC\-> 'DISS'
STO PIC1 ASC\->
'PIC1' STO PIC2
ASC\-> 'PIC2' STO {
start RESU ABOUT
HELP HIGH Erase
DLST XFIG TFIG DISS
PIC1 PIC2 } ORDER {
TLIST STRIP SETUP }
PURGE
      END
    \>>
  TLIST { start
RESU ABOUT HELP
HIGH DRHI DISER
Erase TETRIS INFLP
delay HI DRSC FIN
CHHS SHNP ADDL ADDP
FULL MKSCR MSIDE
RK2 P2 PACK ROTF
TLIN }
  start
    \<< LCD\-> RCLF
SWAP DEPTH 'L' STO
      IFERR TETRIS
      THEN
      END "" 3 DISP
DEPTH L - DROPN 3
DISER STOF "" 'SAV'
STO
    \>>
  DLST { 1 1 1 }
  DISER
    \<< DLST SWAP GET
      IF DUP 0 ==
      THEN DROP
ERASE PICT SWAP {
# 0h # 0h } SWAP
REPL
      ELSE 1 - SWAP
DISS
      END
    \>>
  PIC1
"E1B20FF0008100022000FFFFFF3000FFFFFF3000308300300010830020000083
0000000083000000008300000000830000000083000000008300000000830000
0000830000000083000000008300000000830000000083EFCF3000836CC63000
8368462000836006000083E706000083600600008368060000836C060000C7EF
0F00D0FE"
  PIC2
"E1B20FF000810002200000008FFF3000008FFF30000083003000008100200000
8100000000810000000081000000008100000000810000000081000000008100
00000087000000008FFF300000000C300000000030E7E700003036C300003016
810000303681000030E7810000308681800030C68181083066C38FFF3037E78F
FF3002D5"
  HIGH
    \<< LCD\-> DUP PICT
SWAP { # 0h # 0h }
SWAP REPL { # 0h
# 0h } PVIEW DRHI 3
DISER
    \>>
  DRHI
    \<< -.8 1.9 -6
-2.5 4.5 \-> N Y X1
X2 X3
      \<< # 83h # 40h
BLANK "HIGH SCORES"
3 \->GROB (-3.2,3.1)
SWAP REPL "SCORE"
-6.3 Y DRSC "NAME"
-1.1 Y DRSC "LINES"
3.5 Y DRSC 1 5 -.2
'Y' STO+
        FOR I N 'Y'
STO+ SCORES I GET
LIST\-> DROP 4 ROLL
SWAP X3 Y DRSC SWAP
X2 Y DRSC SWAP X1 Y
DRSC
        NEXT 2
DISER INFLP
      \>>
    \>>
  MKSCR
    \<< DUP ERASE
PICT { # 5Bh # 26h
} PIC2 REPL
(-6.5,3.2)
(6.5,-3.1) BOX
(-2.2,3.2)
(1.9,-2.8) BOX
(-6.5,1.8)
(6.5,1.6) BOX 1.5
1.1
      FOR I -6.5 I
R\->C 6.5 I .1 - R\->C
BOX -.2
      STEP PICT {
# 3h # 26h } PIC1
REPL PICT { # 2Ch
# 0h } # 28h # 3Ch
BLANK REPL PICT {
# 5Fh # 2h }
"LINES :" 1 \->GROB
REPL PICT { # 2h
# 2h } "SCORE :" 1
\->GROB REPL PICT {
# 7h # 1Ch }
"NEXT :" 1 \->GROB
REPL PICT RCL SWAP
PICT SWAP { # 0h
# 0h } SWAP REPL {
# 0h # 0h } PVIEW 1
DISER
    \>>
END
