diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-09-10 19:57:06 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-09-10 19:57:06 +0200 |
commit | 0a2c7d3ccb5621150d827643bc2c196f7f8db664 (patch) | |
tree | eb928c6fdad79253e02898b5daba1da08dc3cef1 /tetris/io.prn | |
parent | 3e22583f8596fd8bb2b1e8f651c38f5a898a6155 (diff) |
More tetris wip
Diffstat (limited to 'tetris/io.prn')
-rw-r--r-- | tetris/io.prn | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/tetris/io.prn b/tetris/io.prn index 8c6a320..539cbee 100644 --- a/tetris/io.prn +++ b/tetris/io.prn @@ -59,6 +59,7 @@ "-" print 1 + dup w < end + pop "+" print #1000000 sleep @@ -71,6 +72,7 @@ "|\x1B[D\x1B[B" print #bar, left, down 1 + dup h 1 - < end + pop #1000000 sleep x w + 1 + y 1 + io_goto @@ -79,6 +81,7 @@ "|\x1B[D\x1B[B" print #bar, left, down 1 + dup h 1 - < end + pop #1000000 sleep } @@ -86,15 +89,16 @@ io_pos_windowstart io_pos_windowend io_pos_windowstart diff2 io_box } -@defun "io_square" { #args: x y (equivalent to x y 3 2 io_box) +@defun "io_square" { #args: x y "y" store "x" store x y io_goto - "+--+" print - x y 1 + io_goto - "| |" print - x y 2 + io_goto - "+--+" print + #"+--+" print + #x y 1 + io_goto + #"| |" print + #x y 2 + io_goto + #"+--+" print + "xxx\x1B[3D\x1B[Bxxx" print } @defun "io_pos_square" { #args: x y @@ -104,11 +108,18 @@ tile_sizey * padding_y + } -@defun "io_gsquare" { #args: x y +@defun "io_gsquare" { #args: x y blockidx + "b_blockclrs" swapoutvar swap arridx swap "b_blockclrs" gstore + io_setcolour io_pos_square io_square + io_resetcolour } @defun "io_setcolour" { #args: coloridx [0..7] "\x1B[3" swap + "m" + print } + +@defun "io_resetcolour" { + "\x1B[0m" print +} |