aboutsummaryrefslogtreecommitdiff
path: root/tents.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-06-04 18:42:58 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-06-11 00:33:27 +0100
commita9af3fda1d784c42d486a019a0a4e947f762af70 (patch)
tree8cb5d37274541dae804cd11d944feb41ffa1d40b /tents.c
parentb08c13f5f47a8541961fc150142523b061d3d9c6 (diff)
downloadpuzzles-a9af3fda1d784c42d486a019a0a4e947f762af70.zip
puzzles-a9af3fda1d784c42d486a019a0a4e947f762af70.tar.gz
puzzles-a9af3fda1d784c42d486a019a0a4e947f762af70.tar.bz2
puzzles-a9af3fda1d784c42d486a019a0a4e947f762af70.tar.xz
Rename UI_UPDATE as MOVE_UI_UPDATE
All the other constants named UI_* are special key names that can be passed to midend_process_key(), but UI_UPDATE is a special return value from the back-end interpret_move() function instead. This renaming makes the distinction clear and provides a naming convention for future special return values from interpret_move().
Diffstat (limited to 'tents.c')
-rw-r--r--tents.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tents.c b/tents.c
index e772e57..ff4af33 100644
--- a/tents.c
+++ b/tents.c
@@ -1589,7 +1589,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
ui->dsy = ui->dey = y;
ui->drag_ok = true;
ui->cdisp = false;
- return UI_UPDATE;
+ return MOVE_UI_UPDATE;
}
if ((IS_MOUSE_DRAG(button) || IS_MOUSE_RELEASE(button)) &&
@@ -1621,14 +1621,14 @@ static char *interpret_move(const game_state *state, game_ui *ui,
}
if (IS_MOUSE_DRAG(button))
- return UI_UPDATE;
+ return MOVE_UI_UPDATE;
/*
* The drag has been released. Enact it.
*/
if (!ui->drag_ok) {
ui->drag_button = -1;
- return UI_UPDATE; /* drag was just cancelled */
+ return MOVE_UI_UPDATE; /* drag was just cancelled */
}
xmin = min(ui->dsx, ui->dex);
@@ -1666,7 +1666,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
if (buflen == 0) {
sfree(buf);
- return UI_UPDATE; /* drag was terminated */
+ return MOVE_UI_UPDATE; /* drag was terminated */
} else {
buf[buflen] = '\0';
return buf;
@@ -1694,7 +1694,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
if (len) return dupstr(tmpbuf);
} else
move_cursor(button, &ui->cx, &ui->cy, w, h, false);
- return UI_UPDATE;
+ return MOVE_UI_UPDATE;
}
if (ui->cdisp) {
char rep = 0;
@@ -1721,7 +1721,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
}
} else if (IS_CURSOR_SELECT(button)) {
ui->cdisp = true;
- return UI_UPDATE;
+ return MOVE_UI_UPDATE;
}
return NULL;