diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-04-29 20:35:50 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-04-29 20:35:50 -0700 |
commit | 24222b17357a263719a088cc9cd3efca619a7271 (patch) | |
tree | 7dffbf222cf379b8a5faccb2c6c1d83f7a60e758 | |
parent | 26eae87d3fb25a1018b74b084b878c79445826f1 (diff) | |
download | mu-24222b17357a263719a088cc9cd3efca619a7271.tar.gz |
make pixel borders of screen clear
-rw-r--r-- | shell/sandbox.mu | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/shell/sandbox.mu b/shell/sandbox.mu index ea82cdbd..ddbe104d 100644 --- a/shell/sandbox.mu +++ b/shell/sandbox.mu @@ -216,13 +216,14 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi # top border { set-cursor-position screen, xmin, screen-y - move-cursor-right screen var width/edx: (addr int) <- get target-screen, width + var limit/edx: int <- copy *width + limit <- add 2/screen-border var x/ebx: int <- copy 0 { - compare x, *width + compare x, limit break-if->= - draw-code-point-at-cursor screen, 0x2d/horizontal-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black move-cursor-right screen x <- increment loop @@ -236,7 +237,7 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi compare y, *height break-if->= set-cursor-position screen, xmin, screen-y - draw-code-point-at-cursor screen, 0x7c/vertical-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black move-cursor-right screen var width/edx: (addr int) <- get target-screen, width var x/ebx: int <- copy 0 @@ -248,7 +249,7 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi x <- increment loop } - draw-code-point-at-cursor screen, 0x7c/vertical-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black y <- increment screen-y <- increment loop @@ -256,13 +257,14 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi # bottom border { set-cursor-position screen, xmin, screen-y - move-cursor-right screen var width/edx: (addr int) <- get target-screen, width + var limit/edx: int <- copy *width + limit <- add 2/screen-border var x/ebx: int <- copy 0 { - compare x, *width + compare x, limit break-if->= - draw-code-point-at-cursor screen, 0x2d/horizontal-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x20/space, 0x20/space, 0x12/bg=almost-black move-cursor-right screen x <- increment loop @@ -278,13 +280,14 @@ fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int # top border { set-cursor-position screen, xmin, screen-y - move-cursor-right screen var width/edx: (addr int) <- get target-screen, width + var limit/edx: int <- copy *width + limit <- add 2/screen-border var x/ebx: int <- copy 0 { - compare x, *width + compare x, limit break-if->= - draw-code-point-at-cursor screen, 0x2d/horizontal-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black move-cursor-right screen x <- increment loop @@ -299,7 +302,7 @@ fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int compare y, *height break-if->= set-cursor-position screen, xmin, screen-y - draw-code-point-at-cursor screen, 0x7c/vertical-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black move-cursor-right screen var width/edx: (addr int) <- get target-screen, width var x/ebx: int <- copy 0 @@ -311,7 +314,7 @@ fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int x <- increment loop } - draw-code-point-at-cursor screen, 0x7c/vertical-bar, 0x18/fg, 0/bg + ); void add_twice_at_end_adds_once(void **state); void find_first_exists(void **state); void find_second_exists(void **state); void find_third_exists(void **state); void find_returns_null(void **state); void find_on_empty_returns_null(void **state); void find_twice_returns_second_when_two_match(void **state); void find_five_times_finds_fifth(void **state); void find_twice_returns_first_when_two_match_and_reset(void **state); void add_contact_with_no_group(void **state); void add_contact_with_group(void **state); void add_contact_with_two_groups(void **state); void add_contact_with_three_groups(void **state); void add_contact_with_three_groups_update_adding_two(void **state); void add_contact_with_three_groups_update_removing_one(void **state); void add_contact_with_three_groups_update_removing_two(void **state); void add_contact_with_three_groups_update_removing_three(void **state); void add_contact_with_three_groups_update_two_new(void **state); void add_remove_contact_groups(void **state); void add_contacts_with_different_groups(void **state); void add_contacts_with_same_groups(void **state); void add_contacts_with_overlapping_groups(void **state); void remove_contact_with_remaining_in_group(void **state); |