pts[i].d = 2;
ox *= pts[i].d;
oy *= pts[i].d;
- pts[i].x = ox + 0.5;
- pts[i].y = oy + 0.5;
+ pts[i].x = (long)(ox + 0.5F);
+ pts[i].y = (long)(oy + 0.5F);
extra = sprintf(buf, ";P%d:%ld,%ld/%ld", i,
pts[i].x, pts[i].y, pts[i].d);
return ret;
}
+static int game_can_format_as_text_now(game_params *params)
+{
+ return TRUE;
+}
+
static char *game_text_format(game_state *state)
{
return NULL;
{
int n = state->params.n;
- if (button == LEFT_BUTTON) {
+ if (IS_MOUSE_DOWN(button)) {
int i, best;
long bestd;
return "";
}
- } else if (button == LEFT_DRAG && ui->dragpoint >= 0) {
+ } else if (IS_MOUSE_DRAG(button) && ui->dragpoint >= 0) {
ui->newpoint.x = x;
ui->newpoint.y = y;
ui->newpoint.d = ds->tilesize;
return "";
- } else if (button == LEFT_RELEASE && ui->dragpoint >= 0) {
+ } else if (IS_MOUSE_RELEASE(button) && ui->dragpoint >= 0) {
int p = ui->dragpoint;
char buf[80];
point ret;
ret.d = a.d * b.d;
- ret.x = a.x * b.d + distance * (b.x * a.d - a.x * b.d);
- ret.y = a.y * b.d + distance * (b.y * a.d - a.y * b.d);
+ ret.x = (long)(a.x * b.d + distance * (b.x * a.d - a.x * b.d));
+ ret.y = (long)(a.y * b.d + distance * (b.y * a.d - a.y * b.d));
return ret;
}
dup_game,
free_game,
TRUE, solve_game,
- FALSE, game_text_format,
+ FALSE, game_can_format_as_text_now, game_text_format,
new_ui,
free_ui,
encode_ui,