summaryrefslogtreecommitdiffstats
path: root/tis100-curses.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-12-25 04:13:41 +0100
committerLouis Burda <quent.burda@gmail.com>2023-12-25 04:13:41 +0100
commit8ec5b039472f9fbe24f2eb1c5d8e66a7551a33fd (patch)
tree55f8af2371e6f9bd75f48f991984a818de9dbb1b /tis100-curses.c
parentee7820e1cfde69c16130a43c8b7e7df1724afb9e (diff)
downloadtis100-8ec5b039472f9fbe24f2eb1c5d8e66a7551a33fd.tar.gz
tis100-8ec5b039472f9fbe24f2eb1c5d8e66a7551a33fd.zip
Fixup more behaviour - add dim idle indicator
Diffstat (limited to 'tis100-curses.c')
-rw-r--r--tis100-curses.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tis100-curses.c b/tis100-curses.c
index ec1eb2d..313aa44 100644
--- a/tis100-curses.c
+++ b/tis100-curses.c
@@ -157,8 +157,7 @@ tui_draw_lit(int x, int y, attr_t attr, int lit)
{
char buf[6];
- snprintf(buf, 5, "%03i", lit);
- if (buf[0] != '-') x += 1;
+ snprintf(buf, 5, "% 04i", lit);
tui_draw_text(x, y, attr, "%.*s", 4, buf);
}
@@ -213,8 +212,8 @@ tui_draw_tpu(struct tpu *tpu)
}
asm_print_inst(linebuf, sizeof(linebuf), &tpu->insts[inst]);
tui_draw_text(sx + 2, sy + 1 + off,
- inst == tpu->pc ? A_STANDOUT : 0, "%-*.*s",
- TPU_INPUT_COLS, TPU_INPUT_COLS, linebuf);
+ inst == tpu->pc ? A_STANDOUT | (tpu->idle ? A_DIM : 0) : 0,
+ "%-*.*s", TPU_INPUT_COLS, TPU_INPUT_COLS, linebuf);
inst++; off++;
}
}