diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-12 14:31:37 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-13 16:44:24 +0100 |
| commit | be9e4f89579331eea8df13d8ef3ef7366a4cffab (patch) | |
| tree | c6c2e44f7a622b3cecd98b2adfee9157cd243106 | |
| parent | 92ac45fe240b2063455b0b01dedc6ef6996f18af (diff) | |
| download | puzzles-be9e4f89579331eea8df13d8ef3ef7366a4cffab.zip puzzles-be9e4f89579331eea8df13d8ef3ef7366a4cffab.tar.gz puzzles-be9e4f89579331eea8df13d8ef3ef7366a4cffab.tar.bz2 puzzles-be9e4f89579331eea8df13d8ef3ef7366a4cffab.tar.xz | |
Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Untangle
| -rw-r--r-- | untangle.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1210,7 +1210,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, place_dragged_point(state, ui, ds, x, y); return MOVE_UI_UPDATE; } - + return MOVE_NO_EFFECT; } else if (IS_MOUSE_DRAG(button) && ui->dragpoint >= 0) { place_dragged_point(state, ui, ds, x, y); return MOVE_UI_UPDATE; @@ -1238,9 +1238,10 @@ static char *interpret_move(const game_state *state, game_ui *ui, ui->newpoint.x, ui->newpoint.y, ui->newpoint.d); ui->just_dragged = true; return dupstr(buf); - } + } else if (IS_MOUSE_DRAG(button) || IS_MOUSE_RELEASE(button)) + return MOVE_NO_EFFECT; - return NULL; + return MOVE_UNUSED; } static game_state *execute_move(const game_state *state, const char *move) |