summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-07-30 22:38:16 +0200
committerLouis Burda <quent.burda@gmail.com>2023-07-30 22:38:16 +0200
commitc27689dfdcd725246731d4f28a5548ff6818f43b (patch)
tree18e89f6ce2c822e4c89d27060f6b2652ba036b09
parent33995e119a16fbf13c51cf3a72a6cc52d70a75a8 (diff)
downloadtis100-c27689dfdcd725246731d4f28a5548ff6818f43b.tar.gz
tis100-c27689dfdcd725246731d4f28a5548ff6818f43b.zip
Adjust rendering to centered box drawing characters
-rw-r--r--tis100-curses.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tis100-curses.c b/tis100-curses.c
index ff4bafd..9434f7d 100644
--- a/tis100-curses.c
+++ b/tis100-curses.c
@@ -20,11 +20,10 @@
#define TPU_INPUT_ROWS 15
#define TPU_INPUT_COLS 19
-#define TPU_INFO_W 6
+#define TPU_INFO_W 7
#define TPU_INFO_H 4
-#define TPU_CNT 6
-#define TPU_W (TPU_INPUT_COLS + 2 + 6)
-#define TPU_H (TPU_INPUT_ROWS + 2)
+#define TPU_W (1 + TPU_INPUT_COLS + TPU_INFO_W)
+#define TPU_H (1 + TPU_INPUT_ROWS + 1)
#define TIMEOUT 50
@@ -278,10 +277,10 @@ tui_draw_tpu(struct tpu *tpu)
if (port->out_set)
tui_draw_lit(sx + TPU_W, sy + 5, A_BOLD, port->out);
if (port->type & PORT_OUT)
- tui_draw_wch(sx + TPU_W + 1, sy + 7,
+ tui_draw_wch(sx + TPU_W, sy + 7,
port->out_set ? A_BOLD : 0, WACS_RARROW);
if (port->type & PORT_IN)
- tui_draw_wch(sx + TPU_W + 1, sy + 8,
+ tui_draw_wch(sx + TPU_W, sy + 8,
port->in_set ? A_BOLD : 0, WACS_LARROW);
if (port->in_set)
tui_draw_lit(sx + TPU_W, sy + 9, A_BOLD, port->in);
@@ -485,7 +484,7 @@ main(int argc, const char **argv)
ifd = inotify_init1(IN_NONBLOCK);
- reset(ifd, argc, argv, true);
+ reset(ifd, argc, argv, true);
quit = false;
while (!quit) {