mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Light Up
Light Up is unusual in that clicking outside the grid hides the cursor, so the return value from clicks outside the grid is MOVE_NO_EFFECT or MOVE_UI_UPDATE rather than the more usual MOVE_UNUSED.
This commit is contained in:
@ -1954,7 +1954,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
|||||||
enum { NONE, FLIP_LIGHT, FLIP_IMPOSSIBLE } action = NONE;
|
enum { NONE, FLIP_LIGHT, FLIP_IMPOSSIBLE } action = NONE;
|
||||||
int cx = -1, cy = -1;
|
int cx = -1, cy = -1;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
char buf[80], *nullret = MOVE_UI_UPDATE, *empty = MOVE_UI_UPDATE, c;
|
char buf[80], *nullret = MOVE_NO_EFFECT, *empty = MOVE_UI_UPDATE, c;
|
||||||
|
|
||||||
if (button == LEFT_BUTTON || button == RIGHT_BUTTON) {
|
if (button == LEFT_BUTTON || button == RIGHT_BUTTON) {
|
||||||
if (ui->cur_visible)
|
if (ui->cur_visible)
|
||||||
@ -1978,7 +1978,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
|||||||
nullret = move_cursor(button, &ui->cur_x, &ui->cur_y,
|
nullret = move_cursor(button, &ui->cur_x, &ui->cur_y,
|
||||||
state->w, state->h, false, &ui->cur_visible);
|
state->w, state->h, false, &ui->cur_visible);
|
||||||
} else
|
} else
|
||||||
return NULL;
|
return MOVE_UNUSED;
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case FLIP_LIGHT:
|
case FLIP_LIGHT:
|
||||||
|
Reference in New Issue
Block a user