aboutsummaryrefslogtreecommitdiff
path: root/ui/curses
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-04-24 05:19:57 +0200
committerPaul Oliver <contact@pauloliver.dev>2026-04-28 00:06:26 +0200
commitf7f2d1193758bb9d7a2d467f188cf755c8d5ddc9 (patch)
tree4c8c0f3df3a67204bb0d16670b360bea6518aa81 /ui/curses
parent397286c87dc9aa3cba458973bdc65b3f3be14657 (diff)
Removes old data server and cleans up python code
Diffstat (limited to 'ui/curses')
-rw-r--r--ui/curses/ui.c17
-rw-r--r--ui/curses/ui_vars.py3
2 files changed, 9 insertions, 11 deletions
diff --git a/ui/curses/ui.c b/ui/curses/ui.c
index 3564ef3..c1bad52 100644
--- a/ui/curses/ui.c
+++ b/ui/curses/ui.c
@@ -171,7 +171,7 @@ void gfx_clear_array(uint64_t *arry) {
memset(arry, 0, g_gfx_vsiz * sizeof(uint64_t));
}
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
void gfx_accumulate_pixel(uint64_t pos, uint64_t zoom, uint64_t pixa, uint64_t *arry) {
assert(arry);
@@ -205,7 +205,7 @@ void gfx_accumulate_pixel(uint64_t pos, uint64_t zoom, uint64_t pixa, uint64_t *
}
#endif
-#if !defined(MVEC_LOOP)
+#if MVEC_LOOP == 0
void gfx_accumulate_pixel(uint64_t pos, uint64_t zoom, uint64_t pixa, uint64_t *arry) {
assert(arry);
@@ -602,7 +602,7 @@ void ui_world_resize(void) {
}
}
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
void ui_print_cell(uint64_t i, uint64_t r, uint64_t x, uint64_t y) {
#else
void ui_print_cell(uint64_t i, uint64_t r, uint64_t x, uint64_t y, uint64_t a) {
@@ -619,7 +619,7 @@ void ui_print_cell(uint64_t i, uint64_t r, uint64_t x, uint64_t y, uint64_t a) {
int pair_cell;
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
if (g_wcursor_mode && r == (uint64_t)g_wcursor_x && y == (uint64_t)g_wcursor_y) {
#else
if (a >= MVEC_SIZE || (g_wcursor_mode && r == (uint64_t)g_wcursor_x && y == (uint64_t)g_wcursor_y)) {
@@ -722,7 +722,7 @@ void ui_print_world(int l) {
uint64_t x = r + PANE_WIDTH;
uint64_t y = i / g_vlin;
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
ui_print_cell(i, r, x, y);
#else
uint64_t a = g_wrld_pos + (i * g_wrld_zoom);
@@ -796,7 +796,6 @@ void ui_print_ipc(int l) {
// ----------------------------------------------------------------------------
void ui_info_impl(const char *format, ...) {
assert(format);
- assert(false);
va_list args;
va_start(args, format);
@@ -874,7 +873,7 @@ void ui_print(void) {
ui_line(false, l++, PAIR_HEADER, A_BOLD, "SALIS [%d:%d]", g_core, CORES);
ui_str_field(l++, "name", NAME);
ui_ulx_field(l++, "seed", SEED);
-#if defined(MUTA_FLIP)
+#if MUTA_FLIP == 1
ui_str_field(l++, "fbit", "yes");
#else
ui_str_field(l++, "fbit", "no");
@@ -948,7 +947,7 @@ void ev_vscroll(int ev) {
g_wrld_pos += g_vlin_rng;
break;
case 's':
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
g_wrld_pos -= g_vlin_rng;
#else
if (g_wrld_pos < g_vlin_rng) {
@@ -1039,7 +1038,7 @@ void ev_hscroll(int ev) {
case PAGE_WORLD:
switch (ev) {
case 'a':
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
g_wrld_pos -= g_wrld_zoom;
#else
if (g_wrld_pos < g_wrld_zoom) {
diff --git a/ui/curses/ui_vars.py b/ui/curses/ui_vars.py
index b2462fb..f37923c 100644
--- a/ui/curses/ui_vars.py
+++ b/ui/curses/ui_vars.py
@@ -1,7 +1,6 @@
class UIVars:
def __init__(self, _):
self.flags = set()
- self.includes = {"curses.h", "locale.h", "time.h"}
self.defines = {"-DNCURSES_WIDECHAR=1"}
+ self.includes = {"curses.h", "locale.h", "time.h"}
self.links = {"-lncurses"}
- self.pager = True