aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-08-12 00:42:17 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-08-13 16:44:24 +0100
commit0fa62ae4ff98e6cd213c09995fadf979b74d8f6a (patch)
tree3c525f988dc9b9a81d521e0f3e149d6c01321712
parentf7fa9d45f5644576b8a38cd9e6dd7838ad286127 (diff)
downloadpuzzles-0fa62ae4ff98e6cd213c09995fadf979b74d8f6a.zip
puzzles-0fa62ae4ff98e6cd213c09995fadf979b74d8f6a.tar.gz
puzzles-0fa62ae4ff98e6cd213c09995fadf979b74d8f6a.tar.bz2
puzzles-0fa62ae4ff98e6cd213c09995fadf979b74d8f6a.tar.xz
Tents: use new move_cursor() features
-rw-r--r--tents.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tents.c b/tents.c
index 607b6ab..52fedda 100644
--- a/tents.c
+++ b/tents.c
@@ -1674,11 +1674,12 @@ static char *interpret_move(const game_state *state, game_ui *ui,
}
if (IS_CURSOR_MOVE(button)) {
- ui->cdisp = true;
+ char *ret;
if (shift || control) {
int len = 0, i, indices[2];
indices[0] = ui->cx + w * ui->cy;
- move_cursor(button, &ui->cx, &ui->cy, w, h, false, NULL);
+ ret = move_cursor(button, &ui->cx, &ui->cy, w, h, false,
+ &ui->cdisp);
indices[1] = ui->cx + w * ui->cy;
/* NONTENTify all unique traversed eligible squares */
@@ -1693,8 +1694,9 @@ static char *interpret_move(const game_state *state, game_ui *ui,
tmpbuf[len] = '\0';
if (len) return dupstr(tmpbuf);
} else
- move_cursor(button, &ui->cx, &ui->cy, w, h, false, NULL);
- return MOVE_UI_UPDATE;
+ ret = move_cursor(button, &ui->cx, &ui->cy, w, h, false,
+ &ui->cdisp);
+ return ret;
}
if (ui->cdisp) {
char rep = 0;