diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-07-25 20:53:47 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-07-25 20:53:47 -0700 |
commit | 44b1636e2d84bd9cedb4b3272460f67033778939 (patch) | |
tree | 8cb40c60e7d2e5ff13cd8f6a1342bb61200f124b /prototypes/tile/10.mu | |
parent | 437838b40d198a2ee5529c63719733da8d874414 (diff) | |
download | mu-44b1636e2d84bd9cedb4b3272460f67033778939.tar.gz |
6679
Diffstat (limited to 'prototypes/tile/10.mu')
-rw-r--r-- | prototypes/tile/10.mu | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/prototypes/tile/10.mu b/prototypes/tile/10.mu index def5bc3f..a20e50ef 100644 --- a/prototypes/tile/10.mu +++ b/prototypes/tile/10.mu @@ -3,7 +3,7 @@ # To run (on Linux and x86): # $ git clone https://github.com/akkartik/mu # $ cd mu -# $ ./translate_mu prototypes/tile/4.mu +# $ ./translate_mu prototypes/tile/10.mu # $ ./a.elf # # Press 'c' to create new children for the root node, and keys to move: @@ -201,10 +201,10 @@ fn create-child node: (handle cell) { fn render root: (addr cell), cursor: (addr cell) { clear-screen var depth/eax: int <- tree-depth root - var viewport-width/ecx: int <- copy 0x64 # col2 + var viewport-width/ecx: int <- copy 0x65 # col2 viewport-width <- subtract 5 # col1 var column-width/eax: int <- try-divide viewport-width, depth - render-tree root, column-width, 5, 5, 0x20, 0x64, cursor + render-tree root, column-width, 5, 5, 0x20, 0x65, cursor } fn render-tree c: (addr cell), column-width: int, row-min: int, col-min: int, row-max: int, col-max: int, cursor: (addr cell) { @@ -306,13 +306,11 @@ fn draw-hatching row1: int, col1: int, row2: int, col2: int { var c/eax: int <- copy col1 var r1/ecx: int <- copy row1 r1 <- increment - var r2/edx: int <- copy row2 - r2 <- decrement c <- add 2 { compare c, col2 break-if->= - draw-vertical-line r1, r2, c + draw-vertical-line r1, row2, c c <- add 2 loop } |