aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--galaxies.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/galaxies.c b/galaxies.c
index 0841994..7f1d605 100644
--- a/galaxies.c
+++ b/galaxies.c
@@ -2810,15 +2810,15 @@ static char *interpret_move(const game_state *state, game_ui *ui,
}
if (button == LEFT_BUTTON || button == RIGHT_BUTTON) {
- if (!INUI(state, px, py)) return NULL;
+ if (!INUI(state, px, py)) return MOVE_UNUSED;
sp = &SPACE(state, px, py);
- if (!dot_is_possible(state, sp, 1)) return NULL;
+ if (!dot_is_possible(state, sp, 1)) return MOVE_NO_EFFECT;
sprintf(buf, "%c%d,%d",
(char)((button == LEFT_BUTTON) ? 'D' : 'd'), px, py);
return dupstr(buf);
}
- return NULL;
+ return MOVE_UNUSED;
}
#else
static bool edge_placement_legal(const game_state *state, int x, int y)
@@ -2899,9 +2899,9 @@ static char *interpret_move(const game_state *state, game_ui *ui,
coord_round_to_edge(FROMCOORD((float)x), FROMCOORD((float)y),
&px, &py);
- if (!INUI(state, px, py)) return NULL;
+ if (!INUI(state, px, py)) return MOVE_UNUSED;
if (!edge_placement_legal(state, px, py))
- return NULL;
+ return MOVE_NO_EFFECT;
sprintf(buf, "E%d,%d", px, py);
return dupstr(buf);
@@ -2965,6 +2965,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
ui->doty = dot->y;
return MOVE_UI_UPDATE;
}
+ return MOVE_NO_EFFECT;
} else if (button == RIGHT_DRAG && ui->dragging) {
/* just move the drag coords. */
ui->dx = x;
@@ -3062,7 +3063,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
}
}
- return NULL;
+ return MOVE_UNUSED;
}
#endif