about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hanoi.tlv9
-rw-r--r--src/lua.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/hanoi.tlv b/hanoi.tlv
index f529831..49ca232 100644
--- a/hanoi.tlv
+++ b/hanoi.tlv
@@ -45,17 +45,17 @@ function render_tower(window, line, col, tower_index, tower)
   window:attron(curses.A_BOLD)
   window:mvaddch(line+2, col, string.char(96+tower_index))
   window:attroff(curses.A_BOLD)
-  window:attron(curses.color_pair(7))
+  window:attron(curses.color_pair(15))
   window:mvaddstr(line+1, col-6, "              ")
-  window:attroff(curses.color_pair(7))
+  window:attroff(curses.color_pair(15))
   for i, n in ipairs(tower) do
     render_disk(window, line, col, n)
     line = line - 1
   end
   for i=1,5-len(tower)+1 do
-    window:attron(curses.color_pair(7))
+    window:attron(curses.color_pair(15))
     window:mvaddstr(line, col, "  ")
-    window:attroff(curses.color_pair(7))
+    window:attroff(curses.color_pair(15))
     line = line - 1
   end
 end]==],
@@ -88,6 +88,7 @@ function main()
   for i=1,7 do
     curses.init_pair(i, 0, i)
   end
+  curses.init_pair(15, 0, 15)
   curses.init_pair(255, 15, 1)  -- reserved for Teliva error messages
 
   while true do
diff --git a/src/lua.c b/src/lua.c
index f00b4ae..afceafd 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -929,7 +929,7 @@ extern void cleanup_curses (void);
 void developer_mode (lua_State *L) {
   /* clobber the app's ncurses colors; we'll restart the app when we rerun it. */
   for (int i = 0; i < 8; ++i)
-    init_pair(i, i, 15);
+    init_pair(i, i, 7);
   for (int i = 0; i < 8; ++i)
     init_pair(i+8, 0, i);
   init_pair(255, /*white fg*/ 15, /*red bg*/ 1);  /* for teliva error messages */
@@ -1034,7 +1034,7 @@ int main (int argc, char **argv) {
   initscr();
   keypad(stdscr, 1);
   start_color();
-  assume_default_colors(0, 15);
+  assume_default_colors(0, 7);
   draw_menu(L);
   echo();
   s.argc = argc;
mitter Michael Vetter <jubalh@iodoru.org> 2019-10-06 17:15:06 +0200 Fix test_callbacks memleak' href='/danisanti/profani-tty/commit/tests/unittests/test_callbacks.c?id=81b537b36dcec25468a0e1b1a2fe14ecb5a60ce5'>81b537b3 ^
d2a08714 ^
71879a3f ^

a2726b6a ^

71879a3f ^

71879a3f ^
a2726b6a ^
3fe1d76a ^


a2726b6a ^
3fe1d76a ^


a2726b6a ^
3fe1d76a ^


a2726b6a ^
3fe1d76a ^




a2726b6a ^
3fe1d76a ^











71879a3f ^
3fe1d76a ^
81b537b3 ^
d2a08714 ^
81b537b3 ^

71879a3f ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66