aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-08-10 00:23:09 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-08-13 16:44:24 +0100
commit205508e969cdb6aed54a1b75367e7bb3891c53ba (patch)
tree22d3b68fb7b46484999712385ca8efafd82fb3ae
parent029cc3996845899edf1cfae55fbf3bd55cbc7439 (diff)
downloadpuzzles-205508e969cdb6aed54a1b75367e7bb3891c53ba.zip
puzzles-205508e969cdb6aed54a1b75367e7bb3891c53ba.tar.gz
puzzles-205508e969cdb6aed54a1b75367e7bb3891c53ba.tar.bz2
puzzles-205508e969cdb6aed54a1b75367e7bb3891c53ba.tar.xz
Mosaic: remove some unused structure members
As far as I could tell, cur_x, cur_y, prev_cur_x, and prev_cur_y in game_drawstate were never used. prev_cur_x and prev_cur_y in game_ui were assigned but never referenced. So they may as well all go.
-rw-r--r--mosaic.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/mosaic.c b/mosaic.c
index 8cca7b9..bedb29d 100644
--- a/mosaic.c
+++ b/mosaic.c
@@ -126,15 +126,12 @@ struct game_ui {
bool in_progress;
int last_x, last_y, last_state;
int cur_x, cur_y;
- int prev_cur_x, prev_cur_y;
bool cur_visible;
};
struct game_drawstate {
int tilesize;
int *state;
- int cur_x, cur_y; /* -1, -1 for no cursor displayed. */
- int prev_cur_x, prev_cur_y;
};
static game_params *default_params(void)
@@ -1187,8 +1184,6 @@ static char *interpret_move(const game_state *state, game_ui *ui,
}
ui->cur_visible = false;
} else if (IS_CURSOR_MOVE(button)) {
- ui->prev_cur_x = ui->cur_x;
- ui->prev_cur_y = ui->cur_y;
move_cursor(button, &ui->cur_x, &ui->cur_y, state->width,
state->height, false, NULL);
ui->cur_visible = true;