Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Same Game

This commit is contained in:
Ben Harris
2023-07-31 23:08:20 +01:00
parent ecb3a9d6f2
commit 0dd0186662

View File

@ -1305,11 +1305,11 @@ static char *interpret_move(const game_state *state, game_ui *ui,
tx = ui->xsel; tx = ui->xsel;
ty = ui->ysel; ty = ui->ysel;
} else } else
return NULL; return MOVE_UNUSED;
if (tx < 0 || tx >= state->params.w || ty < 0 || ty >= state->params.h) if (tx < 0 || tx >= state->params.w || ty < 0 || ty >= state->params.h)
return NULL; return MOVE_UNUSED;
if (COL(state, tx, ty) == 0) return NULL; if (COL(state, tx, ty) == 0) return MOVE_NO_EFFECT;
if (ISSEL(ui,tx,ty)) { if (ISSEL(ui,tx,ty)) {
if (button == RIGHT_BUTTON || button == CURSOR_SELECT2) if (button == RIGHT_BUTTON || button == CURSOR_SELECT2)