diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-10 23:46:30 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-13 16:44:24 +0100 |
| commit | f7c2d45fba037b33434d613b2afced47f40f6738 (patch) | |
| tree | 6f94a4cae97326a316334132aa849c21f0f91e49 /pattern.c | |
| parent | 9f98144a0f4ced3bb3ab21d86883ab146f9ee0a4 (diff) | |
| download | puzzles-f7c2d45fba037b33434d613b2afced47f40f6738.zip puzzles-f7c2d45fba037b33434d613b2afced47f40f6738.tar.gz puzzles-f7c2d45fba037b33434d613b2afced47f40f6738.tar.bz2 puzzles-f7c2d45fba037b33434d613b2afced47f40f6738.tar.xz | |
Pattern: use new move_cursor() features
Diffstat (limited to 'pattern.c')
| -rw-r--r-- | pattern.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1394,16 +1394,16 @@ static char *interpret_move(const game_state *state, game_ui *ui, if (IS_CURSOR_MOVE(button)) { int x = ui->cur_x, y = ui->cur_y, newstate; - char buf[80]; - move_cursor(button, &ui->cur_x, &ui->cur_y, - state->common->w, state->common->h, false, NULL); - ui->cur_visible = true; - if (!control && !shift) return MOVE_UI_UPDATE; + char buf[80], *ret; + ret = move_cursor(button, &ui->cur_x, &ui->cur_y, + state->common->w, state->common->h, false, + &ui->cur_visible); + if (!control && !shift) return ret; newstate = control ? shift ? GRID_UNKNOWN : GRID_FULL : GRID_EMPTY; if (state->grid[y * state->common->w + x] == newstate && state->grid[ui->cur_y * state->common->w + ui->cur_x] == newstate) - return MOVE_UI_UPDATE; + return ret; sprintf(buf, "%c%d,%d,%d,%d", control ? shift ? 'U' : 'F' : 'E', min(x, ui->cur_x), min(y, ui->cur_y), |